Encoding your image
Before submitting, you need to convert your image file into a Base64 string. Any standard Base64 encoder will work.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.POST to /v2/analyses
Send a The API returns HTTP
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.201 Created with the ID and location of your new analysis, exactly as it does for URL-based analyses.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.