GET 25 FREE SCREENSHOTS PER MONTH  →
API REFERENCE

Multiple Image AI Analysis

Send up to 5 image URLs and 5 prompts to the analyze endpoint and get the AI's answers back as text or as structured JSON, for comparisons and regression tests.

BASE URL https://api.pagepixels.com
GET YOUR FREE API KEY →

Multiple Image AI Analysis and Regression Testing

The Multiple Image AI Analysis feature can integrate AI-based image analysis directly into your workflow. You can submit up to 5 image URLs and 5 AI Prompts.

Prompts can analyze any image in the array or compare multiple images (e.g., “Compare the second and third images"). Prompts can also extract specific details like product prices, or simply describe the content of an image.

Note: AI Analysis is built-in to the Snap Endpoint and Create Endpoint. You do not need to use this endpoint to analyze screenshots. This dedicated endpoint allows you to analyze your own images without using the screenshot functionality.
Upgradeable Feature: Free and paid plans include 25 AI Image Analysis credits per month. Paid users can purchase additional requests at $9.99 per 1,000 credits.

Each image and each prompt sent for analysis counts as an individual "AI Image Analysis Credit" for your PagePixels account.

Bring Your Own AI: add ai_provider and ai_model to run the analysis on your own Claude, OpenAI or OpenRouter account instead. No credits are used and there is no limit on the number of analyses. See Bring Your Own AI.

AI Analysis Request Body Schema

Key Expected Value Description
urls Array of strings Array of image URLs to be analyzed. Each image URL can be a direct link to a PNG, JPEG, WebP, or GIF image file that's no larger than 8MB.
prompts Array of strings Corresponding array of AI prompts. Prompts can reference any image and each prompt can be up to 2500 characters in length.
ai_provider String Optional. anthropic, openai or openrouter to use your own account. Requires the Bring Your Own AI addon and a stored key. Defaults to your credits.
ai_model String Optional. The model to use with your own provider. Falls back to the stored default model.
ai_prompt_mode String Optional. simple (default) answers each prompt with free text. structured returns JSON matching ai_structured_fields. See Structured Data for Multiple Images.
ai_structured_fields Array of objects Required in structured mode. The fields to extract, in the same format as Structured Data for screenshots.
ai_structured_scope String Optional, structured mode only. request (default) returns one object describing all the images together. image returns one object per image, in order.
ai_structured_instructions String Optional, structured mode only. Context for the analysis. Any prompts you send in structured mode are added to it.

AI Image Analysis Endpoint

POST /ai/analyze

Use the post ai/analyze endpoint to submit an array of images and an array of prompts to go along with those images for an AI to analyze.

Example

Note: The example below analyzes 2 images and 3 prompts as part of the POST request, requiring a total of 5 AI Image Analysis Credits to run successfully.
POST REQUEST /ai/analyze bash
curl -X POST "https://api.pagepixels.com/ai/analyze?access_token=your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "prompts": [
      "What is the second image of?",
      "What is the first image of?",
      "Compare and contrast the two images."
    ]
  }'
JSON RESPONSE
{
  "success": true,
  "result": {
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "prompts": [
      "What is the second image of?",
      "What is the first image of?",
      "Compare and contrast the two images."
    ],
    "responses": [
      "The second image promotes the features of...",
      "The first image is about the pricing plans...",
      "Comparison:\n - Both images focus on..."
    ]
  }
}

Example: using your own AI provider

With the Bring Your Own AI addon and a key stored for the provider, add ai_provider and ai_model and the same request runs on your account instead. Nothing else changes. The example below sends the same two images and three prompts to OpenRouter, so it uses no AI Image Analysis credits. Your key is never sent on this request; it is looked up from the one you stored with the store a key endpoint.

POST REQUEST /ai/analyze bash
curl -X POST "https://api.pagepixels.com/ai/analyze?access_token=your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "prompts": [
      "What is the second image of?",
      "What is the first image of?",
      "Compare and contrast the two images."
    ],
    "ai_provider": "openrouter",
    "ai_model": "google/gemini-3.8-flash"
  }'
JSON RESPONSE
{
  "success": true,
  "result": {
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "prompts": [
      "What is the second image of?",
      "What is the first image of?",
      "Compare and contrast the two images."
    ],
    "responses": [
      "The second image promotes the features of...",
      "The first image is about the pricing plans...",
      "Comparison:\n - Both images focus on..."
    ],
    "ai_provider": "openrouter",
    "ai_model": "google/gemini-3.8-flash"
  }
}

Leave out ai_model to use the default model stored with your key. If no key is stored for the provider the request fails with ai_provider_not_configured (412), and a model without image input fails with ai_model_not_supported (400). Claude works the same way with "ai_provider": "anthropic", and OpenAI with "ai_provider": "openai".

Response Breakdown

Key Description
urls Array of the original URLs submitted for analysis.
prompts Array of prompts corresponding to the submitted URLs.
responses Array of AI-generated responses corresponding to each prompt.
ai_provider, ai_model Present when the analysis ran on your own account: the provider and model that did the work.
ai_prompt_mode, ai_structured_scope, ai_structured_fields, ai_structured_response Present for a structured request: the mode, the scope, the fields used, and the result (an object, or an array of objects for the image scope). responses is an empty list in structured mode.

Structured Data for Multiple Images

The same Structured Data you can use on a screenshot works here too. Define the fields you want and the analysis returns JSON that matches them, so a regression check or a comparison across several images drops straight into your code. Set ai_prompt_mode=structured and pass ai_structured_fields. prompts becomes optional; anything you do send is added to the instructions.

Pick a scope with ai_structured_scope: request (the default) answers once for the whole set of images, which suits comparisons. image answers once per image, in the order you sent them, which suits checking many pages against the same checklist.

Credits work as before: one per image and one per prompt, with the schema counting as one prompt when you send none. With your own provider, no credits are used: add ai_provider and ai_model to either example below exactly as in the own-provider example above, and the response gains the same two keys.

Example: one result per image

POST REQUEST /ai/analyze bash
curl -X POST "https://api.pagepixels.com/ai/analyze?access_token=your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "ai_prompt_mode": "structured",
    "ai_structured_scope": "image",
    "ai_structured_instructions": "These are pages from our marketing site.",
    "ai_structured_fields": [
      {"name": "page_loaded", "type": "boolean", "description": "Did the page render without errors?"},
      {"name": "status", "type": "enum", "options": ["ok", "warning", "broken"]},
      {"name": "headline", "type": "string", "description": "the main headline"}
    ]
  }'
JSON RESPONSE
{
  "success": true,
  "result": {
    "urls": [
      "https://cdn.pagepixels.com/4cc8ebae-ea0d-41e3-b766-11d2f805c235/a77787747d21ba-1789523042538.jpg",
      "https://cdn.pagepixels.com/2c9f6245-0fcd-42d7-bf06-6c551148d3f2/d1f9855cab709c-1789523093784.jpg"
    ],
    "prompts": [],
    "responses": [],
    "ai_prompt_mode": "structured",
    "ai_structured_scope": "image",
    "ai_structured_fields": [
      {"name": "page_loaded", "type": "boolean", "description": "Did the page render without errors?"},
      {"name": "status", "type": "enum", "description": "", "options": ["ok", "warning", "broken"]},
      {"name": "headline", "type": "string", "description": "the main headline"}
    ],
    "ai_structured_response": [
      {"page_loaded": true, "status": "ok", "headline": "Scheduled Screenshots"},
      {"page_loaded": true, "status": "warning", "headline": "Pricing"}
    ]
  }
}

Example: one result for the whole set

Leave out ai_structured_scope (or set it to request) and describe the set as a whole. This example compares two captures of the same page:

POST REQUEST /ai/analyze bash
curl -X POST "https://api.pagepixels.com/ai/analyze?access_token=your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": ["https://cdn.pagepixels.com/.../before.jpg", "https://cdn.pagepixels.com/.../after.jpg"],
    "ai_prompt_mode": "structured",
    "ai_structured_instructions": "The first image is yesterday, the second is today.",
    "ai_structured_fields": [
      {"name": "changed", "type": "boolean", "description": "Is there any visible difference between the two?"},
      {"name": "changes", "type": "multi", "options": ["price", "headline", "layout", "images", "navigation"]},
      {"name": "summary", "type": "string", "description": "one sentence describing the difference"}
    ]
  }'
JSON RESPONSE
{
  "success": true,
  "result": {
    "urls": ["https://cdn.pagepixels.com/.../before.jpg", "https://cdn.pagepixels.com/.../after.jpg"],
    "prompts": [],
    "responses": [],
    "ai_prompt_mode": "structured",
    "ai_structured_scope": "request",
    "ai_structured_fields": [ ... ],
    "ai_structured_response": {"changed": true, "changes": ["price"], "summary": "The monthly price changed from $8.99 to $9.99."}
  }
}

A simple request (prompts only) returns exactly what it always has. The structured keys appear only when you ask for them.

Support

Questions? Contact us anytime by email:

Or send us a message through our Support page.

FREE PLAN

Start free. Upgrade when you’re ready.

Every feature and integration is included on the free plan. No credit card and no phone number required.

Free $0 / month
25 screenshots every month
32 MB of Real Location proxy bandwidth
25 AI Analysis credits