Skip to navigation

Create a video indexing task

This method will be removed in a future version. New implementations should use direct or multipart uploads followed by separate indexing.

This method creates a video indexing task that uploads and indexes a video in a single operation.

Adding videos to existing indexes

You can no longer add videos to an index that has only Pegasus 1.2 enabled. When you add videos to an index that has both Marengo and Pegasus 1.2 enabled, the platform indexes them with Marengo only.

Upload options:

  • Local file: Use the video_file parameter.
  • Publicly accessible URL: Use the video_url parameter.

Your videos must meet requirements based on your workflow:

Indexes have limits on video hours and video count. For details, see the Video hours and video count limits section.

Note

This endpoint is rate-limited. For details, see the Rate limits page.

Authentication

x-api-keystring

Your API key.

Note

You can find your API key on the API Keys page.

Request

Request to upload a video to an index.
index_idstringRequired
The unique identifier of the index to which the video is being uploaded.
video_filefileOptional
Specify this parameter to upload a video from your local file system.
video_urlstringOptional
Specify this parameter to upload a video from a publicly accessible URL.
enable_video_streambooleanOptionalDefaults to true

This parameter indicates if the platform stores the video for streaming. When set to true, the platform stores the video, and you can retrieve its URL by calling the GET method of the /indexes/{index-id}/videos/{video-id} endpoint. You can then use this URL to access the stream over the HLS protocol.

user_metadatastringOptional

Metadata that helps you categorize your videos. You can specify a list of keys and values. Keys are strings, and values can be a string, a number, a boolean, or an array of strings. Send an integer wider than 53 bits (-9007199254740991 to 9007199254740991), and any identifier you want preserved verbatim, as a string. Send this value as a JSON-encoded string.

Response

A video indexing task has successfully been created.
_idstringOptional
A string representing the unique identifier of your video indexing task.
video_idstringOptional
A string representing the unique identifier of the video associated with the specified video indexing task.

Errors

400
Bad Request Error