Cancel a restoration
pinin_cancel_restorationCancels a queued photo restoration before processing starts, so no credit is charged or refunded. Fails with too_late_to_cancel once the pipeline has already picked up the job.
Instructions
Cancel a restoration that has not started processing. A queued job has not been charged, so cancelling costs nothing and refunds nothing; once the pipeline has picked it up the call fails with too_late_to_cancel and the credit stands. Check pinin_get_restoration first when the state is unknown. Writes job state — with pinin_restore_photo it is the only tool that changes anything.
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": {
"id": "<id>"
},
"name": "pinin_cancel_restoration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Restoration id to cancel — the `id` field from pinin_restore_photo or pinin_list_restorations. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Restoration id. | |
| error | No | `{ code, message }`, for example `too_late_to_cancel`. | |
| object | No | Always `restoration`. | |
| status | No | `cancelled` on success. | |
| credits | No | Credits charged — zero for a job cancelled while queued. |