Generate a video
generate_videoStart a video with the selected project key. Unless the user names a model, pick from list_models type=video featured=true, the curated current ones; a model's params.video (detail=full) lists durations, resolutions, aspect ratios and capabilities. A video takes from about 30 seconds to 30 minutes or more: this waits up to about 45 seconds, then returns status processing with id; call get_media_job with it until status is completed or failed. The result is deleted 24 hours after the job ends (1 hour on a zero-retention project) unless store is true. Normal costs and policy checks apply; usage.cost is the charge in USD. Requires runtime:call.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"model": "<model>",
"prompt": "<prompt>",
"uuid": "<uuid>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Runtime API key ID in this project; its secret is never returned | |
| uuid | Yes | Project UUID in the authorized organization | |
| image | No | First frame to animate (needs image_to_video). An https URL or a file_<id>. | |
| model | Yes | Video model id from list_models type=video (featured=true for the curated ones). | |
| store | No | Also save the result to the project's files and return a reusable file_id. Default false: only a temporary link. | |
| prompt | Yes | What the clip shows. | |
| seconds | No | Clip length, within params.video.min_duration and max_duration. | |
| last_image | No | Last frame the clip moves to (needs image and last_frame). An https URL or a file_<id>. | |
| parameters | No | Provider settings, forwarded verbatim. Each model lists the keys it takes in params.video.parameters (list_models detail=full). | |
| resolution | No | Output tier such as 720p or 1080p, from params.video.resolutions. | |
| aspect_ratio | No | Shape such as 16:9 or 9:16, from params.video.aspect_ratios. | |
| reference_images | No | Subject or character images to keep consistent, not frames (needs reference_images). An https URL or a file_<id>. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | No | ||
| next | No | ||
| error | No | ||
| usage | No | ||
| status | Yes | ||
| file_id | No | ||
| mime_type | No | ||
| expires_at | No |