Emitted when there is a partial audio response.
Emitted when the audio response is complete.
Emitted when there is a partial transcript of audio.
Emitted when the full audio transcript is completed.
Emitted when a partial code snippet is added by the code interpreter.
Hide attributes Show attributes
-
The type of the event. Always
response.code_interpreter_call.code.delta
.Value is
response.code_interpreter_call.code.delta
. -
The index of the output item that the code interpreter call is in progress.
-
The partial code snippet added by the code interpreter.
Emitted when code snippet output is finalized by the code interpreter.
Hide attributes Show attributes
-
The type of the event. Always
response.code_interpreter_call.code.done
.Value is
response.code_interpreter_call.code.done
. -
The index of the output item that the code interpreter call is in progress.
-
The final code snippet output by the code interpreter.
Emitted when the code interpreter call is completed.
Hide attributes Show attributes
-
The type of the event. Always
response.code_interpreter_call.completed
.Value is
response.code_interpreter_call.completed
. -
The index of the output item that the code interpreter call is in progress.
-
A tool call to run code.
Hide code_interpreter_call attributes Show code_interpreter_call attributes object
-
The unique ID of the code interpreter tool call.
-
The type of the code interpreter tool call. Always
code_interpreter_call
.Value is
code_interpreter_call
. -
The code to run.
-
The status of the code interpreter tool call.
Values are
in_progress
,interpreting
, orcompleted
. -
The results of the code interpreter tool call.
-
Emitted when a code interpreter call is in progress.
Hide attributes Show attributes
-
The type of the event. Always
response.code_interpreter_call.in_progress
.Value is
response.code_interpreter_call.in_progress
. -
The index of the output item that the code interpreter call is in progress.
-
A tool call to run code.
Hide code_interpreter_call attributes Show code_interpreter_call attributes object
-
The unique ID of the code interpreter tool call.
-
The type of the code interpreter tool call. Always
code_interpreter_call
.Value is
code_interpreter_call
. -
The code to run.
-
The status of the code interpreter tool call.
Values are
in_progress
,interpreting
, orcompleted
. -
The results of the code interpreter tool call.
-
Emitted when the code interpreter is actively interpreting the code snippet.
Hide attributes Show attributes
-
The type of the event. Always
response.code_interpreter_call.interpreting
.Value is
response.code_interpreter_call.interpreting
. -
The index of the output item that the code interpreter call is in progress.
-
A tool call to run code.
Hide code_interpreter_call attributes Show code_interpreter_call attributes object
-
The unique ID of the code interpreter tool call.
-
The type of the code interpreter tool call. Always
code_interpreter_call
.Value is
code_interpreter_call
. -
The code to run.
-
The status of the code interpreter tool call.
Values are
in_progress
,interpreting
, orcompleted
. -
The results of the code interpreter tool call.
-
Emitted when the model response is complete.
Hide attributes Show attributes
-
The type of the event. Always
response.completed
.Value is
response.completed
. -
Hide response attributes Show response attributes object
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_p
but not both.Minimum value is
0
, maximum value is2
. Default value is1
. -
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperature
but not both.Minimum value is
0
, maximum value is1
. Default value is1
. -
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
model
string Model ID used to generate the response, like
gpt-4o
oro1
. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.Any of: Values are
o3-mini
,o3-mini-2025-01-31
,o1
,o1-2024-12-17
,o1-preview
,o1-preview-2024-09-12
,o1-mini
,o1-mini-2024-09-12
,gpt-4o
,gpt-4o-2024-11-20
,gpt-4o-2024-08-06
,gpt-4o-2024-05-13
,gpt-4o-audio-preview
,gpt-4o-audio-preview-2024-10-01
,gpt-4o-audio-preview-2024-12-17
,gpt-4o-mini-audio-preview
,gpt-4o-mini-audio-preview-2024-12-17
,gpt-4o-search-preview
,gpt-4o-mini-search-preview
,gpt-4o-search-preview-2025-03-11
,gpt-4o-mini-search-preview-2025-03-11
,chatgpt-4o-latest
,gpt-4o-mini
,gpt-4o-mini-2024-07-18
,gpt-4-turbo
,gpt-4-turbo-2024-04-09
,gpt-4-0125-preview
,gpt-4-turbo-preview
,gpt-4-1106-preview
,gpt-4-vision-preview
,gpt-4
,gpt-4-0314
,gpt-4-0613
,gpt-4-32k
,gpt-4-32k-0314
,gpt-4-32k-0613
,gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-0301
,gpt-3.5-turbo-0613
,gpt-3.5-turbo-1106
,gpt-3.5-turbo-0125
, orgpt-3.5-turbo-16k-0613
.Values are
o1-pro
,o1-pro-2025-03-19
,computer-use-preview
, orcomputer-use-preview-2025-03-11
.-
o-series models only
Configuration options for reasoning models.
Hide reasoning attributes Show reasoning attributes object | null
-
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Values are
low
,medium
, orhigh
. Default value ismedium
. -
computer_use_preview only
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of
concise
ordetailed
.Values are
concise
ordetailed
.
-
-
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id
, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. -
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
Hide text attribute Show text attribute object
format
object An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.One of: Default response format. Used to generate text responses.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Hide attributes Show attributes
-
The type of response format being defined. Always
json_schema
.Value is
json_schema
. -
A description of what the response format is for, used by the model to determine how to respond in the format.
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
Additional properties are allowed.
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.Default value is
false
.
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
-
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choice
parameter.The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
One of: A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
Hide attributes Show attributes
-
The type of the file search tool. Always
file_search
.Value is
file_search
. -
The IDs of the vector stores to search.
-
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filters
object A filter to apply based on file attributes.
One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Combine multiple filters using
and
oror
.Hide attributes Show attributes
-
Type of operation:
and
oror
.Values are
and
oror
. -
Array of filters to combine. Items can be
ComparisonFilter
orCompoundFilter
.One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Additional properties are allowed.
-
-
-
Ranking options for search.
Additional properties are NOT allowed.
Hide ranking_options attributes Show ranking_options attributes object
-
The ranker to use for the file search.
Values are
auto
ordefault-2024-11-15
. Default value isauto
. -
The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
Minimum value is
0
, maximum value is1
. Default value is0
.
-
Defines a function in your own code the model can choose to call. Learn more about function calling.
Hide attributes Show attributes
-
The type of the function tool. Always
function
.Value is
function
. -
The name of the function to call.
-
A description of the function. Used by the model to determine whether or not to call the function.
-
A JSON schema object describing the parameters of the function.
Additional properties are allowed.
-
Whether to enforce strict parameter validation. Default
true
.
A tool that controls a virtual computer. Learn more about the computer tool.
Hide attributes Show attributes
-
The type of the computer use tool. Always
computer_use_preview
.Value is
computer_use_preview
. -
The width of the computer display.
-
The height of the computer display.
-
The type of computer environment to control.
Values are
mac
,windows
,ubuntu
, orbrowser
.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Hide attributes Show attributes
-
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
Values are
web_search_preview
orweb_search_preview_2025_03_11
. -
Approximate location parameters for the search.
Hide user_location attributes Show user_location attributes object | null
-
The two-letter ISO country code of the user, e.g.
US
. -
Free text input for the region of the user, e.g.
California
. -
Free text input for the city of the user, e.g.
San Francisco
. -
The IANA timezone of the user, e.g.
America/Los_Angeles
. -
The type of location approximation. Always
approximate
.Value is
approximate
.
-
-
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.Values are
low
,medium
, orhigh
. Default value ismedium
.
tool_choice
string | object How the model should select which tool (or tools) to use when generating a response. See the
tools
parameter to see how to specify which tools the model can call.One of: Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools.Values are
none
,auto
, orrequired
.Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Hide attribute Show attribute
-
The type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_search
web_search_preview
computer_use_preview
Values are
file_search
,web_search_preview
,computer_use_preview
, orweb_search_preview_2025_03_11
.
-
-
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Values are
auto
ordisabled
. Default value isdisabled
. -
Unique identifier for this Response.
-
The object type of this resource - always set to
response
.Value is
response
. -
The status of the response generation. One of
completed
,failed
,in_progress
, orincomplete
.Values are
completed
,failed
,in_progress
, orincomplete
. -
Unix timestamp (in seconds) of when this Response was created.
-
An error object returned when the model fails to generate a Response.
Hide error attributes Show error attributes object | null
-
The error code for the response.
Values are
server_error
,rate_limit_exceeded
,invalid_prompt
,vector_store_timeout
,invalid_image
,invalid_image_format
,invalid_base64_image
,invalid_image_url
,image_too_large
,image_too_small
,image_parse_error
,image_content_policy_violation
,invalid_image_mode
,image_file_too_large
,unsupported_image_media_type
,empty_image_file
,failed_to_download_image
, orimage_file_not_found
. -
A human-readable description of the error.
-
-
Details about why the response is 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 anassistant
message with the content generated by the model, you might consider using theoutput_text
property where supported in SDKs.
Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
- The length and order of items in the
-
SDK-only convenience property that contains the aggregated text output from all
output_text
items in theoutput
array, if any are present. Supported in the Python and JavaScript SDKs. -
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Hide usage attributes Show usage attributes object
-
The number of input tokens.
-
A detailed breakdown of the input tokens.
Hide input_tokens_details attribute Show input_tokens_details attribute object
-
The number of tokens that were retrieved from the cache. More on prompt caching.
-
-
The number of output tokens.
-
A detailed breakdown of the output tokens.
-
The total number of tokens used.
-
-
Whether to allow the model to run tool calls in parallel.
Default value is
true
.
-
Emitted when a new content part is added.
Hide attributes Show attributes
-
The type of the event. Always
response.content_part.added
.Value is
response.content_part.added
. -
The ID of the output item that the content part was added to.
-
The index of the output item that the content part was added to.
-
The index of the content part that was added.
part
object Required One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
Emitted when a content part is done.
Hide attributes Show attributes
-
The type of the event. Always
response.content_part.done
.Value is
response.content_part.done
. -
The ID of the output item that the content part was added to.
-
The index of the output item that the content part was added to.
-
The index of the content part that is done.
part
object Required One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
An event that is emitted when a response is created.
Hide attributes Show attributes
-
The type of the event. Always
response.created
.Value is
response.created
. -
Hide response attributes Show response attributes object
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_p
but not both.Minimum value is
0
, maximum value is2
. Default value is1
. -
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperature
but not both.Minimum value is
0
, maximum value is1
. Default value is1
. -
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
model
string Model ID used to generate the response, like
gpt-4o
oro1
. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.Any of: Values are
o3-mini
,o3-mini-2025-01-31
,o1
,o1-2024-12-17
,o1-preview
,o1-preview-2024-09-12
,o1-mini
,o1-mini-2024-09-12
,gpt-4o
,gpt-4o-2024-11-20
,gpt-4o-2024-08-06
,gpt-4o-2024-05-13
,gpt-4o-audio-preview
,gpt-4o-audio-preview-2024-10-01
,gpt-4o-audio-preview-2024-12-17
,gpt-4o-mini-audio-preview
,gpt-4o-mini-audio-preview-2024-12-17
,gpt-4o-search-preview
,gpt-4o-mini-search-preview
,gpt-4o-search-preview-2025-03-11
,gpt-4o-mini-search-preview-2025-03-11
,chatgpt-4o-latest
,gpt-4o-mini
,gpt-4o-mini-2024-07-18
,gpt-4-turbo
,gpt-4-turbo-2024-04-09
,gpt-4-0125-preview
,gpt-4-turbo-preview
,gpt-4-1106-preview
,gpt-4-vision-preview
,gpt-4
,gpt-4-0314
,gpt-4-0613
,gpt-4-32k
,gpt-4-32k-0314
,gpt-4-32k-0613
,gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-0301
,gpt-3.5-turbo-0613
,gpt-3.5-turbo-1106
,gpt-3.5-turbo-0125
, orgpt-3.5-turbo-16k-0613
.Values are
o1-pro
,o1-pro-2025-03-19
,computer-use-preview
, orcomputer-use-preview-2025-03-11
.-
o-series models only
Configuration options for reasoning models.
Hide reasoning attributes Show reasoning attributes object | null
-
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Values are
low
,medium
, orhigh
. Default value ismedium
. -
computer_use_preview only
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of
concise
ordetailed
.Values are
concise
ordetailed
.
-
-
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id
, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. -
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
Hide text attribute Show text attribute object
format
object An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.One of: Default response format. Used to generate text responses.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Hide attributes Show attributes
-
The type of response format being defined. Always
json_schema
.Value is
json_schema
. -
A description of what the response format is for, used by the model to determine how to respond in the format.
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
Additional properties are allowed.
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.Default value is
false
.
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
-
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choice
parameter.The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
One of: A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
Hide attributes Show attributes
-
The type of the file search tool. Always
file_search
.Value is
file_search
. -
The IDs of the vector stores to search.
-
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filters
object A filter to apply based on file attributes.
One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Combine multiple filters using
and
oror
.Hide attributes Show attributes
-
Type of operation:
and
oror
.Values are
and
oror
. -
Array of filters to combine. Items can be
ComparisonFilter
orCompoundFilter
.One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Additional properties are allowed.
-
-
-
Ranking options for search.
Additional properties are NOT allowed.
Hide ranking_options attributes Show ranking_options attributes object
-
The ranker to use for the file search.
Values are
auto
ordefault-2024-11-15
. Default value isauto
. -
The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
Minimum value is
0
, maximum value is1
. Default value is0
.
-
Defines a function in your own code the model can choose to call. Learn more about function calling.
Hide attributes Show attributes
-
The type of the function tool. Always
function
.Value is
function
. -
The name of the function to call.
-
A description of the function. Used by the model to determine whether or not to call the function.
-
A JSON schema object describing the parameters of the function.
Additional properties are allowed.
-
Whether to enforce strict parameter validation. Default
true
.
A tool that controls a virtual computer. Learn more about the computer tool.
Hide attributes Show attributes
-
The type of the computer use tool. Always
computer_use_preview
.Value is
computer_use_preview
. -
The width of the computer display.
-
The height of the computer display.
-
The type of computer environment to control.
Values are
mac
,windows
,ubuntu
, orbrowser
.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Hide attributes Show attributes
-
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
Values are
web_search_preview
orweb_search_preview_2025_03_11
. -
Approximate location parameters for the search.
Hide user_location attributes Show user_location attributes object | null
-
The two-letter ISO country code of the user, e.g.
US
. -
Free text input for the region of the user, e.g.
California
. -
Free text input for the city of the user, e.g.
San Francisco
. -
The IANA timezone of the user, e.g.
America/Los_Angeles
. -
The type of location approximation. Always
approximate
.Value is
approximate
.
-
-
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.Values are
low
,medium
, orhigh
. Default value ismedium
.
tool_choice
string | object How the model should select which tool (or tools) to use when generating a response. See the
tools
parameter to see how to specify which tools the model can call.One of: Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools.Values are
none
,auto
, orrequired
.Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Hide attribute Show attribute
-
The type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_search
web_search_preview
computer_use_preview
Values are
file_search
,web_search_preview
,computer_use_preview
, orweb_search_preview_2025_03_11
.
-
-
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Values are
auto
ordisabled
. Default value isdisabled
. -
Unique identifier for this Response.
-
The object type of this resource - always set to
response
.Value is
response
. -
The status of the response generation. One of
completed
,failed
,in_progress
, orincomplete
.Values are
completed
,failed
,in_progress
, orincomplete
. -
Unix timestamp (in seconds) of when this Response was created.
-
An error object returned when the model fails to generate a Response.
Hide error attributes Show error attributes object | null
-
The error code for the response.
Values are
server_error
,rate_limit_exceeded
,invalid_prompt
,vector_store_timeout
,invalid_image
,invalid_image_format
,invalid_base64_image
,invalid_image_url
,image_too_large
,image_too_small
,image_parse_error
,image_content_policy_violation
,invalid_image_mode
,image_file_too_large
,unsupported_image_media_type
,empty_image_file
,failed_to_download_image
, orimage_file_not_found
. -
A human-readable description of the error.
-
-
Details about why the response is 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 anassistant
message with the content generated by the model, you might consider using theoutput_text
property where supported in SDKs.
Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
- The length and order of items in the
-
SDK-only convenience property that contains the aggregated text output from all
output_text
items in theoutput
array, if any are present. Supported in the Python and JavaScript SDKs. -
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Hide usage attributes Show usage attributes object
-
The number of input tokens.
-
A detailed breakdown of the input tokens.
Hide input_tokens_details attribute Show input_tokens_details attribute object
-
The number of tokens that were retrieved from the cache. More on prompt caching.
-
-
The number of output tokens.
-
A detailed breakdown of the output tokens.
-
The total number of tokens used.
-
-
Whether to allow the model to run tool calls in parallel.
Default value is
true
.
-
Emitted when an error occurs.
Emitted when a file search call is completed (results found).
Hide attributes Show attributes
-
The type of the event. Always
response.file_search_call.completed
.Value is
response.file_search_call.completed
. -
The index of the output item that the file search call is initiated.
-
The ID of the output item that the file search call is initiated.
Emitted when a file search call is initiated.
Hide attributes Show attributes
-
The type of the event. Always
response.file_search_call.in_progress
.Value is
response.file_search_call.in_progress
. -
The index of the output item that the file search call is initiated.
-
The ID of the output item that the file search call is initiated.
Emitted when a file search is currently searching.
Hide attributes Show attributes
-
The type of the event. Always
response.file_search_call.searching
.Value is
response.file_search_call.searching
. -
The index of the output item that the file search call is searching.
-
The ID of the output item that the file search call is initiated.
Emitted when there is a partial function-call arguments delta.
Hide attributes Show attributes
-
The type of the event. Always
response.function_call_arguments.delta
.Value is
response.function_call_arguments.delta
. -
The ID of the output item that the function-call arguments delta is added to.
-
The index of the output item that the function-call arguments delta is added to.
-
The function-call arguments delta that is added.
Emitted when function-call arguments are finalized.
Emitted when the response is in progress.
Hide attributes Show attributes
-
The type of the event. Always
response.in_progress
.Value is
response.in_progress
. -
Hide response attributes Show response attributes object
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_p
but not both.Minimum value is
0
, maximum value is2
. Default value is1
. -
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperature
but not both.Minimum value is
0
, maximum value is1
. Default value is1
. -
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
model
string Model ID used to generate the response, like
gpt-4o
oro1
. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.Any of: Values are
o3-mini
,o3-mini-2025-01-31
,o1
,o1-2024-12-17
,o1-preview
,o1-preview-2024-09-12
,o1-mini
,o1-mini-2024-09-12
,gpt-4o
,gpt-4o-2024-11-20
,gpt-4o-2024-08-06
,gpt-4o-2024-05-13
,gpt-4o-audio-preview
,gpt-4o-audio-preview-2024-10-01
,gpt-4o-audio-preview-2024-12-17
,gpt-4o-mini-audio-preview
,gpt-4o-mini-audio-preview-2024-12-17
,gpt-4o-search-preview
,gpt-4o-mini-search-preview
,gpt-4o-search-preview-2025-03-11
,gpt-4o-mini-search-preview-2025-03-11
,chatgpt-4o-latest
,gpt-4o-mini
,gpt-4o-mini-2024-07-18
,gpt-4-turbo
,gpt-4-turbo-2024-04-09
,gpt-4-0125-preview
,gpt-4-turbo-preview
,gpt-4-1106-preview
,gpt-4-vision-preview
,gpt-4
,gpt-4-0314
,gpt-4-0613
,gpt-4-32k
,gpt-4-32k-0314
,gpt-4-32k-0613
,gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-0301
,gpt-3.5-turbo-0613
,gpt-3.5-turbo-1106
,gpt-3.5-turbo-0125
, orgpt-3.5-turbo-16k-0613
.Values are
o1-pro
,o1-pro-2025-03-19
,computer-use-preview
, orcomputer-use-preview-2025-03-11
.-
o-series models only
Configuration options for reasoning models.
Hide reasoning attributes Show reasoning attributes object | null
-
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Values are
low
,medium
, orhigh
. Default value ismedium
. -
computer_use_preview only
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of
concise
ordetailed
.Values are
concise
ordetailed
.
-
-
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id
, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. -
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
Hide text attribute Show text attribute object
format
object An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.One of: Default response format. Used to generate text responses.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Hide attributes Show attributes
-
The type of response format being defined. Always
json_schema
.Value is
json_schema
. -
A description of what the response format is for, used by the model to determine how to respond in the format.
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
Additional properties are allowed.
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.Default value is
false
.
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
-
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choice
parameter.The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
One of: A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
Hide attributes Show attributes
-
The type of the file search tool. Always
file_search
.Value is
file_search
. -
The IDs of the vector stores to search.
-
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filters
object A filter to apply based on file attributes.
One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Combine multiple filters using
and
oror
.Hide attributes Show attributes
-
Type of operation:
and
oror
.Values are
and
oror
. -
Array of filters to combine. Items can be
ComparisonFilter
orCompoundFilter
.One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Additional properties are allowed.
-
-
-
Ranking options for search.
Additional properties are NOT allowed.
Hide ranking_options attributes Show ranking_options attributes object
-
The ranker to use for the file search.
Values are
auto
ordefault-2024-11-15
. Default value isauto
. -
The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
Minimum value is
0
, maximum value is1
. Default value is0
.
-
Defines a function in your own code the model can choose to call. Learn more about function calling.
Hide attributes Show attributes
-
The type of the function tool. Always
function
.Value is
function
. -
The name of the function to call.
-
A description of the function. Used by the model to determine whether or not to call the function.
-
A JSON schema object describing the parameters of the function.
Additional properties are allowed.
-
Whether to enforce strict parameter validation. Default
true
.
A tool that controls a virtual computer. Learn more about the computer tool.
Hide attributes Show attributes
-
The type of the computer use tool. Always
computer_use_preview
.Value is
computer_use_preview
. -
The width of the computer display.
-
The height of the computer display.
-
The type of computer environment to control.
Values are
mac
,windows
,ubuntu
, orbrowser
.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Hide attributes Show attributes
-
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
Values are
web_search_preview
orweb_search_preview_2025_03_11
. -
Approximate location parameters for the search.
Hide user_location attributes Show user_location attributes object | null
-
The two-letter ISO country code of the user, e.g.
US
. -
Free text input for the region of the user, e.g.
California
. -
Free text input for the city of the user, e.g.
San Francisco
. -
The IANA timezone of the user, e.g.
America/Los_Angeles
. -
The type of location approximation. Always
approximate
.Value is
approximate
.
-
-
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.Values are
low
,medium
, orhigh
. Default value ismedium
.
tool_choice
string | object How the model should select which tool (or tools) to use when generating a response. See the
tools
parameter to see how to specify which tools the model can call.One of: Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools.Values are
none
,auto
, orrequired
.Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Hide attribute Show attribute
-
The type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_search
web_search_preview
computer_use_preview
Values are
file_search
,web_search_preview
,computer_use_preview
, orweb_search_preview_2025_03_11
.
-
-
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Values are
auto
ordisabled
. Default value isdisabled
. -
Unique identifier for this Response.
-
The object type of this resource - always set to
response
.Value is
response
. -
The status of the response generation. One of
completed
,failed
,in_progress
, orincomplete
.Values are
completed
,failed
,in_progress
, orincomplete
. -
Unix timestamp (in seconds) of when this Response was created.
-
An error object returned when the model fails to generate a Response.
Hide error attributes Show error attributes object | null
-
The error code for the response.
Values are
server_error
,rate_limit_exceeded
,invalid_prompt
,vector_store_timeout
,invalid_image
,invalid_image_format
,invalid_base64_image
,invalid_image_url
,image_too_large
,image_too_small
,image_parse_error
,image_content_policy_violation
,invalid_image_mode
,image_file_too_large
,unsupported_image_media_type
,empty_image_file
,failed_to_download_image
, orimage_file_not_found
. -
A human-readable description of the error.
-
-
Details about why the response is 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 anassistant
message with the content generated by the model, you might consider using theoutput_text
property where supported in SDKs.
Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
- The length and order of items in the
-
SDK-only convenience property that contains the aggregated text output from all
output_text
items in theoutput
array, if any are present. Supported in the Python and JavaScript SDKs. -
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Hide usage attributes Show usage attributes object
-
The number of input tokens.
-
A detailed breakdown of the input tokens.
Hide input_tokens_details attribute Show input_tokens_details attribute object
-
The number of tokens that were retrieved from the cache. More on prompt caching.
-
-
The number of output tokens.
-
A detailed breakdown of the output tokens.
-
The total number of tokens used.
-
-
Whether to allow the model to run tool calls in parallel.
Default value is
true
.
-
An event that is emitted when a response fails.
Hide attributes Show attributes
-
The type of the event. Always
response.failed
.Value is
response.failed
. -
Hide response attributes Show response attributes object
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_p
but not both.Minimum value is
0
, maximum value is2
. Default value is1
. -
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperature
but not both.Minimum value is
0
, maximum value is1
. Default value is1
. -
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
model
string Model ID used to generate the response, like
gpt-4o
oro1
. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.Any of: Values are
o3-mini
,o3-mini-2025-01-31
,o1
,o1-2024-12-17
,o1-preview
,o1-preview-2024-09-12
,o1-mini
,o1-mini-2024-09-12
,gpt-4o
,gpt-4o-2024-11-20
,gpt-4o-2024-08-06
,gpt-4o-2024-05-13
,gpt-4o-audio-preview
,gpt-4o-audio-preview-2024-10-01
,gpt-4o-audio-preview-2024-12-17
,gpt-4o-mini-audio-preview
,gpt-4o-mini-audio-preview-2024-12-17
,gpt-4o-search-preview
,gpt-4o-mini-search-preview
,gpt-4o-search-preview-2025-03-11
,gpt-4o-mini-search-preview-2025-03-11
,chatgpt-4o-latest
,gpt-4o-mini
,gpt-4o-mini-2024-07-18
,gpt-4-turbo
,gpt-4-turbo-2024-04-09
,gpt-4-0125-preview
,gpt-4-turbo-preview
,gpt-4-1106-preview
,gpt-4-vision-preview
,gpt-4
,gpt-4-0314
,gpt-4-0613
,gpt-4-32k
,gpt-4-32k-0314
,gpt-4-32k-0613
,gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-0301
,gpt-3.5-turbo-0613
,gpt-3.5-turbo-1106
,gpt-3.5-turbo-0125
, orgpt-3.5-turbo-16k-0613
.Values are
o1-pro
,o1-pro-2025-03-19
,computer-use-preview
, orcomputer-use-preview-2025-03-11
.-
o-series models only
Configuration options for reasoning models.
Hide reasoning attributes Show reasoning attributes object | null
-
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Values are
low
,medium
, orhigh
. Default value ismedium
. -
computer_use_preview only
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of
concise
ordetailed
.Values are
concise
ordetailed
.
-
-
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id
, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. -
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
Hide text attribute Show text attribute object
format
object An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.One of: Default response format. Used to generate text responses.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Hide attributes Show attributes
-
The type of response format being defined. Always
json_schema
.Value is
json_schema
. -
A description of what the response format is for, used by the model to determine how to respond in the format.
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
Additional properties are allowed.
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.Default value is
false
.
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
-
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choice
parameter.The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
One of: A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
Hide attributes Show attributes
-
The type of the file search tool. Always
file_search
.Value is
file_search
. -
The IDs of the vector stores to search.
-
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filters
object A filter to apply based on file attributes.
One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Combine multiple filters using
and
oror
.Hide attributes Show attributes
-
Type of operation:
and
oror
.Values are
and
oror
. -
Array of filters to combine. Items can be
ComparisonFilter
orCompoundFilter
.One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Additional properties are allowed.
-
-
-
Ranking options for search.
Additional properties are NOT allowed.
Hide ranking_options attributes Show ranking_options attributes object
-
The ranker to use for the file search.
Values are
auto
ordefault-2024-11-15
. Default value isauto
. -
The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
Minimum value is
0
, maximum value is1
. Default value is0
.
-
Defines a function in your own code the model can choose to call. Learn more about function calling.
Hide attributes Show attributes
-
The type of the function tool. Always
function
.Value is
function
. -
The name of the function to call.
-
A description of the function. Used by the model to determine whether or not to call the function.
-
A JSON schema object describing the parameters of the function.
Additional properties are allowed.
-
Whether to enforce strict parameter validation. Default
true
.
A tool that controls a virtual computer. Learn more about the computer tool.
Hide attributes Show attributes
-
The type of the computer use tool. Always
computer_use_preview
.Value is
computer_use_preview
. -
The width of the computer display.
-
The height of the computer display.
-
The type of computer environment to control.
Values are
mac
,windows
,ubuntu
, orbrowser
.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Hide attributes Show attributes
-
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
Values are
web_search_preview
orweb_search_preview_2025_03_11
. -
Approximate location parameters for the search.
Hide user_location attributes Show user_location attributes object | null
-
The two-letter ISO country code of the user, e.g.
US
. -
Free text input for the region of the user, e.g.
California
. -
Free text input for the city of the user, e.g.
San Francisco
. -
The IANA timezone of the user, e.g.
America/Los_Angeles
. -
The type of location approximation. Always
approximate
.Value is
approximate
.
-
-
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.Values are
low
,medium
, orhigh
. Default value ismedium
.
tool_choice
string | object How the model should select which tool (or tools) to use when generating a response. See the
tools
parameter to see how to specify which tools the model can call.One of: Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools.Values are
none
,auto
, orrequired
.Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Hide attribute Show attribute
-
The type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_search
web_search_preview
computer_use_preview
Values are
file_search
,web_search_preview
,computer_use_preview
, orweb_search_preview_2025_03_11
.
-
-
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Values are
auto
ordisabled
. Default value isdisabled
. -
Unique identifier for this Response.
-
The object type of this resource - always set to
response
.Value is
response
. -
The status of the response generation. One of
completed
,failed
,in_progress
, orincomplete
.Values are
completed
,failed
,in_progress
, orincomplete
. -
Unix timestamp (in seconds) of when this Response was created.
-
An error object returned when the model fails to generate a Response.
Hide error attributes Show error attributes object | null
-
The error code for the response.
Values are
server_error
,rate_limit_exceeded
,invalid_prompt
,vector_store_timeout
,invalid_image
,invalid_image_format
,invalid_base64_image
,invalid_image_url
,image_too_large
,image_too_small
,image_parse_error
,image_content_policy_violation
,invalid_image_mode
,image_file_too_large
,unsupported_image_media_type
,empty_image_file
,failed_to_download_image
, orimage_file_not_found
. -
A human-readable description of the error.
-
-
Details about why the response is 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 anassistant
message with the content generated by the model, you might consider using theoutput_text
property where supported in SDKs.
Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
- The length and order of items in the
-
SDK-only convenience property that contains the aggregated text output from all
output_text
items in theoutput
array, if any are present. Supported in the Python and JavaScript SDKs. -
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Hide usage attributes Show usage attributes object
-
The number of input tokens.
-
A detailed breakdown of the input tokens.
Hide input_tokens_details attribute Show input_tokens_details attribute object
-
The number of tokens that were retrieved from the cache. More on prompt caching.
-
-
The number of output tokens.
-
A detailed breakdown of the output tokens.
-
The total number of tokens used.
-
-
Whether to allow the model to run tool calls in parallel.
Default value is
true
.
-
An event that is emitted when a response finishes as incomplete.
Hide attributes Show attributes
-
The type of the event. Always
response.incomplete
.Value is
response.incomplete
. -
Hide response attributes Show response attributes object
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
-
What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or
top_p
but not both.Minimum value is
0
, maximum value is2
. Default value is1
. -
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
We generally recommend altering this or
temperature
but not both.Minimum value is
0
, maximum value is1
. Default value is1
. -
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
-
The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about conversation state.
model
string Model ID used to generate the response, like
gpt-4o
oro1
. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the model guide to browse and compare available models.Any of: Values are
o3-mini
,o3-mini-2025-01-31
,o1
,o1-2024-12-17
,o1-preview
,o1-preview-2024-09-12
,o1-mini
,o1-mini-2024-09-12
,gpt-4o
,gpt-4o-2024-11-20
,gpt-4o-2024-08-06
,gpt-4o-2024-05-13
,gpt-4o-audio-preview
,gpt-4o-audio-preview-2024-10-01
,gpt-4o-audio-preview-2024-12-17
,gpt-4o-mini-audio-preview
,gpt-4o-mini-audio-preview-2024-12-17
,gpt-4o-search-preview
,gpt-4o-mini-search-preview
,gpt-4o-search-preview-2025-03-11
,gpt-4o-mini-search-preview-2025-03-11
,chatgpt-4o-latest
,gpt-4o-mini
,gpt-4o-mini-2024-07-18
,gpt-4-turbo
,gpt-4-turbo-2024-04-09
,gpt-4-0125-preview
,gpt-4-turbo-preview
,gpt-4-1106-preview
,gpt-4-vision-preview
,gpt-4
,gpt-4-0314
,gpt-4-0613
,gpt-4-32k
,gpt-4-32k-0314
,gpt-4-32k-0613
,gpt-3.5-turbo
,gpt-3.5-turbo-16k
,gpt-3.5-turbo-0301
,gpt-3.5-turbo-0613
,gpt-3.5-turbo-1106
,gpt-3.5-turbo-0125
, orgpt-3.5-turbo-16k-0613
.Values are
o1-pro
,o1-pro-2025-03-19
,computer-use-preview
, orcomputer-use-preview-2025-03-11
.-
o-series models only
Configuration options for reasoning models.
Hide reasoning attributes Show reasoning attributes object | null
-
o-series models only
Constrains effort on reasoning for reasoning models. Currently supported values are
low
,medium
, andhigh
. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Values are
low
,medium
, orhigh
. Default value ismedium
. -
computer_use_preview only
A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of
concise
ordetailed
.Values are
concise
ordetailed
.
-
-
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Inserts a system (or developer) message as the first item in the model's context.
When using along with
previous_response_id
, the instructions from a previous response will be not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. -
Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more:
Hide text attribute Show text attribute object
format
object An object specifying the format that the model must output.
Configuring
{ "type": "json_schema" }
enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.The default format is
{ "type": "text" }
with no additional options.Not recommended for gpt-4o and newer models:
Setting to
{ "type": "json_object" }
enables the older JSON mode, which ensures the message the model generates is valid JSON. Usingjson_schema
is preferred for models that support it.One of: Default response format. Used to generate text responses.
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
Hide attributes Show attributes
-
The type of response format being defined. Always
json_schema
.Value is
json_schema
. -
A description of what the response format is for, used by the model to determine how to respond in the format.
-
The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
-
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
Additional properties are allowed.
-
Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the
schema
field. Only a subset of JSON Schema is supported whenstrict
istrue
. To learn more, read the Structured Outputs guide.Default value is
false
.
JSON object response format. An older method of generating JSON responses. Using
json_schema
is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.-
-
An array of tools the model may call while generating a response. You can specify which tool to use by setting the
tool_choice
parameter.The two categories of tools you can provide the model are:
- Built-in tools: Tools that are provided by OpenAI that extend the model's capabilities, like web search or file search. Learn more about built-in tools.
- Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code. Learn more about function calling.
One of: A tool that searches for relevant content from uploaded files. Learn more about the file search tool.
Hide attributes Show attributes
-
The type of the file search tool. Always
file_search
.Value is
file_search
. -
The IDs of the vector stores to search.
-
The maximum number of results to return. This number should be between 1 and 50 inclusive.
filters
object A filter to apply based on file attributes.
One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Combine multiple filters using
and
oror
.Hide attributes Show attributes
-
Type of operation:
and
oror
.Values are
and
oror
. -
Array of filters to combine. Items can be
ComparisonFilter
orCompoundFilter
.One of: A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Hide attributes Show attributes
-
Specifies the comparison operator:
eq
,ne
,gt
,gte
,lt
,lte
.eq
: equalsne
: not equalgt
: greater thangte
: greater than or equallt
: less thanlte
: less than or equal
Values are
eq
,ne
,gt
,gte
,lt
, orlte
. Default value iseq
. -
The key to compare against the value.
Additional properties are allowed.
-
-
-
Ranking options for search.
Additional properties are NOT allowed.
Hide ranking_options attributes Show ranking_options attributes object
-
The ranker to use for the file search.
Values are
auto
ordefault-2024-11-15
. Default value isauto
. -
The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results.
Minimum value is
0
, maximum value is1
. Default value is0
.
-
Defines a function in your own code the model can choose to call. Learn more about function calling.
Hide attributes Show attributes
-
The type of the function tool. Always
function
.Value is
function
. -
The name of the function to call.
-
A description of the function. Used by the model to determine whether or not to call the function.
-
A JSON schema object describing the parameters of the function.
Additional properties are allowed.
-
Whether to enforce strict parameter validation. Default
true
.
A tool that controls a virtual computer. Learn more about the computer tool.
Hide attributes Show attributes
-
The type of the computer use tool. Always
computer_use_preview
.Value is
computer_use_preview
. -
The width of the computer display.
-
The height of the computer display.
-
The type of computer environment to control.
Values are
mac
,windows
,ubuntu
, orbrowser
.
This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
Hide attributes Show attributes
-
The type of the web search tool. One of:
web_search_preview
web_search_preview_2025_03_11
Values are
web_search_preview
orweb_search_preview_2025_03_11
. -
Approximate location parameters for the search.
Hide user_location attributes Show user_location attributes object | null
-
The two-letter ISO country code of the user, e.g.
US
. -
Free text input for the region of the user, e.g.
California
. -
Free text input for the city of the user, e.g.
San Francisco
. -
The IANA timezone of the user, e.g.
America/Los_Angeles
. -
The type of location approximation. Always
approximate
.Value is
approximate
.
-
-
High level guidance for the amount of context window space to use for the search. One of
low
,medium
, orhigh
.medium
is the default.Values are
low
,medium
, orhigh
. Default value ismedium
.
tool_choice
string | object How the model should select which tool (or tools) to use when generating a response. See the
tools
parameter to see how to specify which tools the model can call.One of: Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools.Values are
none
,auto
, orrequired
.Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.
Hide attribute Show attribute
-
The type of hosted tool the model should to use. Learn more about built-in tools.
Allowed values are:
file_search
web_search_preview
computer_use_preview
Values are
file_search
,web_search_preview
,computer_use_preview
, orweb_search_preview_2025_03_11
.
-
-
The truncation strategy to use for the model response.
auto
: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation.disabled
(default): If a model response will exceed the context window size for a model, the request will fail with a 400 error.
Values are
auto
ordisabled
. Default value isdisabled
. -
Unique identifier for this Response.
-
The object type of this resource - always set to
response
.Value is
response
. -
The status of the response generation. One of
completed
,failed
,in_progress
, orincomplete
.Values are
completed
,failed
,in_progress
, orincomplete
. -
Unix timestamp (in seconds) of when this Response was created.
-
An error object returned when the model fails to generate a Response.
Hide error attributes Show error attributes object | null
-
The error code for the response.
Values are
server_error
,rate_limit_exceeded
,invalid_prompt
,vector_store_timeout
,invalid_image
,invalid_image_format
,invalid_base64_image
,invalid_image_url
,image_too_large
,image_too_small
,image_parse_error
,image_content_policy_violation
,invalid_image_mode
,image_file_too_large
,unsupported_image_media_type
,empty_image_file
,failed_to_download_image
, orimage_file_not_found
. -
A human-readable description of the error.
-
-
Details about why the response is 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 anassistant
message with the content generated by the model, you might consider using theoutput_text
property where supported in SDKs.
Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
- The length and order of items in the
-
SDK-only convenience property that contains the aggregated text output from all
output_text
items in theoutput
array, if any are present. Supported in the Python and JavaScript SDKs. -
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Hide usage attributes Show usage attributes object
-
The number of input tokens.
-
A detailed breakdown of the input tokens.
Hide input_tokens_details attribute Show input_tokens_details attribute object
-
The number of tokens that were retrieved from the cache. More on prompt caching.
-
-
The number of output tokens.
-
A detailed breakdown of the output tokens.
-
The total number of tokens used.
-
-
Whether to allow the model to run tool calls in parallel.
Default value is
true
.
-
Emitted when a new output item is added.
Hide attributes Show attributes
-
The type of the event. Always
response.output_item.added
.Value is
response.output_item.added
. -
The index of the output item that was added.
item
object Required Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
-
Emitted when an output item is marked done.
Hide attributes Show attributes
-
The type of the event. Always
response.output_item.done
.Value is
response.output_item.done
. -
The index of the output item that was marked done.
item
object Required Any of: An output message from the model.
Hide attributes Show attributes
-
The unique ID of the output message.
-
The type of the output message. Always
message
.Value is
message
. -
The role of the output message. Always
assistant
.Value is
assistant
. -
The content of the output message.
One of: A text output from the model.
Hide attributes Show attributes
-
The type of the output text. Always
output_text
.Value is
output_text
. -
The text output from the model.
-
The annotations of the text output.
One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
-
-
The status of the message input. One of
in_progress
,completed
, orincomplete
. Populated when input items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a file search tool call. See the file search guide for more information.
Hide attributes Show attributes
-
The unique ID of the file search tool call.
-
The type of the file search tool call. Always
file_search_call
.Value is
file_search_call
. -
The status of the file search tool call. One of
in_progress
,searching
,incomplete
orfailed
,Values are
in_progress
,searching
,completed
,incomplete
, orfailed
. -
The queries used to search for files.
-
The results of the file search tool call.
Hide results attributes Show results attributes object
-
The unique ID of the file.
-
The text that was retrieved from the file.
-
The name of the file.
-
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters, booleans, or numbers.
-
The relevance score of the file - a value between 0 and 1.
-
A tool call to run a function. See the function calling guide for more information.
Hide attributes Show attributes
-
The unique ID of the function tool call.
-
The type of the function tool call. Always
function_call
.Value is
function_call
. -
The unique ID of the function tool call generated by the model.
-
The name of the function to run.
-
A JSON string of the arguments to pass to the function.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
The results of a web search tool call. See the web search guide for more information.
Hide attributes Show attributes
-
The unique ID of the web search tool call.
-
The type of the web search tool call. Always
web_search_call
.Value is
web_search_call
. -
The status of the web search tool call.
Values are
in_progress
,searching
,completed
, orfailed
.
A tool call to a computer use tool. See the computer use guide for more information.
Hide attributes Show attributes
-
The type of the computer call. Always
computer_call
.Value is
computer_call
. Default value iscomputer_call
. -
The unique ID of the computer call.
-
An identifier used when responding to the tool call with output.
action
object Required One of: A click action.
Hide attributes Show attributes
-
Specifies the event type. For a click action, this property is always set to
click
.Value is
click
. Default value isclick
. -
Indicates which mouse button was pressed during the click. One of
left
,right
,wheel
,back
, orforward
.Values are
left
,right
,wheel
,back
, orforward
. -
The x-coordinate where the click occurred.
-
The y-coordinate where the click occurred.
A double click action.
Hide attributes Show attributes
-
Specifies the event type. For a double click action, this property is always set to
double_click
.Value is
double_click
. Default value isdouble_click
. -
The x-coordinate where the double click occurred.
-
The y-coordinate where the double click occurred.
A drag action.
Hide attributes Show attributes
-
Specifies the event type. For a drag action, this property is always set to
drag
.Value is
drag
. Default value isdrag
. -
An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg
[ { x: 100, y: 200 }, { x: 200, y: 300 } ]
A series of x/y coordinate pairs in the drag path.
A collection of keypresses the model would like to perform.
Hide attributes Show attributes
-
Specifies the event type. For a keypress action, this property is always set to
keypress
.Value is
keypress
. Default value iskeypress
. -
The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.
A mouse move action.
A screenshot action.
A scroll action.
Hide attributes Show attributes
-
Specifies the event type. For a scroll action, this property is always set to
scroll
.Value is
scroll
. Default value isscroll
. -
The x-coordinate where the scroll occurred.
-
The y-coordinate where the scroll occurred.
-
The horizontal scroll distance.
-
The vertical scroll distance.
An action to type in text.
-
-
The pending safety checks for the computer call.
A pending safety check for the computer call.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
A description of the chain of thought used by a reasoning model while generating a response.
Hide attributes Show attributes
-
The type of the object. Always
reasoning
.Value is
reasoning
. -
The unique identifier of the reasoning content.
-
Reasoning text contents.
-
The status of the item. One of
in_progress
,completed
, orincomplete
. Populated when items are returned via API.Values are
in_progress
,completed
, orincomplete
.
-
Emitted when there is a partial refusal text.
Hide attributes Show attributes
-
The type of the event. Always
response.refusal.delta
.Value is
response.refusal.delta
. -
The ID of the output item that the refusal text is added to.
-
The index of the output item that the refusal text is added to.
-
The index of the content part that the refusal text is added to.
-
The refusal text that is added.
Emitted when refusal text is finalized.
Hide attributes Show attributes
-
The type of the event. Always
response.refusal.done
.Value is
response.refusal.done
. -
The ID of the output item that the refusal text is finalized.
-
The index of the output item that the refusal text is finalized.
-
The index of the content part that the refusal text is finalized.
-
The refusal text that is finalized.
Emitted when a text annotation is added.
Hide attributes Show attributes
-
The type of the event. Always
response.output_text.annotation.added
.Value is
response.output_text.annotation.added
. -
The ID of the output item that the text annotation was added to.
-
The index of the output item that the text annotation was added to.
-
The index of the content part that the text annotation was added to.
-
The index of the annotation that was added.
annotation
object Required One of: A citation to a file.
A citation for a web resource used to generate a model response.
Hide attributes Show attributes
-
The URL of the web resource.
-
The title of the web resource.
-
The type of the URL citation. Always
url_citation
.Value is
url_citation
. -
The index of the first character of the URL citation in the message.
-
The index of the last character of the URL citation in the message.
-
Emitted when there is an additional text delta.
Hide attributes Show attributes
-
The type of the event. Always
response.output_text.delta
.Value is
response.output_text.delta
. -
The ID of the output item that the text delta was added to.
-
The index of the output item that the text delta was added to.
-
The index of the content part that the text delta was added to.
-
The text delta that was added.
Emitted when text content is finalized.
Hide attributes Show attributes
-
The type of the event. Always
response.output_text.done
.Value is
response.output_text.done
. -
The ID of the output item that the text content is finalized.
-
The index of the output item that the text content is finalized.
-
The index of the content part that the text content is finalized.
-
The text content that is finalized.
Emitted when a web search call is completed.
Hide attributes Show attributes
-
The type of the event. Always
response.web_search_call.completed
.Value is
response.web_search_call.completed
. -
The index of the output item that the web search call is associated with.
-
Unique ID for the output item associated with the web search call.
Emitted when a web search call is initiated.
Hide attributes Show attributes
-
The type of the event. Always
response.web_search_call.in_progress
.Value is
response.web_search_call.in_progress
. -
The index of the output item that the web search call is associated with.
-
Unique ID for the output item associated with the web search call.
Emitted when a web search call is executing.
Hide attributes Show attributes
-
The type of the event. Always
response.web_search_call.searching
.Value is
response.web_search_call.searching
. -
The index of the output item that the web search call is associated with.
-
Unique ID for the output item associated with the web search call.