API reference
Cancel a response.
const url = 'https://api.helping.io/v1/responses/example/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.helping.io/v1/responses/example/cancel \ --header 'Authorization: Bearer <token>'A response that is still being generated stops, and comes back with status
cancelled. You are billed for what had already been produced. A response
that has already finished comes back unchanged.
Only the key that created the response can cancel it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The opaque resp_... id of the response to cancel
Responses
Section titled “ Responses ”The response, as a retrieve would return it. A response that was still being generated is cancelled; one that had already finished is returned unchanged.
A response: one model turn, with everything it produced and the settings it ran under.
The settings are echoed back as they were applied, which is not always what you sent: values you omitted are filled in, and values capped by your organization’s policy are reported at the capped figure.
object
The maximum number of tool calls this response was allowed to make.
The max_tool_calls sent with the request that started the turn, and
null when that request sent none. A request that sends tool output
keeps that value: a max_tool_calls sent with it is ignored.
Whatever metadata you attached to the request, echoed back.
Always present, and null when you attached none.
Always response.
One item of output, discriminated by type.
object
Text you are sending to the model.
object
Text the model produced.
annotations carries any citations for spans of this text.
logprobs carries per-token log probabilities; it is an empty array on
every response this surface produces today, because log probabilities
are never requested from a provider.
object
An annotation attached to a span of output text.
object
The log probability of one output token.
This surface does not produce log probabilities yet: top_logprobs is
accepted and not applied, and include: ["message.output_text.logprobs"]
is accepted and not acted on, so the logprobs arrays that carry this
type are empty on every response today. They are arrays rather than nulls
because the schema requires an array, and an empty one is the honest
answer for “none were produced”.
object
One alternative token the model considered, with its log probability.
object
Plain text, where neither direction is implied.
object
A summary of the model’s reasoning.
object
Reasoning text produced by the model.
object
The model declined to answer, and why.
object
An image you are sending to the model.
image_url accepts a URL or a data URL. detail asks for a
fidelity; omit it to let the model choose.
A file you are sending to the model, by URL or inline contents.
object
A video you are sending to the model.
object
Who a message came from.
How far along an output item is.
in_progress while the item is still being produced, completed when it
is final, and incomplete when the response stopped before the item was
finished.
One item of output, discriminated by type.
object
How far along an output item is.
in_progress while the item is still being produced, completed when it
is final, and incomplete when the response stopped before the item was
finished.
One item of output, discriminated by type.
object
Text you are sending to the model.
object
Text the model produced.
annotations carries any citations for spans of this text.
logprobs carries per-token log probabilities; it is an empty array on
every response this surface produces today, because log probabilities
are never requested from a provider.
object
An annotation attached to a span of output text.
object
The log probability of one output token.
This surface does not produce log probabilities yet: top_logprobs is
accepted and not applied, and include: ["message.output_text.logprobs"]
is accepted and not acted on, so the logprobs arrays that carry this
type are empty on every response today. They are arrays rather than nulls
because the schema requires an array, and an empty one is the honest
answer for “none were produced”.
object
One alternative token the model considered, with its log probability.
object
Plain text, where neither direction is implied.
object
A summary of the model’s reasoning.
object
Reasoning text produced by the model.
object
The model declined to answer, and why.
object
An image you are sending to the model.
image_url accepts a URL or a data URL. detail asks for a
fidelity; omit it to let the model choose.
A file you are sending to the model, by URL or inline contents.
object
A video you are sending to the model.
object
How far along an output item is.
in_progress while the item is still being produced, completed when it
is final, and incomplete when the response stopped before the item was
finished.
One item of output, discriminated by type.
object
Text you are sending to the model.
object
Text the model produced.
annotations carries any citations for spans of this text.
logprobs carries per-token log probabilities; it is an empty array on
every response this surface produces today, because log probabilities
are never requested from a provider.
object
An annotation attached to a span of output text.
object
The log probability of one output token.
This surface does not produce log probabilities yet: top_logprobs is
accepted and not applied, and include: ["message.output_text.logprobs"]
is accepted and not acted on, so the logprobs arrays that carry this
type are empty on every response today. They are arrays rather than nulls
because the schema requires an array, and an empty one is the honest
answer for “none were produced”.
object
One alternative token the model considered, with its log probability.
object
Plain text, where neither direction is implied.
object
A summary of the model’s reasoning.
object
Reasoning text produced by the model.
object
The model declined to answer, and why.
object
An image you are sending to the model.
image_url accepts a URL or a data URL. detail asks for a
fidelity; omit it to let the model choose.
A file you are sending to the model, by URL or inline contents.
object
A video you are sending to the model.
object
Text you are sending to the model.
object
Text the model produced.
annotations carries any citations for spans of this text.
logprobs carries per-token log probabilities; it is an empty array on
every response this surface produces today, because log probabilities
are never requested from a provider.
object
An annotation attached to a span of output text.
object
The log probability of one output token.
This surface does not produce log probabilities yet: top_logprobs is
accepted and not applied, and include: ["message.output_text.logprobs"]
is accepted and not acted on, so the logprobs arrays that carry this
type are empty on every response today. They are arrays rather than nulls
because the schema requires an array, and an empty one is the honest
answer for “none were produced”.
object
One alternative token the model considered, with its log probability.
object
Plain text, where neither direction is implied.
object
A summary of the model’s reasoning.
object
Reasoning text produced by the model.
object
The model declined to answer, and why.
object
An image you are sending to the model.
image_url accepts a URL or a data URL. detail asks for a
fidelity; omit it to let the model choose.
A file you are sending to the model, by URL or inline contents.
object
A video you are sending to the model.
object
Reasoning settings.
On a response this reports the settings that applied. This API does not accept it on a request: sending this field is refused rather than ignored.
object
The service tier this response ran under.
Where this response is in its lifecycle.
One of queued, in_progress, completed, failed, incomplete,
or cancelled. queued and in_progress mean it is still running
and can be retrieved again later; the rest are terminal. Treat it as
an open string so a status added later does not break your client.
Settings for the response text.
The string form of tool_choice.
auto lets the model decide whether to call a tool, required makes it
call one, and none forbids tool calls for this turn.
Requires the model to call one named tool.
object
The allowed_tools form of tool_choice.
object
Requires the model to call one named tool.
object
A tool offered to the model, discriminated by type.
object
What to do when a conversation no longer fits the model’s context window.
auto lets the OLDEST turns be dropped so the request can proceed;
disabled fails the request instead of dropping anything, and is the
default (OpenAI’s default too).
Oldest-first is the same end OpenAI documents dropping from: their own API
reference words auto as “dropping items from the beginning of the
conversation”. The turn the caller just sent is never a candidate.
What this response consumed.
ABSENT while the response is still running, and present once it
settles. A response that is queued or in_progress has spent
nothing you can be billed for yet, so there is no figure to report,
and the field is left out rather than sent as null.
object
A breakdown of the input tokens counted.
Both fields are SUBSETS of input_tokens, not additions to it.
object
Input tokens written INTO the provider’s prompt cache.
A provider that does not charge for a cache write reports 0 here.
Input tokens served from the provider’s prompt cache.
A breakdown of the output tokens counted.
object
Example
{ "output": [ { "content": [ { "type": "input_text" } ], "phase": "commentary", "role": "user", "status": "in_progress", "type": "message" } ], "reasoning": { "effort": "none", "summary": "concise" }, "text": { "format": { "type": "text" }, "verbosity": "low" }, "tool_choice": "none", "tools": [ { "type": "function" } ], "truncation": "auto"}Missing or invalid API key (the error envelope)
The key is not entitled to what the request asked for (the error envelope)
No such response, or one this key cannot reach.
This organization has exhausted its delete and cancel allowance; retry after the Retry-After header.
The request could not be completed; quote the x-request-id response header when reporting it.
The request could not be served this instant; retry after the Retry-After header.