Get Started - Image API

Supported Image Formats

Image Analysis Endpoints

The Verity image analysis endpoints are:

POST /image/classification

Initiates a new image analysis.

GET /image/classification/{uuid}/status

Returns the status of the image analysis.

GET /image/classification/{uuid}

Returns processed results.

Image URL Requirements

In the POST image/classification endpoint, you’ll specify the URL of an individual image for analysis. The URL specified in <IMAGE_URL> must meet the following requirements:

  • Start with http:// or https://.

  • Have a properly URL-encoded address.

  • Any request parameter values must be properly URL-encoded.

Example Image Request

This example shows a request to analyze the following image URL:

https://media3.s-nbcnews.com/j/newscms/2020_18/2724881/190122-handguns-new-york-cs-1005a_ae30ba7e5164f948822ba8d42c3db791.fit-1240w.jpg

Step 1 – Submit a POST request via curl to /image/classification

Submit an analysis request. Specify an individual image URL. 

curl -X POST "https://verity-api.gumgum.com/image/classification" -H "accept: */*" -H "x-api-key: abd" -H "Content-Type: application/json;charset=UTF-8" -d "{\"url\": \"https://media-cldnry.s-nbcnews.com/image/upload/t_fit-1240w,f_auto,q_auto:best/newscms/2020_18/2724881/190122-handguns-new-york-cs-1005a.jpg\"}"

Verity API returns a JSON response with  Content-Type: application/json; charset=UTF-8  showing showing a uuid for the request and current request status, for example:

{ "uuid": "c7bcbe04-ea77-4808-8e91-28d325d1b1fc", "url": "https://media3.s-nbcnews.com/j/newscms/2020_18/2724881/190122-handguns-new-york-cs-1005a_ae30ba7e5164f948822ba8d42c3db791.fit-1240w.jpg", "acceptedAt": "2021-06-10T00:05:22.508Z" }

For a list of supported status messages, refer to Application Status Codes.

Step 2 – Submit a GET request to /image/classification/{uuid}/status

Submit a GET request to /image/classification/{uuid}/status specifying the uuid returned in the previous step. Within a short period, once analysis of the image is complete, a status change occurs. For example:

curl -H 'x-api-key: <YOUR_API_KEY_HERE>' https://verity-api.gumgum.com/image/classification/c7bcbe04-ea77-4808-8e91-28d325d1b1fc/status

Verity API returns a JSON response with  Content-Type: application/json; charset=UTF-8  showing the request has the following status: 

Step 3 – Submit a GET request to /image/classification/{uuid} 

Submit a GET request to /image/classification/{uuid} , specifying the uuid returned in the response during Step 1. Within a short period, once analysis of the image is complete, a status change occurs. For example:

Example Image JSON Response Body

The JSON response details the complete brand safety, keyword, and categorization analysis data for the image.  See JSON Response for details about the fields included in the response.

More Information

 


The contents of these documents and any attachments contain GumGum, Inc. confidential information and are legally protected from disclosure.