v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-2114136159.9 KB
Responses

Cancel a response

Request cancellation of a response. Acts on durable state, so it works for background responses that outlive the client connection as well as durably routed foreground responses. The cancel is asynchronous: a 200 acknowledges the request (status cancelling) and the run stops shortly after. Poll the retrieve endpoint for the terminal status. Cancelling a run that is already terminal returns 400. Ownership is enforced server side; an unknown id, or a response belonging to a different account, returns 404.

post/v1/responses/{response_id}/cancel

Path parameters

response_idstring required

ID of the response to cancel (e.g., resp_...).

Response

The cancel request was accepted; the run is being cancelled.

response_idstring required

The response id (resp_...).

status'cancelling' required

Always cancelling: the cancel was accepted and the run stops asynchronously. An already terminal run returns 400 instead, so no terminal status appears here.