API references/Video
Generate videos
video.any.generateChoose a model and supported video specifications.
Unit price$0.715 / 1 request
Try in the consoleRequest parameters
| Parameter | Type | Description |
|---|---|---|
modelRequired | string | kling-v4-flash kling-v4-flashDefault: "kling-v4-flash" |
promptRequired | string | Generation prompt Minimum length: 1Up to 3000 characters |
aspect_ratio | string | 16:9 16:9Default: "16:9" |
duration_seconds | integer | Fixed output specification Range 5–5Default: 5 |
image_url | string | Reference image HTTPS URL Minimum length: 1Up to 4096 characters |
resolution | string | 720p 720pDefault: "720p" |
Response data
Business data is in execution.result.data. Executions also include status, final cost and an Anyuse request ID.
| Parameter | Type | Description |
|---|---|---|
files | array | Output files. Each item has url and kind; download url with the same Bearer credential. Links can expire. |
files[].kindRequired | string | files[].kind |
files[].urlRequired | string | files[].url |
files[].content_type | string | files[].content_type |
files[].duration | number | string | files[].duration |
files[].duration_seconds | number | string | files[].duration_seconds |
files[].file_size | number | string | files[].file_size |
files[].filename | string | files[].filename |
files[].height | number | string | files[].height |
files[].size | number | string | files[].size |
files[].width | number | string | files[].width |
Execution states and recovery
Submission returns a task ID. Query the execution for the final result. Polling of submitted upstream tasks resumes after a service restart.