Cancel a response
Cancel a model response that is still being generated.
Call Create response first, then replace resp_123 with the returned ID.
/model/v1/responses/{response_id}/cancel◐ PartialRequest parameters
response_idstring必填path: Id of the stored response, the `id` returned by createResponse (it looks like resp_...). An unknown id, a response created with store false, an expired response and another tenant's response all answer 404.
Returns
200 response
Available only for responses created with background:true and routed to a model that can generate in the background. Cancel is idempotent — repeated calls return the same terminal response. Cancelling stops us reading the upstream stream; it cannot guarantee that compute already sent upstream stops, and usage is billed for what was actually received. Calling cancel on a non-background (synchronous) response returns 404 object_not_found if the response id does not exist (not stored, expired or wrong id), or 400 native_responses_operation_unsupported if the response exists but its provider does not declare cancel support (none of the upstreams we connect declares it for synchronous responses). Neither case is the not-implemented 501.
Platform errors (auth, rate limits, validation) and OCR errors use problem+json; other model call errors follow the endpoint's own format (OpenAI or Anthropic) — see error codes
Response
HTTP 200
Native Responses API cancel response
application/json
| Name | Type | Description |
|---|---|---|
| $ | object |