latestOpenAPI 3.1.02026-08-2098498535.8 KB

9c12cd88093a

tasks

Create a video indexing task

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

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

<Note title="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. </Note>

Upload options:

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

Your video files must meet requirements based on your workflow:

  • Search: Marengo requirements.
  • Video analysis: Pegasus requirements.
  • If you want to both search and analyze your videos, the most restrictive requirements apply.
  • This method allows you to upload files up to 2 GB in size. To upload larger files, use the Multipart Upload API

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

<Note title="Note"> This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page. </Note>
post/tasks

Headers

x-api-keystring required

Your API key.

<Note title="Note"> You can find your API key on the <a href="https://playground.twelvelabs.io/dashboard/api-keys" target="_blank">API Keys</a> page. </Note>

Response

A video indexing task has successfully been created.

_idstring

A string representing the unique identifier of your video indexing task.

video_idstring

A string representing the unique identifier of the video associated with the specified video indexing task.