Cancel an in-flight chat completion
Aborts a streaming chat completion that is still in progress. Commits actuals up to the abort point against the credit hold and releases the remainder. Returns the final-state ChatCompletionResponse.
State machine:
pending— hold placed, dispatch not yet started → released, statuscancelled_by_request.processingAND in-flight on this instance → upstream aborted, partial actuals committed,cancelled_by_request.processingon a previous deploy → 409chat_cancel_target_not_cancellable(no cross-instance signalling in v1.0; pollGET /v1/chat/completions/:idfor the final state).- already terminal → 409
chat_cancel_target_already_terminal. - id unknown or cross-team → 404
chat_cancel_target_not_found.
Authorizations
Your team API key (starts with al_live_).
Headers
Optional API version pin (YYYY-MM-DD). Defaults to your team's pinned version, or the system default 2026-05-15 for unauthenticated requests.
^\d{4}-\d{2}-\d{2}$"2026-05-15"
Path Parameters
Opaque chat completion id (cmp_).
"cmp_01HXMQ7Z3K8Y2ABCDEFGHJKM"
Response
Cancelled (or already-completed if a race occurred during cancel).
Opaque chat-completion id.
"cmp_01HXMQ7Z3K8Y2ABCDEFGHJKM"
chat.completion Unix timestamp (seconds).
1731948000
Aurous model slug used.
"aurous-grow-2.0-pro"
Always exactly 1 entry in v1.0.
Aurous extension: terminal state of the chat completion. completed is the normal happy path. in_progress means the request is still being processed (only possible when polling GET /:id during a streamed request). failed means the provider or platform errored — see error for the typed reason. cancelled means a cancel was requested or the client disconnected.
completed, in_progress, failed, cancelled "completed"
Aurous extension: present only when status is failed or cancelled (in addition to the main error response when applicable). Echoes the typed error envelope shape so customers can branch on error.code without parsing string messages.
{
"code": "chat_provider_unavailable",
"type": "server_error",
"message": "Provider request failed."
}
