Request object for creating a response
Whether to process the response in the background. If true, the response will be processed asynchronously.
The ID of an existing conversation to add this response to, or configuration for a new conversation.
A list of items to include in the response output.
Input to the model. Can be a text string or an array of input items.
Instructions for the model on how to behave and respond.
The maximum number of tokens to generate in the response output.
x >= 0The maximum number of tool calls that can be made in a single response.
x >= 0Set of key-value pairs that can be attached to an object for storing additional information.
The model to use for generating the response (e.g., "gpt-4o", "gpt-4o-mini").
Whether to enable parallel tool calls. If true, the model can make multiple tool calls simultaneously.
The ID of a previous response to continue from. Used for multi-turn interactions.
Reference to a prompt template and its variables
Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the user field.
Configuration for reasoning/chain-of-thought capabilities.
An identifier for safety and content moderation purposes.
The service tier to use for the request (e.g., "auto", "default").
Whether to store the conversation and response for later retrieval.
Whether to stream the response back incrementally using Server-Sent Events (SSE).
Options for configuring streaming behavior.
Sampling temperature between 0 and 2. Higher values make output more random, lower values more focused.
Configuration for text output formatting and behavior.
Controls which tool the model should call. Can be "none", "auto", "required", or a specific tool.
A list of tools the model may call. Each tool is a function with a name, description, and parameters.
Number of most likely tokens to return at each position, along with their log probabilities.
x >= 0Nucleus sampling parameter. The model considers tokens with top_p probability mass.
The truncation strategy to use when the input exceeds the model's context window.
Response created successfully
A response object representing the output from a model invocation
Unix timestamp (in seconds) when the response was created
Unique identifier for the response
The model used to generate the response
The object type, always "response"
The status of the response (e.g., "in_progress", "completed", "failed", "cancelled", "incomplete")
Whether the response was generated in the background
The ID of the conversation this response belongs to
Error information if the response failed
Details about why the response is incomplete (if status is "incomplete")
Instructions provided to the model
Maximum number of output tokens
x >= 0Maximum number of tool calls
x >= 0Set of key-value pairs that can be attached to an object
The output items generated by the model
A structured item in the conversation, representing messages, tool calls, reasoning, and other interaction types
Whether parallel tool calls are enabled
ID of the previous response
Prompt configuration
Prompt cache key
Reasoning configuration
Safety identifier
Service tier used
Temperature sampling parameter
Text configuration
Tool choice configuration
Tools available to the model
Number of top log probabilities to return
x >= 0Top-p sampling parameter
Truncation strategy
Usage statistics for the API call