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`](/v1.3/api-reference/create-embeddings-v2/retrieve-embeddings) 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`](/v1.3/api-reference/create-embeddings-v2/retrieve-embeddings) method of the `/embed-v2/tasks/{task_id}` endpoint.
<Note title="Notes">
- 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>
Authentication
x-api-keystring
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
This endpoint expects an object.
input_type
The type of content for the embeddings.
Values:
audio: Audio filesvideo: Video content
model_name
The model you wish to use. Value: "marengo3.0".
audio
This field is required if the input_type parameter is audio.
video
This field is required if the input_type parameter is video.
Response
An embedding task has successfully been created.
_id
The unique identifier of the embedding task
status
The initial status of the embedding task.
data
An array of embedding results when status is ready, or null when status is processing or failed.
Errors
400
Bad Request Error
500
Internal Server Error