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
- Submit a generation job —
POST /v1/video/generations, returns atask_id. - Poll the job —
GET /v1/video/generations/{task_id}untilstatusissucceeded. - Download the result — fetch
result_urlfrom the completed job.
1. Submit
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
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 queued → running → succeeded (or failed). Poll every few seconds.
3. Download
curl -L "https://.../vid_abc123.mp4" -o out.mp4Billing
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
| Symptom | Cause | Fix |
|---|---|---|
404 Not Found | Endpoint not yet mounted (see preview note) | Use chat/messages until the video surface ships. |
Job stuck running | Long render | Keep polling; renders take minutes. |
result_url 403/expired | URL past its ~24h window | Re-submit the job to regenerate. |
402 Payment Required | Zero balance | Top up in the console → Billing. |