AI Screenshot Analysis
Capture a screenshot of any URL and analyze it using AI vision. The endpoint takes a full-page screenshot and sends it to your configured AI provider along with page metadata. Returns structured or free-form analysis depending on the prompt template used.
Requires: Starter plan or higher. A BYOK AI provider must be configured.
POST
/v1/analyzeParameters
| Parameter | Type | Default | Description |
|---|
Response
{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://stripe.com/pricing",
"analysis": "The pricing page uses a clean three-column layout with clear plan differentiation. The primary CTA buttons are high-contrast and above the fold. Accessibility concern: the comparison table lacks column headers visible to screen readers. The page loads with a hero section that immediately communicates value. Color contrast for secondary text appears to meet WCAG AA standards.",
"provider": "anthropic",
"model": "claude-opus-4-5",
"template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"template_name": "Screenshot Analysis",
"meta": {
"title": "Pricing & Fees | Stripe",
"description": "Stripe fees and pricing...",
"image": "https://stripe.com/img/og.png"
}
}If include_screenshot: true is set, the response also includes:
{
"screenshot_base64": "iVBORw0KGgoAAAANS..."
}Examples
curl -X POST https://api.snapsharp.dev/v1/analyze \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"url": "https://stripe.com/pricing",
"full_page": true
}'import { SnapSharp } from '@snapsharp/sdk';
const snap = new SnapSharp('sk_live_...');
const result = await snap.analyze({
url: 'https://stripe.com/pricing',
full_page: true,
});
console.log(result.analysis);
// "The pricing page uses a clean three-column layout..."from snapsharp import SnapSharp
snap = SnapSharp("sk_live_...")
result = snap.analyze(
url="https://stripe.com/pricing",
full_page=True,
)
print(result["analysis"])Custom templates
You can create custom AI prompt templates in Settings → AI → Templates and pass their UUID as template_id.
Common use cases:
- UX audit — score information hierarchy, CTA visibility, readability
- Accessibility check — identify contrast issues, missing labels, layout problems
- Competitor analysis — extract pricing structure, feature lists, positioning signals
- Content moderation — flag inappropriate or policy-violating content
- Screenshot description — generate alt text or summaries for images
AI providers
The endpoint uses your default AI provider configured in Settings → AI Providers. Supported providers:
| Provider | Vision support |
|---|---|
| Anthropic (Claude) | ✅ |
| OpenAI (GPT-4o, o1) | ✅ |
| OpenRouter | ✅ (model-dependent) |
| Custom OpenAI-compatible | ✅ (model-dependent) |
Errors
| Code | Error | Description |
|---|---|---|
| 400 | validation_error | Invalid or missing URL |
| 400 | no_ai_provider | No default AI provider configured. Add one at /settings/ai. |
| 401 | unauthorized | Missing or invalid API key |
| 403 | plan_required | Requires Starter plan or higher |
| 404 | template_not_found | Specified template_id does not exist |
| 429 | rate_limited | Rate limit exceeded |
| 502 | ai_error | AI provider returned an error (check provider API key and model name) |
| 504 | timeout | Screenshot timed out before analysis could run |