How to AI Analyze and Compare Multiple Images with the Screenshot API

Learn how you can use the Screenshot API to automatically analyze, compare, and contrast multiple images with PagePixels' built-in AI analysis capabilities.

Introduction

PagePixels' Screenshot API can help you analyze, compare, and extract insights from multiple screenshots and other images.

To accomplish this, you can use the Screenshot API's Multiple Image AI Analysis endpoint. This endpoint can send up to 5 images and 5 custom text prompts to OpenAI (creators of ChatGPT) for AI visual analysis at one time.

  • An image can be a direct link to a screenshot or any PNG, JPEG, WEBP, or GIF image file up to 20MB in size.
  • A prompt can refer to any image, compare multiple images, and be up to 2000 characters.
  • Each prompt and each image submitted for analysis uses 1 AI Analysis Credit. For instance, the example in this tutorial uses 5 AI Analysis credits to analyze 2 images and 3 prompts.

AI Analysis functionality is ready to go in PagePixels. No OpenAI keys are required, and all PagePixels accounts get 25 FREE AI Analysis credits per month.

This tutorial provides an example of how you can use the Multiple Image AI Analysis endpoint to analyze and compare two images guided by three prompts.

How to analyze and compare multiple images using the Screenshot API

To analyze and compare multiple images using the Multiple Image AI Analysis endpoint of the Screenshot API:

1

Get your API Key

You can access your API Key in two locations:

  • While signed in, go to the Authentication section of the API documentation. Copy the Private API Key value.
  • Or click on "Profile" in the right sidebar, navigate to "API Keys", and copy the Private API Key value.
2

Run AI Analysis

POST
/ai/analyze
$ 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/15e416bf-44fc-4c11-a58c-a539b1d29abb/f116729e0d400d-1735569001008.jpg", "https://cdn.pagepixels.com/15e416bf-44fc-4c11-a58c-a539b1d29abb/1d956cf59ece00-1735309803108.jpg" ], "prompts": [ "Please describe the second image.", "Please describe the first image.", "Compare and contrast the two images." ] }'

Make a POST request to the ai/analysis endpoint to run an AI analysis on multiple images.

Copy the example above and replace the value of the access_token with your API Key.

Update the values in the urls and prompts arrays with the direct links to the images you want to analyze and the prompts you would like to use.

Once updated, paste the request into your terminal and press enter.

Note: cURL must be already installed for this to work.

3

Check the AI Analysis responses

json response
{
  "success":true,
  "result":
  {
      "urls":
      [
          "https://cdn.pagepixels.com/15e416bf-44fc-4c11-a58c-a539b1d29abb/f116729e0d400d-1735569001008.jpg",
          "https://cdn.pagepixels.com/15e416bf-44fc-4c11-a58c-a539b1d29abb/1d956cf59ece00-1735309803108.jpg"
      ],
      "prompts":
      [
          "Compare and contrast the two images.",
          "Please describe the first image.",
          "Please describe the second image."
      ],
      "responses":
      [
          "The first image shows a TradingView chart for the Euro/U.S. Dollar (EUR/USD) exchange rate. The current rate is 1.0397 USD, with a decrease of 0.00234 USD (-0.22%). The chart is in red, indicating a decline. There's also historical performance data showing different time frames, all with negative percentages except for 'All time' which shows a 93.74% increase.","The second image also depicts a TradingView chart for the Euro/U.S. Dollar (EUR/USD) exchange rate. The rate is 1.0431 USD with an increase of 0.00116 USD (+0.11%). The chart is green, signifying a rise. Historical performance data for different periods shows mostly negative percentages, except for '1 day' (0.08%) and '5 days' (0.71%) which are positive, as well as 'All time' showing a 94.33% increase.","Both images present a TradingView chart of the Euro/U.S. Dollar (EUR/USD) exchange rate. The first image shows a declining trend with a red chart, while the second shows a rising trend with a green chart. Although historical data is presented in both, there are differences in the rates and changes. The first image has a current rate of 1.0397 USD with a decrease, whereas the second image displays a rate of 1.0431 USD with an increase. Additionally, other time frames indicate similar historical trends, except for minor differences in percentages."
      ]
  }
}

If the previous step was successful, you'll receive the responses array containing the results of the AI's analysis.

See our Screenshot API documentation for more comprehensive information.

What else can PagePixels do?

When you use PagePixels' Screenshot API for your screenshot automation needs, you can also:

  • Use the Snap endpoint to take an instant one-time screenshot.
  • Click buttons, fill out forms, perform a search, and more - all before taking a screenshot - with Multi-Step Screenshots functionality.
  • Automatically take screenshots and have an AI analyze the resulting images with the AI Analysis Screenshot feature.
  • Convert data from third-party APIs, HTML emails, and other HTML content into screenshots using the Custom HTML Screenshots endpoint.
  • Capture screenshots from thousands of locations around the world with the Screenshot API's Real Location Screenshots feature.
  • Dynamically display and share the latest screenshots on your website or app with a single Embed URL. Embed URLs are available for every create screenshot endpoint.
  • Use the Screenshot API's Extract HTML option to fetch the raw HTML from a web page (instead of taking a screenshot).
  • Leverage no-code integration platforms Zapier and Make (Integromat) to automatically capture, AI analyze, and send screenshots to thousands of services and apps, such as Google Sheets, Google Drive, and OneDrive.

Explore even more possibilities of what you can do on our Features page →

Support

Questions? Contact us anytime by email:

support-tickets@pagepixels.com

Or send us a message through our Support page.