Cancel a response
Call Create response first, then replace resp_123 with the returned ID.
/model/v1/responses/{response_id}/cancel◐ PartialRequest parameters
response_idstringrequiredpath: Id of the stored response, the
idreturned 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
Request
curl
# Call Create response first, then replace resp_123 with the returned ID.
curl -X POST https://api.deepraxis.com/model/v1/responses/resp_123/cancel \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# Call Create response first, then replace resp_123 with the returned ID.
from openai import OpenAI
client = OpenAI(
base_url="https://api.deepraxis.com/model/v1",
api_key="$PRAXIS_API_KEY",
)
resp = client.responses.cancel("resp_123")TypeScript
// Call Create response first, then replace resp_123 with the returned ID.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.deepraxis.com/model/v1",
apiKey: "$PRAXIS_API_KEY",
});
const resp = await client.responses.cancel("resp_123");Response 200
{
"id": "resp_9ab4b2568fb041209b41d303c03e7c62",
"object": "response",
"status": "cancelled",
"background": true,
"store": true,
"model": "deepseek-flash",
"created_at": 1791870824,
"output": [],
"usage": null,
"error": null
}Response
HTTP 200
Native Responses API cancel response
application/json
| Name | Type | Description |
|---|---|---|
| $ | object |