Create a response using OpenAI compatible SDKs or tools. Supports text and image inputs, and text outputs. Create stateful interactions with the model, using the output of previous responses as input.
Your API key.
Request model for creating a response.
Model ID to use for the response.
1 - 255The input to the model. Can be a simple string or an array of input items including reasoning from previous turns.
System instructions for the model.
32000"You are a helpful AI assistant."
Maximum number of tokens to generate.
x > 01024
Sampling temperature between 0 and 2.
0 <= x <= 20.7
Nucleus sampling parameter.
0 <= x <= 10.9
List of tools the model may call.
Controls which tool is called by the model.
auto, none, required Whether to enable parallel function calling.
Whether to stream the response using server-sent events.
Text output format configuration.
Configuration options for reasoning models.
Successful Response
Response object from the Responses API.
Unique identifier for the response.
Unix timestamp (in seconds) of when this Response was created.
Model ID used to generate the response, like moonshotai/kimi-k2 or anthropic/claude-sonnet-4-5. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model library to browse and compare available models.
The status of the response.
in_progress, completed, failed, cancelled, incomplete An array of content items generated by the model. The length and order of items in the output array is dependent on the model's response. Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.
Reasoning output item containing the model's thinking process.
The object type of this resource - always set to 'response'.
"response"The conversation that this response belongs to. Input items and output items from this response are automatically added to this conversation.
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
An error object returned when the model fails to generate a Response.
Details if the response is incomplete.
The instructions provided for this response.
Maximum output tokens configured.
Whether parallel tool calls are enabled.
Configuration options for reasoning models.
The temperature used for generation.
Text format configuration.
The tool choice configuration.
auto, none, required The tools available to the model.
The top_p value used for generation.