Submit a video task

Generate video asynchronously from text or images with the Seedance model family.

POST /v1/videos/generations

Auth: {'type': 'bearer', 'prefix': 'sk-', 'description': 'Pass your API key in the `Authorization: Bearer sk-xxx` header.'}

## Seedance video generation BytePlus Seedance full series (BytePlus ModelArk) asynchronous video generation. **Returns task_id immediately upon submission**, final state retrieved via GET query interface. ### Main features - **Native BytePlus protocol passthrough**: body fields correspond to BytePlus official documentation 1:1 (`content` / `ratio` / `duration` / `generate_audio` / `seed`, etc.), 0 protocol conversion, 0 field magic modification - **Video duration**: uniformly supports **4-15 seconds** range (actual limits vary per model; exceeding this will result in upstream returning 400) - **Audio generation**: Seedance 2.0 / 2.0 Fast / 1.5 Pro supports `generate_audio: true` - **Image-to-video / video continuation**: pass `content[]` array with `image_url` / `video_url` block (Seedance 2.0 V2V) - **Draft preview**: Seedance 1.5 Pro supports `draft_task` continuation ### Official documentation Refer to [BytePlus official documentation](https://docs.byteplus.com/en/docs/ModelArk/2291680) Field semantics / Model differences / Error codes are all consistent with the official specifications. ### Invocation flow 1. POST `/v1/videos/generations` → immediately return `task_id` + `status=processing` 2. GET `/v1/videos/generations/{task_id}` polling → obtain `succeeded` + `content[].video_url` 3. Final state succeeded / failed — platform automatically records on 5 (fee deduction / refund workflow fully closed-loop) Detailed field descriptions + 5 model matrix + V2V / A2V / Draft usage see: [Seedance Video Generation (detailed)](#seedance-video-detailed)

Request body

modelstringrequiredSeedance model ID. All 5 variants: - dreamina-seedance-2-0-260128 (premium, supports V2V/A2V) - dreamina-seedance-2-0-fast-260128 (fast) - seedance-1-5-pro-251215 (Draft preview) - seedance-1-0-pro-250528 (premium balance) - seedance-1-0-pro-fast-251015 (economy fast) - dreamina-seedance-2-0-mini-260615 (lightweight economy, supports V2V)
contentarrayBytePlus native input array (recommended primary usage). 5 types: - text: { type: "text", text: "..." } Text prompt - image_url: { type:"image_url", image_url:{ url, role:"first_frame"|"last_frame"|"reference_image" } } for image-to-video. - video_url: { type:"video_url", video_url:{ url, role:"reference_video" } } for extending a video (Seedance 2.0). - audio_url: { type:"audio_url", audio_url:{ url } } for audio-to-video (Seedance 2.0 A2V). - draft_task: { type:"draft_task", draft_task:{ task_id } } for continuing from a draft (Seedance 1.5 Pro).
resolutionstringResolution
ratiostringBytePlus native aspect ratio
durationintegerVideo duration in seconds. The shared range is 4-15s, and individual models may have different upper limits. Values outside a model’s range return 400. See the [official BytePlus documentation](https://docs.byteplus.com/en/docs/ModelArk/2291680).
generate_audiobooleanGenerate synchronized audio (BytePlus native field). Only supported by Seedance 2.0 / 2.0 Fast / 1.5 Pro
seedintegerRandom seed (0~2^32-1), fixed seeds allow for reproducible similar videos when paired with the same prompt
waitbooleantrue=blocking mode (longest 60s for synchronous result), false=asynchronous immediate return task_id (recommended)

Responses

Example

curl -X POST https://api.router.ai/v1/videos/generations \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dreamina-seedance-2-0-260128",
    "content": [{ "type": "text", "text": "一只猫在海边奔跑" }],
    "ratio": "16:9",
    "duration": 5
  }' 

## Error handling | HTTP status code | Error type | Description | |---|---|---| | 400 | `InvalidParameter` | Parameter error | | 400 | `InvalidParameter.MissingRequired` | Missing required fields (e.g. prompt / model / content[]) | | 400 | `InvalidParameter.NotInEnum` | Invalid enum value (resolution / aspect_ratio / role, etc.) | | 400 | `InvalidParameter.UnsupportedImageFormat` | Unsupported image format | | 400 | `InvalidParameter.UnsupportedVideoFormat` | Unsupported video format | | 400 | `InvalidParameter.UnsupportedAudioFormat` | Unsupported audio format | | 400 | `InvalidParameter.ImageSizeTooLarge` | Image volume exceeds upstream single-file size limit | | 400 | `InvalidParameter.VideoSizeTooLarge` | Input video volume exceeds limit | | 400 | `InvalidParameter.VideoDurationTooLong` | Input video duration exceeds upper limit | | 400 | `InvalidParameter.PromptTooLong` | Prompt character count exceeds model limit | | 400 | `InvalidParameter.UrlNotAccessible` | Upstream download of client-provided image_url/video_url fails | | 400 | `InvalidParameter.UrlInvalid` | Invalid URL format (not http(s) / character error) | | 400 | `InvalidParameter.AspectRatioMismatch` | aspect_ratio does not match the aspect ratio of input image | | 400 | `InvalidParameter.ResolutionNotSupported` | The model does not support specified resolution | | 400 | `InvalidParameter.DurationOutOfRange` | Duration exceeds model-supported range | | 400 | `InvalidParameter.ContentEmpty` | Prompt / content[] all empty | | 400 | `InvalidParameter.UnsupportedRole` | Invalid content[].role | | 400 | `InvalidParameter.DataInspectionFailed` | Input data specification check failed (different from content review dimension) | | 400 | `DataInspectionFailed` | Same as above, no prefix variants | | 400 | `InputImageSensitiveContentDetected` | Input image contains sensitive content (main category) | | 400 | `InputTextSensitiveContentDetected` | Prompt contains sensitive content (main category, subcategory same as Image) | | 400 | `InputVideoSensitiveContentDetected` | Input video contains sensitive content | | 400 | `InputAudioSensitiveContentDetected` | Input audio contains sensitive content | | 400 | `invalid_request_error` | Platform parameter validation failed (model type mismatch / missing required fields, etc.) | | 401 | `unauthorized` | Invalid or missing. Check Bearer sk-xxx header | | 402 | `insufficient_balance` | Insufficient balance. Top up and retry | | 403 | `permission_denied` | Model not authorized / Token banned / Token expired | | 404 | `model_not_found` | The model name is misspelled or the model has been removed. | | 404 | `ResourceNotFound` | Task ID does not exist or has been cleaned after exceeding BytePlus 7-8 day retention period | | 409 | `idempotency_conflict` | Request submitted repeatedly in a short time. Wait a few seconds and retry or modify parameters | | 429 | `rate_limit_exceeded` | RPM/TPM rate limited. See `Retry-After` header for backoff strategy | | 429 | `RateLimitExceeded` | Upstream rate limiting | | 429 | `Throttling` | Upstream rate limiting, same as RateLimitExceeded | | 429 | `ConcurrencyExceeded` | Concurrent requests per moment exceed max_concurrent. Reduce concurrency | | 500 | `internal_error` | Platform service error | | 500 | `InternalError` / `InternalServerError` | Upstream internal error, retry with same strategy as above | | 502 | `service_unavailable` | Upstream channel completely unavailable | | 502 | `BadGateway` | Upstream gateway error | | 503 | `ServiceUnavailable` | Upstream service temporarily unreachable | | 504 | `RequestTimeout` / `ModelTimeoutException` | Upstream inference timeout |

API reference