v3

latestOpenAPI 3.1.02026-07-3197486526.1 KB
embed > v2 > tasks

Create an async embedding task

This endpoint creates embeddings for audio and video content asynchronously.

When to use this endpoint:

  • Process audio or video files longer than 10 minutes
  • Process files up to 4 hours in duration
<Accordion title="Input requirements"> **Video**: - Minimum duration: 4 seconds - Maximum duration: 4 hours - Maximum file size: 4 GB - Formats: [FFmpeg supported formats](https://ffmpeg.org/ffmpeg-formats.html) - Resolution: 360x360 to 5184x2160 pixels - Aspect ratio: Between 1:1 and 1:2.4, or between 2.4:1 and 1:1

Audio:

  • Minimum duration: 4 seconds
  • Maximum duration: 4 hours
  • Maximum file size: 4 GB
  • Formats: WAV (uncompressed), MP3 (lossy), FLAC (lossless) </Accordion>

Creating embeddings asynchronously requires three steps:

  1. Create a task using this endpoint. The platform returns a task ID.
  2. Poll for the status of the task using the GET method of the /embed-v2/tasks/{task_id} endpoint. Wait until the status is ready.
  3. Retrieve the embeddings from the response when the status is ready using the GET method of the /embed-v2/tasks/{task_id} endpoint.
<Note title="Notes"> - Creating a task validates only basic metadata and playability, not the full file. A file can pass this check but still fail later during embedding. When you retrieve the results, check the [`status`](/v1.3/api-reference/create-embeddings-v2/retrieve-embeddings#response.body.status) field. If it is `failed`, the [`error.message`](/v1.3/api-reference/create-embeddings-v2/retrieve-embeddings#response.body.error.message) field contains the reason. - This endpoint is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page. - Embeddings are stored for seven days. </Note>
post/embed-v2/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>

Request body

input_type'audio' | 'video' required

The type of content for the embeddings.

Values:

  • audio: Audio files
  • video: Video content
model_name'marengo3.0' required

The model you wish to use. Value: "marengo3.0".

Response

An embedding task has successfully been created.

_idstring required

The unique identifier of the embedding task

status'processing' required

The initial status of the embedding task.