AI Analysis Screenshots
Add AI to any screenshot. Ask a question about the page in plain language and the answer comes back alongside the image, in the same request. It works with the Snap Endpoint for one-off captures and with the Create Endpoint for scheduled ones, so a monitored page can be checked by the AI on every capture.
Two ways to get an answer
A Simple Prompt returns free text for your ai_prompt. Structured Data returns a JSON object with the fields you define, which is ideal for automation. See Structured Data.
Two ways to pay for it
By default, analyses use your AI Analysis credits. Free and paid plans include 25 credits a month, and paid plans can add 1,000 credits for $9.99 a month. Or bring your own key: with the Bring Your Own AI addon, analyses run on your own Claude, OpenAI or OpenRouter account with no per-analysis limit, billed at your provider's rates and never against your credits. See Bring Your Own AI.
| Option | Expected Value |
|---|---|
| url | A link to the web page you want to screenshot and analyze. |
| access_token | Your account's Private API Key. |
| analyze_image_with_ai | Set to true to enable AI image analysis (false is default). |
| ai_prompt | A text prompt that guides the AI in analyzing the image, up to 2500 characters. Requires analyze_image_with_ai=true. |
| ai_prompt_mode | simple (default) returns free text for ai_prompt. structured returns JSON matching ai_structured_fields. |
| ai_structured_instructions | Optional context for a structured analysis, for example This is an e-commerce product page. |
| ai_structured_fields | The fields to extract, as a JSON array. See Structured Data. |
| ai_provider | pagepixels (default) uses your credits. anthropic, openai or openrouter uses your own account. Requires the Bring Your Own AI addon and a stored key. See Bring Your Own AI. |
| ai_model | The model to use with your own provider. Required for openai and openrouter, optional for anthropic. List compatible models with the models endpoint. |
Example
The following example takes a screenshot of a TradingView stock page and asks the AI "What's the current price of this stock?" using the snap endpoint:
/snap
bash
curl -X GET "https://api.pagepixels.com/snap" \
--data-urlencode "url=https://www.tradingview.com/symbols/NASDAQ-NVDA/financials-overview/" \
-d analyze_image_with_ai=true \
--data-urlencode "ai_prompt=What's the current price of this stock?" \
-d json=true \
-d wait=8000 \
-d ttl=0 \
-d access_token="your-api-key"
{
"id": "id",
"embed_url":"https://pagepixels.com/app/screenshots/:screenshot_configuration_id/embed",
"screenshot_configuration_id":"screenshot_configuration_id",
"direct_link":"https://cdn.pagepixels.com/null/c6df60d2d89b2c-1734222361743.jpg",
"direct_thumbnail_link":"https://cdn.pagepixels.com/null/thumb_c6df60d2d89b2c-1734222361743.jpg",
"taken_at_timestamp":"1734222368651",
"taken_at":"2024-12-15T00:26:08+00:00",
"ai":{"ai_analyzed":true,"ai_prompt":"What's the current price of this stock?","ai_response":"The current price of the NVIDIA stock is $134.25 USD."},
"job_id": "job_id"
}
Structured Data
Prefer JSON to prose? Define the fields you want and the analysis returns a JSON object that matches them, ready for your code. Set ai_prompt_mode=structured and pass ai_structured_fields as a JSON array. On GET requests pass it as a JSON string. ai_structured_instructions adds optional context. Works with your credits and with your own provider.
| Field key | Expected Value |
|---|---|
| name | Letters, numbers and underscores, starting with a letter. Becomes the key in the response. |
| type | string, number, boolean, enum (pick one of options) or multi (pick any of options, returned as an array). |
| description | Optional. What the field should contain, for example the page headline. |
| options | Required for enum and multi: the allowed values, up to 100. |
Up to 50 fields per configuration.
Example
This example checks a landing page and returns the result as JSON:
/snap
bash
curl -X POST "https://api.pagepixels.com/snap" \
-H "Content-Type: application/json" \
-d '{
"url": "https://pagepixels.com",
"json": true,
"analyze_image_with_ai": true,
"ai_prompt_mode": "structured",
"ai_structured_instructions": "This is a marketing landing page.",
"ai_structured_fields": [
{"name": "page_loaded", "type": "boolean", "description": "Did the page render without errors?"},
{"name": "status", "type": "enum", "options": ["ok", "warning", "broken"]},
{"name": "issues", "type": "multi", "options": ["layout broken", "missing images", "error message", "blank page"]},
{"name": "headline", "type": "string", "description": "the page headline"}
],
"access_token": "your-api-key"
}'
{
"id": "id",
"embed_url": "https://pagepixels.com/app/screenshots/:screenshot_configuration_id/embed",
"screenshot_configuration_id": "screenshot_configuration_id",
"direct_link": "https://cdn.pagepixels.com/.../c6df60d2d89b2c-1734222361743.jpg",
"direct_thumbnail_link": "https://cdn.pagepixels.com/.../thumb_c6df60d2d89b2c-1734222361743.jpg",
"taken_at_timestamp": "1734222368651",
"taken_at": "2024-12-15T00:26:08+00:00",
"ai": {
"ai_analyzed": true,
"ai_prompt": "",
"ai_response": "{\"page_loaded\":true,\"status\":\"ok\",\"issues\":[],\"headline\":\"Scheduled Screenshots\"}",
"ai_provider": "pagepixels",
"ai_model": null,
"ai_prompt_mode": "structured",
"ai_structured_response": {"page_loaded": true, "status": "ok", "issues": [], "headline": "Scheduled Screenshots"}
},
"job_id": "job_id"
}
ai_structured_response is the parsed object. ai_response is still a string, JSON-encoded in structured mode, so existing integrations, webhooks and Zapier steps keep working exactly as before.
Bring Your Own AI
With the Bring Your Own AI addon, AI Analysis Screenshots and Multiple Image Analyses run on your own Claude (Anthropic), OpenAI or OpenRouter account. Requests go straight to your provider and are billed at their rates, so your PagePixels credits are never used and there is no per-analysis limit. Pick any compatible vision model, switch providers whenever you like, and remove a key at any time.
How it works
1. Store your provider key once with the store key endpoint. We verify it with your provider, keep it encrypted, and only ever return a masked hint.
2. Pick a model from the models endpoint. Only vision-capable models that support structured outputs are listed, so every model shown works with both prompt modes.
3. Add ai_provider (and ai_model) to any snap, scheduled screenshot or multiple image analysis. That is all. Keys are never accepted on those requests, and a key sent with one is discarded.
The addon is available on any paid screenshot plan. If you are on the free plan, pick a plan first and then add the addon. Requests that need the addon return a clear error_code and a note with the upgrade path, before any credit is used.
This example takes a screenshot and has your own OpenRouter account analyze it:
/snap
bash
curl -X GET "https://api.pagepixels.com/snap" \
--data-urlencode "url=https://www.tradingview.com/symbols/NASDAQ-NVDA/financials-overview/" \
-d analyze_image_with_ai=true \
--data-urlencode "ai_prompt=What's the current price of this stock?" \
-d ai_provider=openrouter \
-d ai_model=google/gemini-3.8-flash \
-d json=true \
-d wait=3000 \
-d ttl=0 \
-d access_token="your-api-key"
{
"id": "id",
"embed_url": "https://pagepixels.com/app/screenshots/:screenshot_configuration_id/embed",
"screenshot_configuration_id": "screenshot_configuration_id",
"direct_link": "https://cdn.pagepixels.com/.../c6df60d2d89b2c-1734222361743.jpg",
"direct_thumbnail_link": "https://cdn.pagepixels.com/.../thumb_c6df60d2d89b2c-1734222361743.jpg",
"taken_at_timestamp": "1734222368651",
"taken_at": "2024-12-15T00:26:08+00:00",
"ai": {
"ai_analyzed": true,
"ai_prompt": "What's the current price of this stock?",
"ai_response": "The current price of the NVIDIA stock is $134.25 USD.",
"ai_provider": "openrouter",
"ai_model": "google/gemini-3.8-flash",
"ai_prompt_mode": "simple",
"ai_structured_response": null
},
"job_id": "job_id"
}
The response gains ai_provider and ai_model so you always know which account did the work. Everything else is unchanged.
Store or Verify a Provider Key
/ai/providers/:provider
Use the put ai/providers/:provider endpoint to store a key for anthropic, openai or openrouter. We check the key with the provider right away. This is the only endpoint that ever receives a key, and it never appears in a response. Sending it again replaces the stored key.
| Key | Expected Value |
|---|---|
| api_key | Your provider API key. Required. |
| default_model | Optional. The model to use when a request does not name one. |
| default_upstream | OpenRouter only, optional. Filters the model list to one upstream: auto (default), anthropic, openai, google or meta. |
Example
/ai/providers/openrouter
bash
curl -X PUT "https://api.pagepixels.com/ai/providers/openrouter" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"api_key": "sk-or-v1-...",
"default_model": "google/gemini-3.8-flash"
}'
{
"success": true,
"provider": {
"provider": "openrouter",
"label": "OpenRouter",
"verified": true,
"key_hint": "sk-or-v…a1b2",
"default_model": "google/gemini-3.8-flash",
"default_upstream": "auto",
"verified_at": "2026-09-04T22:10:31Z",
"models_count": 227,
"last_error": null
}
}
If the provider rejects the key you get ai_provider_key_rejected with a 401, and the key stays unverified until you send a working one.
List Your Providers
/ai/providers
Use the get ai/providers endpoint to see each provider's status: whether a verified key is stored, its masked hint, the default model, and whether your account has the addon.
Example
/ai/providers
bash
curl -X GET "https://api.pagepixels.com/ai/providers" \
-H "Authorization: Bearer your-api-key"
{
"success": true,
"bring_your_own_ai_enabled": true,
"has_paid_plan": true,
"providers": [
{"provider": "anthropic", "label": "Claude", "verified": false},
{"provider": "openai", "label": "OpenAI", "verified": false},
{
"provider": "openrouter",
"label": "OpenRouter",
"verified": true,
"key_hint": "sk-or-v…a1b2",
"default_model": "google/gemini-3.8-flash",
"default_upstream": "auto",
"verified_at": "2026-09-04T22:10:31Z",
"models_count": 227,
"last_error": null
}
]
}
List Compatible Models
/ai/models
Use the get ai/models endpoint to list the models you can pick for a provider. Only vision-capable models that support structured outputs are returned, refreshed from the provider every ten minutes. Anthropic and OpenAI lists need a stored key, since they show what your account can access. The OpenRouter list does not.
| Key | Expected Value |
|---|---|
| provider | anthropic, openai or openrouter. Required. |
| upstream | OpenRouter only, optional. anthropic, openai, google or meta to narrow the list. |
Example
/ai/models
bash
curl -X GET "https://api.pagepixels.com/ai/models?provider=openrouter&upstream=google" \
-H "Authorization: Bearer your-api-key"
{
"success": true,
"provider": "openrouter",
"upstream": "google",
"fetched_at": "2026-09-04T22:12:05Z",
"count": 12,
"models": [
{
"id": "google/gemini-3.8-flash",
"name": "Gemini 3.8 Flash",
"context_length": 1048576,
"structured_outputs": true,
"pricing": {"prompt": "0.0000003", "completion": "0.0000025"},
"disabled": false,
"source": "openrouter"
}
]
}
A model with disabled: true is known but not available to your account. Pricing is per token as reported by the provider and is only present for OpenRouter.
Send a Test Prompt
/ai/providers/:provider/test
Use the post ai/providers/:provider/test endpoint to run one real analysis of a sample image through your provider. It confirms the key, the model and the connection all work before you rely on them in a schedule. Pass model to test a specific model, otherwise the stored default is used.
Example
/ai/providers/openrouter/test
bash
curl -X POST "https://api.pagepixels.com/ai/providers/openrouter/test" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{"model": "google/gemini-3.8-flash"}'
{
"success": true,
"result": {
"text": "A light grey placeholder image with the PagePixels logo in the center.",
"model": "google/gemini-3.8-flash",
"seconds": 2.3
}
}
Remove a Provider Key
/ai/providers/:provider
Use the delete ai/providers/:provider endpoint to remove a stored key. Screenshot configurations that use this provider fail with ai_provider_not_configured on their next capture until a new key is stored, and nothing falls back to your credits without you asking.
Example
/ai/providers/openrouter
bash
curl -X DELETE "https://api.pagepixels.com/ai/providers/openrouter" \
-H "Authorization: Bearer your-api-key"
{
"success": true,
"note": "The stored OpenRouter key was removed. Screenshot configurations using this provider will fail with ai_provider_not_configured until a new key is stored."
}
Bring Your Own AI Errors
These codes are returned with success: false and a note that explains what to do. They are checked before any credit is used or any screenshot is taken.
| error_code | Meaning |
|---|---|
| byok_plan_required (402) | Bring Your Own AI is an addon for paid screenshot plans. Pick a plan first, then add the addon. |
| byok_addon_required (402) | Your plan is active but the Bring Your Own AI addon is not. Add it from Plans and Addons. |
| ai_provider_not_configured (412) | No verified key is stored for that provider. Store one with the store key endpoint. |
| ai_provider_unsupported (400) | ai_provider must be pagepixels, anthropic, openai or openrouter. |
| ai_model_required (400) | ai_model is required for OpenAI and OpenRouter when no default model is stored. |
| ai_model_not_supported (400) | The model is not in the provider's compatible list. It may lack image input, be retired, or be a batch variant. |
| ai_provider_key_rejected (401) | The provider rejected the key. It is marked unverified until you verify a working key. |
| ai_provider_unavailable (503) | The provider could not be reached to verify the key or list models. Try again in a moment. |
| invalid_ai_structured_fields (400) | The ai_structured_fields list is invalid. The note names the field and the problem. |
Support
Questions? Contact us anytime by email:
support-tickets@pagepixels.com
Or send us a message through our Support page.