Skip to main content
When you create an analysis, you send an input object that tells EyeQuant what to analyze and how. This object captures everything the API needs to locate or receive your image, understand how it will be seen by real viewers, and apply any pre-processing steps before predictions are run.

Input Types

The type field determines what form your content takes. EyeQuant currently supports two input types:
typeDescription
webPageUrlA URL of a web page. EyeQuant fetches the page and takes a screenshot.
imageA Base64-encoded PNG or JPEG image.
When you use webPageUrl, EyeQuant’s screenshot service loads the page in a simulated browser and captures the result automatically. When you use image, you supply the image data directly as a Base64-encoded string in the content field.

Medium

The medium field tells EyeQuant’s algorithms how the analyzed image is presented to its viewers. Setting this correctly ensures predictions are calibrated to the right viewing context.
mediumDescription
desktopWebWeb page viewed in a desktop browser.
mobileWebWeb page viewed in a mobile browser.
genericThe target medium doesn’t fit any other category.
When using the webPageUrl input type, only desktopWeb and mobileWeb are valid medium values. Because the screenshot is always taken from a browser simulation, a generic medium is not applicable.

Title

The title field is a human-readable label for your input. It is used for display purposes in the EyeQuant web interface and does not affect how predictions are calculated. Giving each input a descriptive title makes it easier to identify analyses later.

removeCookieBanner

The removeCookieBanner boolean parameter controls whether EyeQuant’s screenshot service attempts to dismiss or remove a cookie consent banner before capturing the page. This is only relevant when using the webPageUrl input type. Set it to true if you want the screenshot to reflect the page content without an overlay obscuring it.

Examples

The following examples show two common configurations for the input object. Taking a screenshot of a URL and simulating a mobile browser:
{
  "type": "webPageUrl",
  "content": "http://example.com",
  "medium": "mobileWeb",
  "title": "Example"
}
Uploading a Base64-encoded PNG of a desktop web mockup:
{
  "type": "image",
  "content": "iVBORw0KGgo...rkJggg==",
  "medium": "desktopWeb",
  "title": "Example"
}
For details on the image dimensions and file size limits that apply when using type: image, see Image Format Requirements and Size Limits.