API reference
Create a response.
const url = 'https://api.helping.io/v1/responses';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"background":true,"conversation":{"id":"example"},"frequency_penalty":1,"include":["reasoning.encrypted_content"],"input":[{"id":"example"}],"instructions":"example","max_output_tokens":1,"max_tool_calls":1,"metadata":"example","model":"example","parallel_tool_calls":true,"presence_penalty":1,"previous_response_id":"example","prompt_cache_key":"example","reasoning":{"effort":"none","summary":"concise"},"safety_identifier":"example","service_tier":"auto","store":true,"stream":true,"stream_options":{"include_obfuscation":true},"temperature":1,"text":{"format":{"type":"text"},"verbosity":"low"},"tool_choice":"none","tools":[{"description":"example","name":"example","parameters":"example","strict":true,"type":"function"}],"top_logprobs":1,"top_p":1,"truncation":"auto","user":"example"}'};
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 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "background": true, "conversation": { "id": "example" }, "frequency_penalty": 1, "include": [ "reasoning.encrypted_content" ], "input": [ { "id": "example" } ], "instructions": "example", "max_output_tokens": 1, "max_tool_calls": 1, "metadata": "example", "model": "example", "parallel_tool_calls": true, "presence_penalty": 1, "previous_response_id": "example", "prompt_cache_key": "example", "reasoning": { "effort": "none", "summary": "concise" }, "safety_identifier": "example", "service_tier": "auto", "store": true, "stream": true, "stream_options": { "include_obfuscation": true }, "temperature": 1, "text": { "format": { "type": "text" }, "verbosity": "low" }, "tool_choice": "none", "tools": [ { "description": "example", "name": "example", "parameters": "example", "strict": true, "type": "function" } ], "top_logprobs": 1, "top_p": 1, "truncation": "auto", "user": "example" }'Send input and a model, or continue an existing conversation with
previous_response_id. The API keeps the history, so a later turn sends
only the new input.
Set stream: true to receive server-sent events instead of one body.
Without it the request waits a bounded time and, if the response is not
finished by then, returns it in progress for you to retrieve by id.
To answer a tool call, send its result as a function_call_output item
on the next turn, quoting the call_id from the call.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The response to create.
The body of a create-response request.
Fields you omit take their defaults, and fields this API does not recognize are ignored rather than refused, so a newer client stays compatible with an older server.
Every field of this body has one of four outcomes on this API: it is applied, it is refused with an error that names it, it is accepted and not applied, or it is advisory and the response reports what was applied rather than what you sent. The generation settings are applied when the model supports them, and refused with an error that names the model and the field when it does not.
truncation IS applied: disabled, the default, refuses a turn that will
not fit the model’s context window, and auto lets the oldest turns be
dropped so it fits.
The compatibility page says which outcome each field has, and its tables are generated from the same classification the server refuses from.
object
Runs the response in the background.
Not accepted today: background: true is refused. A non-streaming
request that outlives its wait window already returns the response
in progress for you to retrieve later, which covers the same need.
Penalty applied in proportion to how often a token has appeared.
Applied when the model accepts it. When the model does not, or the value is outside the range the model accepts, the request is refused with an error that names the model and the field. The response reports the value it was generated with, and 0 when no penalty was applied.
Extras to return that are omitted by default.
An input item, discriminated by type.
object
A message item, discriminated by role.
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
A message item, discriminated by role.
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
A message item, discriminated by role.
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
A message item, discriminated by role.
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
An input item, discriminated by type.
object
An input item, 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
An input item, 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
An input item, discriminated by type.
object
A pointer to an item that already exists, by id.
object
Steering text for this turn only.
Applies to this request and is not inherited by later turns.
Caps the tokens this response may produce.
The smallest accepted value is 16.
Caps how many tool calls the model may make while generating this response.
Counts every tool call, not only built-in tools, across every turn of
the response. Your organization’s policy also limits how many calls one
turn may make. Calls past either limit are neither returned nor run,
and helpingio:tool_calls_dropped on the response says how many were
cut. The smallest accepted value is 1.
Arbitrary metadata to attach, echoed back on the response.
The model to run, either bare or as provider/model.
Whether the model may request several tool calls at once.
Applied when the model accepts it. When the model does not, or the value is outside the range the model accepts, the request is refused with an error that names the model and the field. The response reports the value it was generated with, and true when none was set.
Penalty applied to tokens that have already appeared.
Applied when the model accepts it. When the model does not, or the value is outside the range the model accepts, the request is refused with an error that names the model and the field. The response reports the value it was generated with, and 0 when no penalty was applied.
Continues the conversation that produced this response id.
The API keeps the history, so a later turn sends only the new input rather than replaying what came before.
A key that groups requests which share a prompt prefix.
Advisory. What this API does with it is on the compatibility page.
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
An opaque identifier for the end user this request is on behalf of, used to detect abuse by one end user without restricting your whole key.
Sent on the model calls this response makes for your request, where the model’s provider has a per-end-user field, as a keyed hash of your value rather than the value itself. The response reports the value you sent. A request that sends tool output keeps the value of the request that asked for the tool call.
Whether the response is stored so it can be retrieved later.
Defaults to true, and true is the only value this API accepts today:
store: false is refused rather than silently stored.
Streams the response as server-sent events instead of returning it in one body.
Sampling temperature.
Applied when the model accepts it. When the model does not, or the value is outside the range the model accepts, the request is refused with an error that names the model and the field. When you omit it, the model’s own default applies. The response reports the temperature it was generated with, and 1 when none was set.
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
The tools the model may call on this turn.
A tool offered to the model, discriminated by type.
object
How many alternative tokens to report log probabilities for.
No current model returns log probabilities, so a request that sets this is refused with an error that names the model and the field. The response reports 0.
Nucleus sampling cutoff.
Applied when the model accepts it. When the model does not, or the value is outside the range the model accepts, the request is refused with an error that names the model and the field. When you omit it, the model’s own default applies. The response reports the value it was generated with, and 1 when none was set.
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.
Deprecated in favor of safety_identifier.
When safety_identifier is absent, this value is used as it would
be: the end user this request is on behalf of. When both are sent,
safety_identifier is used. It does not group requests for caching.
Responses
Section titled “ Responses ”The response. With stream: true the body is a server-sent event stream instead, whose events carry this same object at its terminal (see the StreamingEvent schema). A non-streaming request waits up to 90 seconds; if the response is not finished by then it is returned in progress, with the same id, a status of queued or in_progress, and an empty output, rather than as an error. It keeps running, so retrieve it by that id for the result. A streamed response has no such bound.
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"}Malformed body, unknown/ambiguous model, or unsupported parameter (the error envelope)
Missing or invalid API key (the error envelope)
The organization has no payment method on file, so nothing was started.
The key is not entitled to what the request asked for (the error envelope)
No such previous_response_id, or one this key cannot reach.
The Idempotency-Key was already used and its result cannot be returned for this request, or its first request is still being processed (the error envelope)
A rate limit, a spend budget or the organization’s credit balance refused this request, or the model provider rate limited it; the error code says which.
The request could not be completed; quote the x-request-id response header when reporting it.
The model provider did not complete the request; retry shortly.
The request could not be served this instant and nothing was created; retry after the Retry-After header.
The wait for a result ended before one was available and no response could be read back for it.