Generate video
generate_videoStart generating a NEW video from a text prompt in a thread (create one with create_thread first). modelKey comes from list_models (a video model) and durationSeconds must be one that model supports. Spends credits; use estimate_cost first if unsure. Optionally pass sourceFileIds (file ids from upload_image or the library) as start/reference frames. Returns immediately with a nodeId and status; poll get_generation_status until it is COMPLETED or FAILED.
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": {
"threadId": "<threadId>",
"prompt": "<prompt>",
"modelKey": "<modelKey>",
"durationSeconds": "<durationSeconds>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | What to generate. | |
| modelKey | Yes | Video model key from list_models. | |
| threadId | Yes | Thread to generate in. | |
| resolution | No | Resolution. Defaults to 480p. | |
| aspectRatio | No | Aspect ratio. Defaults to auto. | |
| sourceFileIds | No | Optional input image file ids. | |
| durationSeconds | Yes | Clip length in seconds; must be supported by the model. |