Skip to main content
POST
Create a model response

Body

application/json

Request body for the OpenAI-compatible Responses API. The primary input field is input.

model
string
required

Model ID to use for this request. Required.

input
required

Text or structured input to the model. Required.

instructions
string | null

System or developer instructions inserted into the model context, separate from input.

max_output_tokens
integer | null

Maximum number of tokens the model may generate in the response.

max_tool_calls
integer | null

Maximum number of tool calls the model may make during generation.

metadata
object | null

Optional key-value metadata attached to the request.

logit_bias
object | null

Mapping from token ID to a bias value added to the token logits.

parallel_tool_calls
boolean
default:true

Whether the model may call multiple tools in parallel.

prompt
object | null

Optional prompt template configuration.

reasoning
object | null

Optional reasoning configuration for supported models.

service_tier
enum<string>
default:auto

Service tier hint for request scheduling.

Available options:
auto,
default,
flex,
scale,
priority
store
boolean
default:false

When data store is enabled on the model, omit this or set it to true to persist the response. false skips storage. When data store is disabled, the response is not stored.

stream
boolean
default:false

If true, stream partial response events as Server-Sent Events (SSE).

temperature
number | null

Sampling temperature; higher values increase randomness.

text
object | null

Text output configuration, including structured output format via text.format.

tool_choice
default:auto

Controls which tool the model calls. Accepts a string (for example, auto, none, required) or an object specifying a function.

tools
object[] | null

Optional list of tool definitions the model may call.

top_logprobs
integer | null
default:0

Return the top N token logprobs at each position when logprobs are enabled.

top_p
number | null

Nucleus sampling cumulative probability threshold.

top_k
integer | null

Keep only the top_k tokens by probability at each generation step.

truncation
enum<string>
default:disabled

Truncation strategy for inputs that exceed the model context window.

Available options:
auto,
disabled
skip_special_tokens
boolean
default:true

Whether to skip special tokens in the generated output.

presence_penalty
number | null

Penalty applied to discourage new token presence.

frequency_penalty
number | null

Penalty applied based on token frequency to reduce repetition.

cache_salt
string | null

Optional salt for prefix caching.

repetition_penalty
number | null

Additional repetition control for generation.

seed
integer | null

Optional random seed for reproducibility.

stop

Stop sequence or list of sequences where generation should halt.

structured_outputs
object | null

Structured output schema configuration.

chat_template_kwargs
object | null

Additional keyword arguments passed to the model chat template.

include
string[] | null

Additional output fields to include in the response.

previous_input_messages
object[] | null

Prior conversation messages to include when continuing a multi-turn exchange without server-side response storage.

previous_response_id
string | null

Id of a stored response to continue. The stored input and output are prepended to input. The id must belong to the caller.

background
boolean
default:false

Not supported. Requests with background: true are rejected with a validation error because responses are not stored.

Response

Model response

OpenAI-compatible response object returned by the Responses API.

id
string
required

Unique identifier for this response.

object
string
default:response
required

Object type. Always response.

created_at
integer
required

Unix timestamp (seconds) when the response was created.

model
string
required

Model identifier used to generate the response.

status
enum<string>
required

Status of the response generation.

Available options:
completed,
failed,
in_progress,
incomplete,
cancelled
output
object[]
required

Typed output items produced by the model (for example, messages, function calls, or reasoning items).

output_text
string | null

Convenience field containing concatenated text output from the response.

instructions
string | null

System or developer instructions used for this response.

usage
object | null

Token usage details for the request.

error
object | null

Error details when generation fails.

incomplete_details
object | null

Details about why the response ended before completion.