Skip to main content
POST
Run OpenAI Responses API (OpenAI only)

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json
model
string
required

model specified as model_vendor/model, for example openai/gpt-4o

input
required
include
string[] | null

Which fields to include in the response

instructions
string | null

Instructions for the response generation

max_output_tokens
integer | null

Maximum number of output tokens

metadata
Metadata · object | null

Metadata for the response

parallel_tool_calls
boolean | null

Whether to enable parallel tool calls

previous_response_id
string | null

ID of the previous response for chaining

reasoning
Reasoning · object | null

Reasoning configuration for the response

store
boolean | null

Whether to store the response

stream
boolean | null

Whether to stream the response

temperature
number | null

Sampling temperature for randomness control

Required range: 0 <= x <= 2
text
Text · object | null

Text configuration parameters

tool_choice

Tool choice configuration

tools
Tools · object[] | null

Tools available for the response

top_p
number | null

Top-p sampling parameter

Required range: 0 <= x <= 1
truncation
enum<string> | null

Truncation configuration

Available options:
auto,
disabled

Response

Successful Response

id
string
required
created_at
number
required
model
required
output
(ResponseOutputMessage · object | ResponseFileSearchToolCall · object | ResponseFunctionToolCall · object | ResponseFunctionWebSearch · object | ResponseComputerToolCall · object | ResponseReasoningItem · object | ResponseCompactionItem · object | ImageGenerationCall · object | ResponseCodeInterpreterToolCall · object | LocalShellCall · object | ResponseFunctionShellToolCall · object | ResponseFunctionShellToolCallOutput · object | ResponseApplyPatchToolCall · object | ResponseApplyPatchToolCallOutput · object | McpCall · object | McpListTools · object | McpApprovalRequest · object | ResponseCustomToolCall · object)[]
required

An output message from the model.

parallel_tool_calls
boolean
required
tool_choice
required
Available options:
none,
auto,
required
tools
(FunctionTool · object | FileSearchTool · object | ComputerTool · object | WebSearchTool · object | Mcp · object | CodeInterpreter · object | ImageGeneration · object | LocalShell · object | FunctionShellTool · object | CustomTool · object | WebSearchPreviewTool · object | ApplyPatchTool · object)[]
required

Defines a function in your own code the model can choose to call.

Learn more about function calling.

object
string
default:response
Allowed value: "response"
error
ResponseError · object | null

An error object returned when the model fails to generate a Response.

incomplete_details
IncompleteDetails · object | null

Details about why the response is incomplete.

instructions
metadata
Metadata · object | null
temperature
number | null
top_p
number | null
background
boolean | null
completed_at
number | null
conversation
Conversation · object | null

The conversation that this response belonged to.

Input items and output items from this response were automatically added to this conversation.

max_output_tokens
integer | null
max_tool_calls
integer | null
previous_response_id
string | null
prompt
ResponsePrompt · object | null

Reference to a prompt template and its variables. Learn more.

prompt_cache_key
string | null
prompt_cache_retention
enum<string> | null
Available options:
in-memory,
24h
reasoning
Reasoning · object | null

gpt-5 and o-series models only

Configuration options for reasoning models.

safety_identifier
string | null
service_tier
enum<string> | null
Available options:
auto,
default,
flex,
scale,
priority
status
enum<string> | null
Available options:
completed,
failed,
in_progress,
cancelled,
queued,
incomplete
text
ResponseTextConfig · object | null

Configuration options for a text response from the model.

Can be plain text or structured JSON data. Learn more:

top_logprobs
integer | null
truncation
enum<string> | null
Available options:
auto,
disabled
usage
ResponseUsage · object | null

Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.

user
string | null