Build
Updated
Retrieve, cancel and delete
Read a stored response back by id, including the usage you were charged for, cancel one, or delete one response.
Every response the API creates is stored. You can read it back by id, cancel it, and delete it.
The Node and Python examples use a client set up for this API.
Retrieve a response
Section titled “Retrieve a response”curl https://api.helping.io/v1/responses/resp_… \ -H "Authorization: Bearer $HELPINGIO_API_KEY"const response = await client.responses.retrieve("resp_…");console.log(response.status, response.usage);response = client.responses.retrieve("resp_…")print(response.status, response.usage)The body is the same response object POST /v1/responses returns.
{ "background": false, "completed_at": 1767225600, "conversation": null, "created_at": 1767225600, "error": null, "frequency_penalty": 0.0, "id": "resp_ZXhhbXBsZS9yZXNwL3JldHJpZXZlAAAAAAAAAAAAAAAAAAAAAAAAAA", "incomplete_details": null, "instructions": null, "max_output_tokens": null, "max_tool_calls": null, "metadata": null, "model": "anthropic/claude-sonnet-5", "object": "response", "output": [ { "content": [ { "annotations": [], "logprobs": [], "text": "Stored for later.", "type": "output_text" } ], "id": "msg_00000000000000000000000000000001", "role": "assistant", "status": "completed", "type": "message" } ], "parallel_tool_calls": true, "presence_penalty": 0.0, "previous_response_id": null, "prompt_cache_key": null, "reasoning": null, "safety_identifier": null, "service_tier": "default", "status": "completed", "store": true, "temperature": 1.0, "text": { "format": { "type": "text" } }, "tool_choice": "auto", "tools": [], "top_logprobs": 0, "top_p": 1.0, "truncation": "disabled", "usage": { "input_tokens": 100, "input_tokens_details": { "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 20, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 120 }}Retrieval exists for two jobs:
- Finishing long work. A non-streaming request that hits its
90 second wait returns an
in-progress object. Poll this endpoint until
statusis terminal:completed,incomplete,failedorcancelled. A streaming request whose stream closed at the 300 second ceiling works the same way. - Billing reconciliation.
usagelives on the stored response, so a client whose connection dropped can find out what it was charged. A failed response retrieves with itsusageand itserror.
Two properties differ from what you may expect of other Responses APIs:
- Retrieval reflects the response’s current state, not a snapshot frozen at the moment it was first returned. A response that has since finished reads as finished.
- A response still waiting on your tool output retrieves with its
function_callitems, a status ofcompleted, andusage. That turn is finished, and the work waiting is yours. Like everyusagehere, the figure covers the whole exchange so far rather than the one turn, so a conversation that runs through several tool rounds reports the running total each time. A response still in progress omitsusageentirely until it settles, so read it with a presence check rather than expecting a null.
Cancel a response
Section titled “Cancel a response”curl -X POST https://api.helping.io/v1/responses/resp_…/cancel \ -H "Authorization: Bearer $HELPINGIO_API_KEY"await client.responses.cancel("resp_…");client.responses.cancel("resp_…")Cancel works on any response your key created. OpenAI cancels only a
response created with background: true. This API creates no response in
the background, so POST /v1/responses/{id}/cancel cancels any response the
calling key created, including one still being generated after its request
returned. A response that has already finished is returned unchanged.
Delete a response
Section titled “Delete a response”curl -X DELETE https://api.helping.io/v1/responses/resp_… \ -H "Authorization: Bearer $HELPINGIO_API_KEY"await client.responses.delete("resp_…");client.responses.delete("resp_…"){ "deleted": true, "id": "resp_ZXhhbXBsZS9yZXNwL2RlbGV0ZQAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "object": "response.deleted"}This deletes one response. It stops being readable, it can no longer be
continued through previous_response_id, and its messages and tool calls drop
out of its conversation’s item
list. Later turns in the conversation no
longer send its messages to the model or count them against the context
window. Every other response in the conversation is untouched, and the
conversation itself stays usable.
Deleting the same response twice is not an error, so a retry is safe. Once
its conversation has been deleted, deleting one of its responses is a 404.
To remove a whole history rather than one turn, delete the conversation:
DELETE /v1/conversations/{id}.
Ownership and the uniform 404
Section titled “Ownership and the uniform 404”These endpoints, and every route of the Conversations
API, answer one 404 for every reason you might not
have access to a response or a conversation: a malformed id, an id that does not exist, a response created by
another organization, or a response created by a different API key in your
own organization. The envelope is the same in every case, with type
not_found_error and code resource_not_found.
{ "error": { "message": "Unknown response id", "type": "not_found_error", "param": null, "code": "resource_not_found" }}The practical consequence: use the same API key to retrieve and delete that you used to create. A rotated key keeps access to its conversations; revoking a key ends it.
Rate limits on these endpoints
Section titled “Rate limits on these endpoints”Retrieving, canceling and deleting are rate limited separately from creating responses. See Rate limits.