Overview
The text-to-video API supports only asynchronous mode. After you call this API, it generates a video generation task based on the input text description and returns the task ID. You need to query the task execution result by calling the /api/v1/tasks/{task_id} API.
API details
Constraints
- The caller must have an API Key. For more information, see Manage AI API Keys.
Request path
POST {BASE_URL}/api/v1/videos/generations
Request header
Name |
Required |
Example value |
Description |
|---|---|---|---|
| Authorization | Yes | Bearer {token} | Authentication information |
| Content-Type | No | application/json | Request body format |
| X-Async | No | enable | Optional. If explicitly set, only supportsenableortrue. If omitted, the default is asynchronous. |
Request parameters
Body
Name |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|
| model | string | Yes | video-gen-model-v1 | Model name. The following models are supported: - Volcano Video Generation Model (for example, doubao-video-v1) - BaiLian Video Generation Model (such as wanx-video-v1) For the specific model list, refer to the documentation of the corresponding vendor: Volcano Engine, Bailian |
Response
Response parameters
Name |
Type |
Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| code | string | Response code |
| message | string | Response information |
| data | object | Business response data |
data
Name |
Type |
Description |
|---|---|---|
| task_id | string | The generated video task ID, used to query the task status and results later. |
Request example
curl --request POST '{BASE_URL}/api/v1/videos/generations' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data '{
"model": "video-gen-model-v1"
}'
Response example
{
"success": true,
"code": "200",
"message": "successful",
"data": {
"task_id": "task-1234567890abcdef"
}
}
