Generate media
generateRun one image or video card from get_task: this spends the workspace credits, so ask your human first, naming the card and its price. To run it another way than the card says (another model; a video's length, resolution or sound; an image's shape or size), pass that here, with values from list_models. Refused when the price is no longer accept_price: the error names the price and settings it would run with, so ask your human about that price and call again with it. Read get_task again without seen when the card now leaves out other images. The result lands in the task roll; poll get_task for files.
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": {
"task_id": "<task_id>",
"card": "<card>",
"accept_price": "<accept_price>"
},
"name": "generate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card | Yes | A card id from get_task cards. | |
| model | No | A model id from list_models of the card kind. | |
| task_id | Yes | ||
| duration | No | Video: seconds, from the model durations. | |
| left_out | No | The card's left_out image ids, as get_task listed them. | |
| image_size | No | Image: one of the model sizes. | |
| resolution | No | Video: one of the model resolutions. | |
| accept_price | Yes | The card price your human agreed to; null when get_task shows no price (set when it runs). | |
| aspect_ratio | No | Image: one of the model aspect_ratios. | |
| generate_audio | No | Video: false for a silent clip. |