Create Video Task
Submit a text-to-video or image-to-video task. The endpoint returns a task ID that can be passed to the status endpoint.
Request Conventions
| Item | Value |
|---|---|
| Base URL | https://token.wdcloud.ai |
| Authentication header | Authorization: Bearer <API_KEY> |
| JSON content type | Content-Type: application/json |
Endpoint
POST /v1/video/generations
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | No | Model or style ID |
prompt | string | No | Text description of the video |
image | string | No | Image URL or Base64 data for image-to-video generation |
duration | number | No | Video duration in seconds |
fps | integer | No | Video frame rate when supported by the adaptor |
seed | integer | No | Random seed |
n | integer | No | Number of videos to generate |
metadata | object | No | Adaptor-specific options, such as resolution (480p/720p/1080p/4k), ratio (16:9/4:3/1:1/3:4/9:16/21:9/adaptive), generate_audio (default true), watermark (default false), and provider-specific fields |
metadata.resolution | string | No | Output resolution tier: 480p, 720p, 1080p, or 4k |
metadata.ratio | string | No | Output aspect ratio: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, or adaptive |
metadata.generate_audio | boolean | No | Generate audio; defaults to true and controls whether the generated video includes audio synchronized with the visuals |
metadata.watermark | boolean | No | Add a watermark; true includes a watermark and false omits it; defaults to false |
Example
bash
curl -X POST "https://token.wdcloud.ai/v1/video/generations" \
-H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"prompt": "A paper airplane gliding over a quiet lake at sunrise.",
"duration": 5,
"metadata": {
"resolution": "720p",
"ratio": "16:9",
"generate_audio": true,
"watermark": false
}
}'