API Reference

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:

Endpoints

MethodPathPurposeRecommended Use
POST/v1/video/generationsSubmit a video generation taskCommon TENSORAXIS video task entry for Seedance/Doubao
GET/v1/video/generations/{task_id}Fetch a video generation taskPaired with the submit endpoint above
POST/v1/videosOpenAI/Sora-style task submitSora/OpenAI-compatible clients
GET/v1/videos/{task_id}OpenAI/Sora-style task fetchSora/OpenAI-compatible clients
GET/v1/videos/{task_id}/contentProxy video content downloadFetching completed video content

For new Seedance/Doubao integrations, prefer /v1/video/generations.

Request Body

POST /v1/video/generations

FieldTypeRequiredDescription
modelstringYesModel name to call
promptstringYesVideo prompt; empty values return 400 prompt is required
imagestringNoSingle reference image URL; the server normalizes it into images
imagesstring[]NoReference image URLs for image-to-video
metadataobjectNoModel- or provider-specific parameters; Seedance/Doubao advanced parameters go here
secondsstringNoCompatibility field; a positive integer maps to upstream duration for Doubao/Seedance
durationintegerNoCommon task field; for Seedance/Doubao, prefer metadata.duration
sizestringNoSize field used by some video models
modestringNoMode field used by some video models
input_referencestringNoInput 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:

StatusMeaning
SUBMITTED / QUEUEDSubmitted or queued
IN_PROGRESSGenerating
SUCCESSCompleted; read result_url
FAILUREFailed; 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 FieldForwarded Upstream As
promptcontent[].text
images[]content[].image_url.url
secondsduration
metadata.resolutionresolution
metadata.ratioratio
metadata.durationduration
metadata.framesframes
metadata.seedseed
metadata.camera_fixedcamera_fixed
metadata.watermarkwatermark
metadata.generate_audiogenerate_audio
metadata.draftdraft
metadata.service_tierservice_tier
metadata.return_last_framereturn_last_frame
metadata.execution_expires_afterexecution_expires_after
metadata.callback_urlcallback_url
metadata.toolstools

Notes:

  • metadata.model is removed and cannot override the billed model.
  • metadata fields that do not map to the current adaptor structure are usually not forwarded upstream.
  • metadata.content is an advanced internal compatibility field and may override the content list generated from images; 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.