Video Generation
Submit video generation tasks, poll task status, and pass Seedance/Doubao advanced parameters through TENSORAXIS.
Video generation is asynchronous: submit a task to get a task_id, poll the task status, then read the video URL after completion.
For Seedance/Doubao video models, use the TENSORAXIS request fields prompt, images, and metadata. Do not send the upstream Volcengine-style top-level content[] body directly to /v1/video/generations; TENSORAXIS will not find a prompt field and will return 400 prompt is required.
Per-Model Pages
This page covers the shared submit, fetch, and polling flow. For each video family's capability matrix, request fields, per-capability examples, and parameter tables, see the dedicated pages:
- SeeDance Video Generation — Volcengine Ark Doubao Seedance (text/image-to-video, first/last frame, video reference/continuation)
- HappyHorse Video Generation — Alibaba Cloud Bailian DashScope (text/image/reference-to-video, video editing)
Endpoints
| Method | Path | Purpose | Recommended Use |
|---|---|---|---|
POST | /v1/video/generations | Submit a video generation task | Common TENSORAXIS video task entry for Seedance/Doubao |
GET | /v1/video/generations/{task_id} | Fetch a video generation task | Paired with the submit endpoint above |
POST | /v1/videos | OpenAI/Sora-style task submit | Sora/OpenAI-compatible clients |
GET | /v1/videos/{task_id} | OpenAI/Sora-style task fetch | Sora/OpenAI-compatible clients |
GET | /v1/videos/{task_id}/content | Proxy video content download | Fetching completed video content |
For new Seedance/Doubao integrations, prefer /v1/video/generations.
Request Body
POST /v1/video/generations
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name to call |
prompt | string | Yes | Video prompt; empty values return 400 prompt is required |
image | string | No | Single reference image URL; the server normalizes it into images |
images | string[] | No | Reference image URLs for image-to-video |
metadata | object | No | Model- or provider-specific parameters; Seedance/Doubao advanced parameters go here |
seconds | string | No | Compatibility field; a positive integer maps to upstream duration for Doubao/Seedance |
duration | integer | No | Common task field; for Seedance/Doubao, prefer metadata.duration |
size | string | No | Size field used by some video models |
mode | string | No | Mode field used by some video models |
input_reference | string | No | Input reference used by some OpenAI/Sora-compatible flows; not used in Seedance/Doubao examples |
Correct and Incorrect Examples
Incorrect: sending the upstream top-level content[] body directly to TENSORAXIS.
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "An old man wearing a hat smiles and walks forward"
}
]
}Correct: use TENSORAXIS request fields and let the relay translate them.
{
"model": "doubao-seedance-2-0-260128",
"prompt": "An old man wearing a hat smiles and walks forward",
"images": ["https://example.com/reference.jpg"],
"metadata": {
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"camera_fixed": true,
"watermark": false
}
}Submit a Task
curl https://api.tensoraxis.ai/v1/video/generations \
-H "Authorization: Bearer $TENSORAXIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-260128",
"prompt": "An old man wearing a hat smiles and walks forward",
"images": ["https://example.com/reference.jpg"],
"metadata": {
"resolution": "1080p",
"ratio": "16:9",
"duration": 5,
"camera_fixed": true,
"watermark": false
}
}'A successful submit response returns a public task ID. Fields can vary slightly by video channel, but usually include:
{
"id": "task_xxxxx",
"task_id": "task_xxxxx",
"object": "video",
"model": "doubao-seedance-2-0-260128",
"status": "queued",
"progress": 0,
"created_at": 1760000000
}Save id or task_id for polling.
Fetch a Task
If you submit through the common video task endpoint, poll with:
curl https://api.tensoraxis.ai/v1/video/generations/task_xxxxx \
-H "Authorization: Bearer $TENSORAXIS_API_KEY"The common fetch response uses the task wrapper shape:
{
"code": "success",
"message": "",
"data": {
"task_id": "task_xxxxx",
"status": "SUCCESS",
"progress": "100%",
"result_url": "https://example.com/video.mp4",
"fail_reason": ""
}
}Common status meanings:
| Status | Meaning |
|---|---|
SUBMITTED / QUEUED | Submitted or queued |
IN_PROGRESS | Generating |
SUCCESS | Completed; read result_url |
FAILURE | Failed; read fail_reason |
The OpenAI/Sora-style fetch path is:
curl https://api.tensoraxis.ai/v1/videos/task_xxxxx \
-H "Authorization: Bearer $TENSORAXIS_API_KEY"That path returns an object: "video" response and, on success, exposes the video URL as url, video_url, and metadata.url.
Seedance/Doubao metadata
For Doubao/Seedance channels, TENSORAXIS converts prompt, images, and metadata into the Volcengine content generation task shape:
| TENSORAXIS Request Field | Forwarded Upstream As |
|---|---|
prompt | content[].text |
images[] | content[].image_url.url |
seconds | duration |
metadata.resolution | resolution |
metadata.ratio | ratio |
metadata.duration | duration |
metadata.frames | frames |
metadata.seed | seed |
metadata.camera_fixed | camera_fixed |
metadata.watermark | watermark |
metadata.generate_audio | generate_audio |
metadata.draft | draft |
metadata.service_tier | service_tier |
metadata.return_last_frame | return_last_frame |
metadata.execution_expires_after | execution_expires_after |
metadata.callback_url | callback_url |
metadata.tools | tools |
Notes:
metadata.modelis removed and cannot override the billed model.metadatafields that do not map to the current adaptor structure are usually not forwarded upstream.metadata.contentis an advanced internal compatibility field and may override the content list generated fromimages; public integrations should not use it.- Valid values, enums, and actual upstream behavior are defined by the official Volcengine documentation for the selected model. This page only documents how the current TENSORAXIS relay receives and forwards fields.
Polling Recommendations
- Wait 2-5 seconds before the first poll after submission.
- Poll every 5-10 seconds while the task is generating.
- Do not use high-frequency polling as a replacement for callbacks; queue large batches in your application.
- If you receive
429, reduce concurrency and retry with exponential backoff.