Cancel a response
Call Create response first, then replace resp_123 with the returned ID.
/openai/v1/responses/{response_id}/cancel◐ PartialRequest parameters
response_idstringrequiredpath:
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.
Errors follow the OpenAI format — see error codes
Request
curl
# Call Create response first, then replace resp_123 with the returned ID.
curl -X POST https://api.deepraxis.com/openai/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/openai/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/openai/v1",
apiKey: "$PRAXIS_API_KEY",
});
const resp = await client.responses.cancel("resp_123");Response 200
{
"id": "resp_97762f7678834c93aef6081248145e04",
"object": "response",
"status": "cancelled",
"background": true,
"store": true,
"model": "deepseek-flash",
"created_at": 1790319292,
"output": [],
"usage": null,
"error": null
}Response
HTTP 200
Native Responses API cancel response
application/json
| Name | Type | Description |
|---|---|---|
| $ | object |