Skip to main content
POST
/
v1
/
video
/
generations
curl --request POST \
  --url https://toapis.com/v1/video/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2",
    "prompt": "A calm sunrise over the ocean, with gentle waves and cinematic lighting.",
    "duration": 10,
    "ratio": "16:9"
  }'
{
  "id": "tsk_vid_xxx",
  "object": "generation.task",
  "model": "seedance-2",
  "status": "in_progress",
  "progress": 50,
  "created_at": 1778569600,
  "metadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.toapis.com/llms.txt

Use this file to discover all available pages before exploring further.

  • Supports seedance-2 and seedance-2-fast
  • Supports text-to-video generation
  • Supports first-frame image-to-video through image_urls
  • Async task workflow with task ID based status queries

Authorizations

Authorization
string
required
All requests require Bearer Token authentication.
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"seedance-2"
required
Video generation model name.Available models:
  • seedance-2 - Standard version
  • seedance-2-fast - Fast version
prompt
string
required
Video prompt. Describe subject, action, camera movement, and visual style clearly.
duration
integer
default:5
Video duration in seconds.Supported range: 4 to 15 seconds.
ratio
string
Video aspect ratio.Options:
  • 16:9
  • 9:16
  • 1:1
  • 4:3
We recommend explicitly setting ratio.
image_urls
string[]
First-frame image URL array for image-to-video.Only the first image is used.Image requirements:
  • Format: JPEG, JPG, PNG, WEBP
  • File size: up to 10MB

Use Uploaded Assets

If you have already uploaded private assets through the avatar asset APIs and obtained an asset_id, you do not need to send the original file URL again in the generation request. Use:
  • asset://<ASSET_ID>
This applies to:
  • Private virtual avatar assets
  • Private real avatar assets
  • Image, video, and audio assets that have finished processing and are in active status
Before using an uploaded asset in video generation, make sure you complete this flow:
  1. Create an asset group or complete real-person verification first
  2. Upload the asset and obtain asset_id
  3. Poll the asset status until it becomes active
  4. Use asset://<ASSET_ID> in the generation request
You can use these guides to complete asset onboarding:

How To Reference Assets In Generation Requests

Image assets can be used as:
  • first_frame
  • last_frame
  • reference_image
Video assets can be used as:
  • reference_video
Audio assets can be used as:
  • reference_audio
Minimal example:
{
  "model": "seedance-2",
  "prompt": "Keep the same person from image 1 and let them slowly turn around in front of a floor-to-ceiling window with a gentle camera push-in.",
  "image_with_roles": [
    {
      "url": "asset://asset_img_01KXXXXXXX",
      "role": "reference_image"
    }
  ]
}
Example with video and audio references:
{
  "model": "seedance-2",
  "prompt": "Keep the character from image 1, follow the camera movement of video 1, and match the rhythm and mood of audio 1 to generate an indoor talking-head video.",
  "image_with_roles": [
    {
      "url": "asset://asset_img_01KXXXXXXX",
      "role": "reference_image"
    }
  ],
  "video_with_roles": [
    {
      "url": "asset://asset_vid_01KXXXXXXX",
      "role": "reference_video"
    }
  ],
  "audio_with_roles": [
    {
      "url": "asset://asset_aud_01KXXXXXXX",
      "role": "reference_audio"
    }
  ]
}
Only assets with active status can be used for video generation.If you pass asset://<ASSET_ID> while the asset is still processing or has already failed, the generation request may fail or produce poor results.

Response

id
string
Unique task ID for status queries.
object
string
Object type, always generation.task.
model
string
Model name used.
status
string
Task status.
  • queued
  • in_progress
  • completed
  • failed
progress
integer
Task progress percentage (0 to 100).
created_at
integer
Task creation timestamp (Unix timestamp).
metadata
object
Task metadata.
curl --request POST \
  --url https://toapis.com/v1/video/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "seedance-2",
    "prompt": "A calm sunrise over the ocean, with gentle waves and cinematic lighting.",
    "duration": 10,
    "ratio": "16:9"
  }'
{
  "id": "tsk_vid_xxx",
  "object": "generation.task",
  "model": "seedance-2",
  "status": "in_progress",
  "progress": 50,
  "created_at": 1778569600,
  "metadata": {}
}

Query Task

The submit endpoint returns a task ID. Query status and result with:
curl --request GET \
  --url https://toapis.com/v1/video/generations/{task_id} \
  --header 'Authorization: Bearer YOUR_API_KEY'