Skip to content

Video generation

ru-llm exposes video generation (doubao-seedance-2-0-260128) through an asynchronous, job-based endpoint: you submit a prompt, poll for the job, then download the result.

Flow

  1. Submit a generation jobPOST /v1/video/generations, returns a task_id.
  2. Poll the jobGET /v1/video/generations/{task_id} until status is succeeded.
  3. Download the result — fetch result_url from the completed job.

1. Submit

Terminal window
curl https://api.ru-llm.relay2.xyz/v1/video/generations \
-H "Authorization: Bearer sk-ru-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-260128",
"prompt": "A timelapse of clouds over a mountain range at sunrise",
"duration": 5
}'
{ "task_id": "vid_abc123", "status": "queued" }

2. Poll

Terminal window
curl https://api.ru-llm.relay2.xyz/v1/video/generations/vid_abc123 \
-H "Authorization: Bearer sk-ru-YOUR_KEY"
{ "task_id": "vid_abc123", "status": "succeeded", "result_url": "https://.../vid_abc123.mp4" }

status progresses queuedrunningsucceeded (or failed). Poll every few seconds.

3. Download

Terminal window
curl -L "https://.../vid_abc123.mp4" -o out.mp4

Billing

Seedance is billed per the doubao-seedance-2-0-260128 rate on the Models & Pricing page. The charge applies when the job completes successfully; failed jobs are not billed.

Troubleshooting

SymptomCauseFix
404 Not FoundEndpoint not yet mounted (see preview note)Use chat/messages until the video surface ships.
Job stuck runningLong renderKeep polling; renders take minutes.
result_url 403/expiredURL past its ~24h windowRe-submit the job to regenerate.
402 Payment RequiredZero balanceTop up in the console → Billing.