cancel_generation
Stop a generation that's still running, and ask its provider to stop too. A provider that has already started on it may still finish it, and bill for it; the generation's usage then shows what it used, once the provider reports it.
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": {
"generation_id": "<generation_id>"
},
"name": "cancel_generation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| generation_id | Yes | The generation, from create_generation. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | `gen_…`. | |
| error | Yes | Why it failed. | |
| model | Yes | The model it uses, `author/model`. | |
| usage | Yes | What the provider reported using, once it has succeeded, or once a cancelled one's task has ended (none used when the provider stopped it in time). | |
| inputs | Yes | The assets it was given. | |
| output | Yes | Where its files are saved. | |
| params | Yes | The model's parameters it was given, as the model's `params` schema describes them. | |
| prompt | Yes | The prompt it was given, when it was given one. | |
| status | Yes | `running`, `succeeded`, `failed` or `cancelled`. | |
| outputs | Yes | The assets it made, once it has succeeded. | |
| provider | Yes | The provider that served it, once one has. | |
| created_at | Yes | RFC 3339. | |
| project_id | Yes | The project its assets go in. | |
| updated_at | Yes | RFC 3339: when its status last changed. |