Create video
Create an OpenRouter-compatible asynchronous video generation job.
POST /api/v1/videos
Returns 202 Accepted with a public video generation response. Unknown body fields such as routing, metadata, webhook_url, priority, or idempotency fields are rejected.
Back to Videos endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | Video model ID, for example dreamina-seedance-2-0-260128. |
prompt | string | yes | Text prompt for the video generation. |
aspect_ratio | string | no | Supported aspect ratio such as 16:9, 9:16, or 1:1. Do not send with size. |
callback_url | string | no | HTTPS URI for completion notifications, max 1000 characters. |
duration | integer | no | Requested video length in seconds, >= 1. |
frame_images | object[] | no | First-frame or last-frame image inputs. |
frame_images[].type | string | yes | Must be image_url for each frame image item. |
frame_images[].image_url.url | string | yes | Remote image URL for the first or last frame. |
frame_images[].frame_type | string | yes | Frame placement, either first_frame or last_frame. |
generate_audio | boolean | no | Whether audio should be generated when supported. |
input_references | object[] | no | Reference image, audio, or video inputs. |
input_references[].type | string | yes | Reference kind: image_url, audio_url, or video_url. |
input_references[].image_url.url | string | conditional | Remote image URL when type is image_url. |
input_references[].audio_url.url | string | conditional | Remote audio URL when type is audio_url. |
input_references[].video_url.url | string | conditional | Remote video URL when type is video_url. |
provider.provider_id | string | no | Provider ID used to route the request, for example byteplus. |
provider.options | object | no | Provider-keyed options, for example { byteplus: { ... } }. |
resolution | string | no | Supported resolution such as 480p, 720p, or 1080p. Do not send with size. |
sr | object | no | Video super resolution configuration. Only this endpoint supports SR, and only sr.resolution is accepted. |
sr.resolution | string | no | Target SR resolution: 720p, 1080p (default), 1440p, 2160p, or 4k. The service preserves the original aspect ratio and maps this value to the LAS target width. |
seed | integer | no | Deterministic seed when supported by the model. |
size | string | no | Allowed values: 480x480, 480x640, 480x720, 480x854, 480x1120, 640x480, 720x480, 720x720, 720x960, 720x1080, 720x1280, 720x1680, 854x480, 960x720, 1080x720, 1080x1080, 1080x1440, 1080x1620, 1080x1920, 1080x2520, 1120x480, 1280x720, 1440x1080, 1620x1080, 1680x720, 1920x1080, 2160x2160, 2160x2880, 2160x3240, 2160x3840, 2160x5040, 2520x1080, 2880x2160, 3240x2160, 3840x2160, 5040x2160. Use either size or resolution/aspect_ratio, not both. |
Request examples
curl "https://api.globalrouter.com/api/v1/videos" \
-H "Authorization: Bearer $GR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan3.0-video",
"prompt": "使用图1以及图2中的角色形象,生成一段两人结婚的视频,保持角色外观一致。",
"duration": 3,
"resolution": "720p",
"aspect_ratio": "16:9",
"generate_audio": true,
"provider": {
"provider_id": "ali",
"options": {
"ali": {
"media": [
{
"type": "reference_image",
"url": "https://zj-sinnet.tos-s3-cn-shanghai.volces.com/new-api/uploads/2026/08/07/dc8d5041-bf65-4368-bd87-6a8c418b1e95.png"
},
{
"type": "reference_image",
"url": "https://zj-sinnet.tos-s3-cn-shanghai.volces.com/new-api/uploads/2026/08/07/f309c8b8-d595-4475-8831-8ea870bd4b37.png"
}
],
"prompt_extend": true
}
}
}
}'Response fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | GlobalRouter video generation job ID. |
polling_url | string | yes | Relative URL for polling the job. |
status | string | yes | pending, in_progress, completed, failed, cancelled, or expired. |
error | string | no | Failure message when available. |
generation_id | string | no | Upstream provider generation ID when available. |
unsigned_urls | string[] | no | GlobalRouter artifact URLs for completed jobs. |
usage | object | no | Usage summary with cost and optional BYOK status. |
usage.video_generation_cost_cny | number | no | CNY cost for the original video generation when SR is requested. |
usage.sr_cost_cny | number | no | CNY cost for video super resolution when SR is requested. |
Response example
{
"id": "job_123",
"polling_url": "/api/v1/videos/job_123",
"status": "pending",
"generation_id": "cgt_123"
}Notes
- Official Wan source: https://help.aliyun.com/en/model-studio/wan3-video-generation-api-reference. The examples translate native input.prompt/media and parameters into the unified prompt, input_references/frame_images, resolution and duration. GlobalRouter handles native async headers; do not send X-DashScope-Async to this endpoint.
- Official Kling source: https://kling.ai/document-api/apiReference/model/textToVideo (legacy v1/videos/text2video). Use the public model kling-v2.6-pro, not native model_name. Put mode/negative_prompt under provider.options.kling. The current adapter does not forward native sound, callback_url or external_task_id; these examples do not promise native-field passthrough.
- Laid Dreamina uses https://api.globalrouter.ai, provider laid and public dreamina- model IDs. Assets must match the selected provider and account/line and be Active. Asset references never select the provider. See /docs/seedance#laid-dreamina for model mapping and asset creation.
- Use callback_url for completion notifications. Download completed artifacts from GET /api/v1/videos/{jobId}/content.
- Examples accept provider strings or objects. With an object, place provider-specific options under provider.options[provider_id].
- Example scenarios: text-to-video, image-first-frame, reference-material.
- Ali Wan3.0 supports wan3.0-video and wan3.0-video-prime with provider: ali. Use input_references with nested image_url.url, video_url.url, or audio_url.url for reference materials; use frame_images for first-frame or first-and-last-frame generation.
- For Ali Wan3.0, reference images and frame_images are mutually exclusive. Keep reference materials and frame inputs in separate requests as shown in the examples.
- Use either size or resolution/aspect_ratio, not both.
- Inside sr, only resolution is accepted. provider, mode, and other extra properties are rejected.
- With SR, the response exposes one final video: the enhanced video on success or the original video when SR fails.