Skip to content
shotsmith
Features Docs Guides Pricing Changelog Sign inStart free

AI vision

Add vision_prompt to have a vision model look at the screenshot and answer. The answer is in the vision field when you use response_type=json, and on the capture in the dashboard.

Pass your model provider’s key

Vision calls run on your own OpenAI or Anthropic account. Send your key with the request alongside your shotsmith access key:

  • vision_provider=openai (the default) with openai_api_key.
  • vision_provider=anthropic to use Claude, with anthropic_api_key.
import { Shotsmith } from '@shotsmith/sdk';

const shotsmith = new Shotsmith({ accessKey: 'YOUR_ACCESS_KEY' });

const result = await shotsmith.takeJson({
  url: 'https://shotsmith.dev/sample',
  vision_provider: 'anthropic',
  anthropic_api_key: 'YOUR_ANTHROPIC_API_KEY',
  vision_prompt: 'List any broken layout or overlapping text on this page.',
});

console.log(result.vision);
<?php

require 'vendor/autoload.php';

use Shotsmith\Client;

$shotsmith = new Client('YOUR_ACCESS_KEY');

$result = $shotsmith->takeJson([
    'url' => 'https://shotsmith.dev/sample',
    'vision_provider' => 'anthropic',
    'anthropic_api_key' => 'YOUR_ANTHROPIC_API_KEY',
    'vision_prompt' => 'List any broken layout or overlapping text on this page.',
]);

echo $result['vision'];
curl -X POST "https://shotsmith.dev/v1/take" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://shotsmith.dev/sample",
    "vision_provider": "anthropic",
    "anthropic_api_key": "YOUR_ANTHROPIC_API_KEY",
    "vision_prompt": "List any broken layout or overlapping text on this page.",
    "response_type": "json"
  }'
const res = await fetch('https://shotsmith.dev/v1/take', {
  method: 'POST',
  headers: {
    'X-Access-Key': 'YOUR_ACCESS_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://shotsmith.dev/sample',
    vision_provider: 'anthropic',
    anthropic_api_key: 'YOUR_ANTHROPIC_API_KEY',
    vision_prompt: 'List any broken layout or overlapping text on this page.',
    response_type: 'json',
  }),
});
if (!res.ok) throw new Error((await res.json()).error_message);

console.log(await res.json());
import json
import urllib.request

body = {
    "url": "https://shotsmith.dev/sample",
    "vision_provider": "anthropic",
    "anthropic_api_key": "YOUR_ANTHROPIC_API_KEY",
    "vision_prompt": "List any broken layout or overlapping text on this page.",
    "response_type": "json"
}

req = urllib.request.Request(
    "https://shotsmith.dev/v1/take",
    data=json.dumps(body).encode(),
    headers={"X-Access-Key": "YOUR_ACCESS_KEY", "Content-Type": "application/json"},
    method="POST",
)

# Raises urllib.error.HTTPError on a 4xx/5xx response
with urllib.request.urlopen(req, timeout=60) as res:
    print(json.load(res))
<?php

$ch = curl_init('https://shotsmith.dev/v1/take');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ['X-Access-Key: YOUR_ACCESS_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://shotsmith.dev/sample',
        'vision_provider' => 'anthropic',
        'anthropic_api_key' => 'YOUR_ANTHROPIC_API_KEY',
        'vision_prompt' => 'List any broken layout or overlapping text on this page.',
        'response_type' => 'json',
    ]),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 60,
]);
$response = json_decode(curl_exec($ch), true);

if (curl_getinfo($ch, CURLINFO_RESPONSE_CODE) >= 400) {
    throw new RuntimeException($response['error_message']);
}

print_r($response);
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "url": "https://shotsmith.dev/sample",
	  "vision_provider": "anthropic",
	  "anthropic_api_key": "YOUR_ANTHROPIC_API_KEY",
	  "vision_prompt": "List any broken layout or overlapping text on this page.",
	  "response_type": "json"
	}`)

	req, _ := http.NewRequest("POST", "https://shotsmith.dev/v1/take", body)
	req.Header.Set("X-Access-Key", "YOUR_ACCESS_KEY")
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}
require "net/http"
require "json"

body = {
  "url" => "https://shotsmith.dev/sample",
  "vision_provider" => "anthropic",
  "anthropic_api_key" => "YOUR_ANTHROPIC_API_KEY",
  "vision_prompt" => "List any broken layout or overlapping text on this page.",
  "response_type" => "json"
}

res = Net::HTTP.post(
  URI("https://shotsmith.dev/v1/take"),
  body.to_json,
  "X-Access-Key" => "YOUR_ACCESS_KEY",
  "Content-Type" => "application/json"
)
raise res.body unless res.is_a?(Net::HTTPSuccess)

puts JSON.parse(res.body)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Request {
    public static void main(String[] args) throws Exception {
        var body = """
            {
              "url": "https://shotsmith.dev/sample",
              "vision_provider": "anthropic",
              "anthropic_api_key": "YOUR_ANTHROPIC_API_KEY",
              "vision_prompt": "List any broken layout or overlapping text on this page.",
              "response_type": "json"
            }
            """;

        var request = HttpRequest.newBuilder(URI.create("https://shotsmith.dev/v1/take"))
            .header("X-Access-Key", "YOUR_ACCESS_KEY")
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();

        var res = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(res.body());
    }
}
using System;
using System.Net.Http;
using System.Text;

using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Access-Key", "YOUR_ACCESS_KEY");

var body = """
    {
      "url": "https://shotsmith.dev/sample",
      "vision_provider": "anthropic",
      "anthropic_api_key": "YOUR_ANTHROPIC_API_KEY",
      "vision_prompt": "List any broken layout or overlapping text on this page.",
      "response_type": "json"
    }
    """;

var res = await http.PostAsync(
    "https://shotsmith.dev/v1/take",
    new StringContent(body, Encoding.UTF8, "application/json")
);
res.EnsureSuccessStatusCode();

Console.WriteLine(await res.Content.ReadAsStringAsync());
Response 200 OK
Content-Type: application/json
X-Capture-Id: 01m8kvpk6jsmeykdfs0wy6awbn
X-Cache: MISS
X-Render-Time: 181
X-Quota-Limit: 15000
X-Quota-Remaining: 14998
X-RateLimit-Limit: 80
X-RateLimit-Remaining: 79
{
  "is_successful": true,
  "id": "01m8kvpk6jsmeykdfs0wy6awbn",
  "kind": "screenshot",
  "status": "succeeded",
  "source": "api",
  "url": "https://shotsmith.dev/sample",
  "format": "jpg",
  "cache_hit": false,
  "file_url": "https://shotsmith.dev/files/01m8kvpk6jsmeykdfs0wy6awbn.jpg?expires=1796049316&signature=e98b5de4…",
  "slices": null,
  "content_type": "image/jpeg",
  "bytes": 110201,
  "width": 1280,
  "height": 1024,
  "duration_ms": 181,
  "metadata": {
    "blocked": {
      "ads": 0,
      "trackers": 0,
      "cookies": 0,
      "chats": 0,
      "custom": 0,
      "resources": 0
    },
    "image_size": { "width": 1280, "height": 1024 }
  },
  "vision": "The page looks clean. The heading, paragraph and link are aligned, and no text overlaps or is cut off.",
  "store": null,
  "external_identifier": null,
  "error": null,
  "created_at": "2026-11-29T14:35:16+00:00",
  "completed_at": "2026-11-29T14:35:16+00:00",
  "cache_url": "https://shotsmith.dev/files/01m8kvpk6jsmeykdfs0wy6awbn.jpg?expires=1796049316&signature=e98b5de4…"
}

Send provider keys in a POST body as above, not in the query string, so they don’t end up in URLs, logs or browser history. Never put them in a signed <img> URL.

Your provider key is used for that single request and never stored: it’s masked in the capture’s saved options. Large full-page captures are downscaled before they are sent.