Start a video
generate_videoCreates a video from a prompt and optional images using a Kunavo video model, charges the prepaid balance, and returns a task ID to track progress with get_task.
Instructions
Start generating a video with a Kunavo video model (endpoint video in list_models), from a prompt and optionally from images. Spends the balance, and video is the dearest thing here: a model is priced per video or per second of video (its listed price is in list_models), and a higher resolution costs more. What was charged is what get_usage reports. A clip takes from half a minute to several minutes, so this returns a task id; follow it with get_task. Starting it twice makes and charges two videos, unless the second call carries the first one's idempotency_key.
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": {
"model": "<model>",
"prompt": "<prompt>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | A model id from list_models with endpoint video. | |
| images | No | Optional source images. One image as the first frame needs a model with the image-to-video capability; two (first and last frame) need first-last-frame; references need reference-image, and no more than the model's max_reference_images in list_models. Without any, the model needs text-to-video. Each: An https:// URL, or the path of a local PNG, JPEG, WebP or GIF file (25 MB at most), which is uploaded for you. | |
| prompt | Yes | Description of the shot. | |
| duration | No | Clip length in whole seconds, on a model priced per second: these are the seconds charged, and a length outside the model's range (`duration_seconds` in list_models) is refused. When left out, the model's default length is made and charged. A model priced per video does not read it. | |
| image_mode | No | How the images are used. "frame" (default): one image is the first frame, two are the first and last frame. "reference": style or subject references that are not shown as frames; how many a model takes is its max_reference_images in list_models. | |
| resolution | No | Resolution tier: one of the ids list_models gives under `tiers` for the model, e.g. "720p" or "1080p". It sets the price. A value that is none of the model's tiers is refused by the API with a 400 that lists them, and is not charged. | |
| aspect_ratio | No | Shape of the clip, e.g. "16:9" or "9:16". | |
| wait_seconds | No | How long to wait for the result before returning, in seconds (0 to 45, default 0). An unfinished task is returned with its id. | |
| idempotency_key | No | Any string of your own, 128 characters at most. Calling again with the same one and the same arguments returns the task that call started instead of starting, and charging, another. A key stands for one request for as long as the API keeps its task: the API refuses it for a request on another tool, for another model or with other arguments, so use a new one for each new request. When left out, one is made and given back in the answer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Task id: img_… (image), vid_… (video) or msc_… (music). | |
| kind | Yes | ||
| urls | Yes | Result files once completed: the images, the video, or the audio of each track. | |
| error | Yes | ||
| model | Yes | ||
| status | Yes | queued, in_progress, completed or failed. Anything else is a task that is not finished. | |
| tracks | No | Music only: one entry for each track. | |
| stalled | Yes | true when the task has gone longer than expected without finishing. | |
| archived | Yes | true: every URL in `urls` is Kunavo's own copy and does not expire. false: a file could not be archived and its URL is the model provider's temporary one. null until completed. | |
| next_step | Yes | What to do with this result. | |
| created_at | Yes | ||
| resolution | No | Video only. | |
| completed_at | Yes | ||
| pollable_until | Yes | The task can be read with get_task at least until then. | |
| idempotency_key | No | The key this task was started under, in the answer of the tool that started it (get_task does not know it). Calling that tool again with it and the same arguments returns this task. | |
| duration_seconds | No | Video only. |