Generate a video
generate_videoSubmit a text-to-video job. Billed per second of the requested length plus a $0.01 call fee when the provider accepts the job; a job that fails is refunded. Poll video_status with the returned request_id.
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": {
"prompt": "<prompt>"
},
"name": "generate_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Video model. | |
| prompt | Yes | What happens in the clip. | |
| duration | No | Clip length in seconds. | |
| resolution | No | 480p | |
| aspect_ratio | No | Optional aspect ratio such as 16:9 or 9:16. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present on a failed call: category (client, wallet, topxai, upstream, budget), message, charged, charged_usd. | |
| model | No | ||
| status | No | ||
| charged | No | Whether the wallet was debited for this call. | |
| duration | No | ||
| request_id | No | The job id to poll with video_status. | |
| resolution | No | ||
| charged_usd | No | The recorded wallet debit in USD, model price and call fee included. | |
| call_fee_usd | No | ||
| billing_request_id | No | The relay request id of the charge. |