Skip to main content
When you have a design mockup, an exported screenshot, or any other PNG or JPEG asset you want to evaluate, you can upload it directly to EyeQuant rather than relying on a live URL. This gives you complete control over exactly what is analyzed — the image is encoded as a Base64 string and sent in the request body alongside the rest of your analysis configuration.

Encoding your image

Before submitting, you need to convert your image file into a Base64 string. Any standard Base64 encoder will work.
On Linux and macOS, you already have the base64 command-line utility available. Run the following to encode an image and write the result to a file:
base64 -i /path/to/image.png > image.png.base64
You can then copy the contents of image.png.base64 into the content field of your request.
1

Encode your image in Base64

Convert your PNG or JPEG file to a Base64 string using the tool or library of your choice. The full encoded string — without any line breaks — becomes the value of the content field in your request body.
2

POST to /v2/analyses

Send a POST request to /v2/analyses with an input type of image. Paste your Base64-encoded image as the content value, and set medium to reflect the context in which the design will be viewed. Replace $apikey with your API credentials.
curl \
  -X POST \
  -H "Authorization: Bearer $apikey" \
  -H "Content-Type: application/json" \
  -d '{
        "input": {
          "type": "image",
          "content": "iVBORw0KGgoAAAANSUhE....FTkSuQmCC",
          "medium": "desktopWeb",
          "title": "Example"
        }
      }' \
  https://api.eyequant.com/v2/analyses
The API returns HTTP 201 Created with the ID and location of your new analysis, exactly as it does for URL-based analyses.
3

Retrieve your results

Poll the location URL returned in the previous step with a GET request until the status field changes from pending to success. Once the analysis completes, the response body contains output URLs for each requested prediction — by default, an attention heatmap at outputs.attention.attentionMap.For a detailed walkthrough of the polling flow, refer to the Analyze URLs guide.
For information on supported file formats, maximum image dimensions, and file size limits, see the Input Formats reference.