/
Get Started - Video API

Get Started - Video API

 

Video Endpoints

The GumGum Contextual video analysis endpoints are:

HTTP Request

POST

HTTP Request

POST

Authorization Header

X-api-key: value

GumGum Contextual Endpoint

https://verity-api.gumgum.com/video/classification

Body

{ "url": "https://www.youtube.com/watch?v=lGOofzZOyl8", "description": "lawyer gets stuck on Zoom kitten filter during court case", "title": "I'm not a cat'", "languageCode": "en", "partnerVideoId": "UUID", "publisherId": "UUID", "callbackUrl": "URL value" }

HTTP Request

GET

HTTP Request

GET

Authorization Header

X-api-key: value

GumGum Contextual Endpoint

https://verity-api.gumgum.com/video/classification/{uuid}

HTTP Request

GET

HTTP Request

GET

Authorization Header

X-api-key: value

GumGum Contextual Endpoint

https://verity-api.gumgum.com/video/classification/{uuid}/status

Example Video Request

This example walks through analyzing an english language video at the URL:

https://www.youtube.com/watch?v=lGOofzZOyl8

{ "url": "https://www.youtube.com/watch?v=lGOofzZOyl8", "description": "lawyer gets stuck on Zoom kitten filter during court case", "title": "I'm not a cat'", "languageCode": "en", "partnerVideoId": "UUID", "publisherId": "UUID", "callbackUrl": "URL value" }

The url specified in the body 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.

 

Request fields provided in body:

Field

Requirement

Description

Field

Requirement

Description

url

required

Video url for the asset to process

description

optional

Video description provided by client

title

optional

Video title provided by client

languageCode

optional

Video language. If the field is not provided, GumGum Contextual will attempt to infer the language by analyzing the content of the video.

partnerVideoId

optional

Unique Video identifier provided by client.

publisherId

optional

Unique identifier for the publisher of the video.

callbackUrl

optional

If provided, GumGum Contextual will push Video Classification results to this endpoint after the video has processed successfully.

Step 1 – Submit a POST video classification request  

To start the video analysis, submit a POST request via curl to /video/classification. Optionally, include the language code parameter:

curl -H 'x-api-key: <YOUR_API_KEY_HERE>' -X POST -d '{"url":"'I'm not a cat': lawyer gets stuck on Zoom kitten filter during court case "languageCode": "en"}'  https://verity-api.gumgum.com/video/classification

 

Response:

Field

Description

Field

Description

uuid

Unique identifier generated by GumGum Contextual

url

Video url provided by client

acceptedAt

ISO-8601 formatted timestamp represented when the video was first accepted by GumGum Contextual for processing

 

Valid HTTP status codes:

Status Code

Description

Status Code

Description

202

Video was accepted by GumGum Contextual for classification

500

Internal Server Error. Please contact customer support.

Example:

 

Once the video classification request is sent, if a callback url was provided, results will be sent to the webhook endpoint.

Step 2 – GET status of request

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

 

Request fields provided as path values:

Field

Requirement

Description

Field

Requirement

Description

uuid

required

Unique identifier generated by GumGum Contextual.

Example:

curl --location 'https://verity-api.gumgum.com/video/classification/3abddc97-5186-511b-b343-a9aee316b698' \

--header ‘{api_key}’

 

Response:

 

Step 3 – Get response

Submit a GET request to /video/classification/{uuid}, specifying the uuid returned in the response in Step 1 to get the results, this endpoint will not returned status and will only return results once the status changes to PROCESSED otherwise will return 404 not found,  the JSON video classification results are returned in the data payload.

Request fields provided as path values

Field

Type

Description

Field

Type

Description

uuid

request

Unique identifier generated by GumGum Contextual

Example:

 

Example Video JSON Response Body

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

 

More Information

 

Related content


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