Create an async embedding task
This endpoint creates embeddings for audio and video content asynchronously.
<Note title="Note">
This method only supports Marengo version 3.0 or newer.
</Note>
**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 3840x2160 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: 2 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.
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-key" target="_blank">API Key</a> page.
</Note>
Request
This endpoint expects an object.
input_type
The type of content for which you wish to create embeddings.
**Values**:
- `audio`: Audio files
- `video`: Video content
Allowed values:
model_name
The model you wish to use.
audio
This field is required if input_type is audio.
video
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.
Allowed values:
data
An array of embedding results when status is ready, or null when status is processing or failed.