Task Management
Cancel Task
POST /v1/tasks//cancel — Cancel a queued task
POST
Cancel Task
Cancel a task in the
queued state. Quota is automatically refunded.
Only tasks in the
queued state can be cancelled. Tasks in processing have
already started and cannot be cancelled — the endpoint returns HTTP 400
(code: task_not_cancellable). Queue turnaround is measured in seconds, so the
cancellation window is small; callers should handle the 400 case. A cancelled
task reports cost: 0 when queried (quota refunded).Response
| Field | Description |
|---|---|
refunded | Whether the quota was refunded |
refunded_quota | Amount of quota refunded |
Cancel Task