Generate media with Chutes
generate_mediaGenerate images, videos, music, or speech from a model payload, then save the resulting asset to your workspace and return its path; supports editing with local file references.
Instructions
Run a generation and save the asset into the workspace. params is the payload you composed from describe_media_model. For editing, params may reference workspace file paths (e.g. image, mask) which the server reads and encodes. The asset is saved under output_dir (default ./assets/chutes//) and the saved path is returned. Long video/music jobs block with progress updates.
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>",
"kind": "<kind>",
"params": "<params>"
},
"name": "generate_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cord | No | Operation/cord (e.g. img2img); defaults to the primary one. | |
| kind | Yes | ||
| model | Yes | ||
| params | Yes | Payload matching the cord's input schema. | |
| filename | No | ||
| overwrite | No | Explicitly replace an existing asset and sidecar. | |
| output_dir | No | Output directory relative to CWD. | |
| timeout_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cord | Yes | ||
| cost | No | ||
| kind | Yes | ||
| path | Yes | ||
| bytes | Yes | ||
| model | Yes | ||
| durationMs | Yes | ||
| schemaHash | No | ||
| contentType | Yes | ||
| provenancePath | No |