- Request
- Body
- Metadata
- ServiceTier
- ModelResponseProperties
- CreateModelResponseProperties
- ModelIds
- ReasoningEffort
- Reasoning
- ResponseFormatText
- ResponseFormatJsonSchemaSchema
- TextResponseFormatJsonSchema
- ResponseFormatJsonObject
- TextResponseFormatConfiguration
- Verbosity
- ResponseTextParam
- FunctionTool
- RankerVersionType
- HybridSearchOptions
- RankingOptions
- ComparisonFilter
- CompoundFilter
- Filters
- FileSearchTool
- WebSearchApproximateLocation
- WebSearchTool
- MCPToolFilter
- MCPTool
- ContainerMemoryLimit
- ContainerNetworkPolicyDisabledParam
- ContainerNetworkPolicyDomainSecretParam
- ContainerNetworkPolicyAllowlistParam
- AutoCodeInterpreterToolParam
- CodeInterpreterTool
- InputFidelity
- ImageGenActionEnum
- ImageGenTool
- Tool
- ToolsArray
- ToolChoiceOptions
- ToolChoiceAllowed
- ToolChoiceTypes
- ToolChoiceFunction
- ToolChoiceMCP
- ToolChoiceCustom
- SpecificApplyPatchParam
- SpecificFunctionShellParam
- ToolChoiceParam
- InputTextContent
- ImageDetail
- InputImageContent
- FileInputDetail
- InputFileContent
- ResponsePromptVariables
- Prompt
- ResponseProperties
- InputContent
- InputMessageContentList
- InputMessage
- FileCitationBody
- UrlCitationBody
- ContainerFileCitationBody
- FilePath
- Annotation
- TopLogProb
- LogProb
- OutputTextContent
- RefusalContent
- OutputMessageContent
- MessagePhase
- OutputMessage
- VectorStoreFileAttributes
- FileSearchToolCall
- WebSearchActionSearch
- WebSearchActionOpenPage
- WebSearchActionFind
- WebSearchToolCall
- FunctionToolCall
- InputTextContentParam
- InputImageContentParamAutoParam
- InputFileContentParam
- FunctionCallItemStatus
- FunctionCallOutputItemParam
- SummaryTextContent
- ReasoningTextContent
- ReasoningItem
- CompactionSummaryItemParam
- ImageGenToolCall
- CodeInterpreterOutputLogs
- CodeInterpreterOutputImage
- CodeInterpreterToolCall
- MCPListToolsTool
- MCPListTools
- MCPApprovalRequest
- MCPApprovalResponse
- MCPToolCallStatus
- MCPToolCall
- Item
- ItemReferenceParam
- InputItem
- InputParam
- IncludeEnum
- ResponseStreamOptions
- ConversationParam-2
- ConversationParam
- ContextManagementParam
- Responses
- 200 OK
- Body
- InputImageContentParamAutoParam
- InputFileContentParam
- FunctionCallOutputItemParam
- Item
- InputItem
- InputParam
- ResponseErrorCode
- ResponseError
- FunctionToolCallOutput
- FunctionToolCallOutputResource
- ToolSearchExecutionType
- ToolSearchCall
- ToolSearchOutput
- CompactionBody
- LocalShellExecAction
- LocalShellToolCall
- LocalShellToolCallOutput
- FunctionShellAction
- LocalEnvironmentResource
- ContainerReferenceResource
- FunctionShellCall
- FunctionShellCallOutputTimeoutOutcome
- FunctionShellCallOutputExitOutcome
- FunctionShellCallOutputContent
- FunctionShellCallOutput
- ApplyPatchCallStatus
- ApplyPatchCreateFileOperation
- ApplyPatchDeleteFileOperation
- ApplyPatchUpdateFileOperation
- ApplyPatchToolCall
- ApplyPatchCallOutputStatus
- ApplyPatchToolCallOutput
- MCPApprovalResponseResource
- CustomToolCall
- CustomToolCallOutput
- CustomToolCallOutputResource
- OutputItem
- ResponseUsage
- Conversation-2
- Body
- ResponseAudioDeltaEvent
- ResponseAudioDoneEvent
- ResponseAudioTranscriptDeltaEvent
- ResponseAudioTranscriptDoneEvent
- ResponseCodeInterpreterCallCodeDeltaEvent
- ResponseCodeInterpreterCallCodeDoneEvent
- ResponseCodeInterpreterCallCompletedEvent
- ResponseCodeInterpreterCallInProgressEvent
- ResponseCodeInterpreterCallInterpretingEvent
- ResponseCompletedEvent
- OutputContent
- ResponseContentPartAddedEvent
- ResponseContentPartDoneEvent
- ResponseCreatedEvent
- ResponseErrorEvent
- ResponseFileSearchCallCompletedEvent
- ResponseFileSearchCallInProgressEvent
- ResponseFileSearchCallSearchingEvent
- ResponseFunctionCallArgumentsDeltaEvent
- ResponseFunctionCallArgumentsDoneEvent
- ResponseInProgressEvent
- ResponseFailedEvent
- ResponseIncompleteEvent
- ResponseOutputItemAddedEvent
- ResponseOutputItemDoneEvent
- ResponseReasoningSummaryPartAddedEvent
- ResponseReasoningSummaryPartDoneEvent
- ResponseReasoningSummaryTextDeltaEvent
- ResponseReasoningSummaryTextDoneEvent
- ResponseReasoningTextDeltaEvent
- ResponseReasoningTextDoneEvent
- ResponseRefusalDeltaEvent
- ResponseRefusalDoneEvent
- ResponseLogProb
- ResponseTextDeltaEvent
- ResponseTextDoneEvent
- ResponseWebSearchCallCompletedEvent
- ResponseWebSearchCallInProgressEvent
- ResponseWebSearchCallSearchingEvent
- ResponseImageGenCallCompletedEvent
- ResponseImageGenCallGeneratingEvent
- ResponseImageGenCallInProgressEvent
- ResponseImageGenCallPartialImageEvent
- ResponseMCPCallArgumentsDeltaEvent
- ResponseMCPCallArgumentsDoneEvent
- ResponseMCPCallCompletedEvent
- ResponseMCPCallFailedEvent
- ResponseMCPCallInProgressEvent
- ResponseMCPListToolsCompletedEvent
- ResponseMCPListToolsFailedEvent
- ResponseMCPListToolsInProgressEvent
- ResponseOutputTextAnnotationAddedEvent
- ResponseQueuedEvent
- ResponseCustomToolCallInputDeltaEvent
- ResponseCustomToolCallInputDoneEvent
Create a request
Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom function or use built-in tools like Web Search or File Search to use your own data as input for the model's response.
Request
POST
https://ai.api.cloud.yandex.net/v1/responses
Body
application/json
{
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": "medium",
"summary": "auto",
"generate_summary": "auto"
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tools": [
{
"type": "function",
"name": "example",
"description": null,
"parameters": null,
"strict": null,
"defer_loading": true
}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": "example",
"variables": {}
},
"truncation": "disabled",
"input": "example",
"include": [
"file_search_call.results"
],
"parallel_tool_calls": true,
"store": true,
"instructions": "example",
"stream": false,
"stream_options": null,
"conversation": null,
"context_management": [
{
"type": "example",
"compact_threshold": null
}
],
"max_output_tokens": 16
}
All of 3 types
-
Type: CreateModelResponseProperties
Example
{ "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory" } -
Type: ResponseProperties
Example
{ "previous_response_id": "example", "model": "example", "reasoning": { "effort": "medium", "summary": "auto", "generate_summary": "auto" }, "background": false, "max_tool_calls": 0, "text": { "format": { "type": "text" }, "verbosity": "medium" }, "tools": [ { "type": "function", "name": "example", "description": "example", "parameters": {}, "strict": true, "defer_loading": true } ], "tool_choice": "none", "prompt": { "id": "example", "version": "example", "variables": {} }, "truncation": "disabled" } -
Type: object
context_management
Any of 2 types
-
Type: ContextManagementParam[]
Context management configuration for this request.
Min items:
1Example
[ { "type": "example", "compact_threshold": 1000 } ] -
Type: null
Example:
null
Example
[ { "type": "example", "compact_threshold": 1000 } ]conversation
Any of 2 types
-
Type: ConversationParam
The conversation that this response belongs to. Items from this conversation are prepended to
input_itemsfor this response request.
Input items and output items from this response are automatically added to this conversation after this response completes.Default:
nullExample:
example -
Type: null
Example:
null
Example:
exampleinclude
Any of 2 types
-
Type: IncludeEnum[]
Specify additional output data to include in the model response. Currently supported values are:
web_search_call.action.sources: Include the sources of the web search tool call.code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.message.output_text.logprobs: Include logprobs with assistant messages.reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when thestoreparameter is set tofalse, or when an organization is enrolled in the zero data retention program).
Example
[ "file_search_call.results" ] -
Type: null
Example:
null
Example
[ "file_search_call.results" ]input
Type: InputParam
Text, image, or file inputs to the model, used to generate a response.
Example:
exampleinstructions
Any of 2 types
-
Type: string
A system (or developer) message inserted into the model's context. When using along with
previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.Example:
example -
Type: null
Example:
null
Example:
examplemax_output_tokens
Any of 2 types
-
Type: integer
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
Min value:
16 -
Type: null
Example:
null
Example:
16parallel_tool_calls
Any of 2 types
-
Type: boolean
Whether to allow the model to run tool calls in parallel.
Default:
true -
Type: null
Example:
null
Example:
truestore
Any of 2 types
-
Type: boolean
Whether to store the generated model response for later retrieval via API.
Default:
true -
Type: null
Example:
null
Example:
truestream
Any of 2 types
-
Type: boolean
If set to true, the model response data will be streamed to the client as it is generated using server-sent events.
Default:
false -
Type: null
Example:
null
Example:
truestream_options
Type: ResponseStreamOptions
Example
{ "include_obfuscation": true }Example
{ "input": "example", "include": [ "file_search_call.results" ], "parallel_tool_calls": true, "store": true, "instructions": "example", "stream": false, "stream_options": null, "conversation": null, "context_management": [ { "type": "example", "compact_threshold": 1000 } ], "max_output_tokens": 16 } -
Metadata
Any of 2 types
-
Type: object
[additional]
Type: string
Example:
exampleSet of 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.
Example
{} -
Type: null
Example:
null
Example
{}
ServiceTier
Any of 2 types
-
Type: string
Specifies the processing type used for serving the request.
- If set to 'auto', then the request will be processed with the service tier configured in the Project settings. Unless otherwise configured, the Project will use 'default'.
- If set to 'default', then the request will be processed with the standard pricing and performance for the selected model.
- If set to 'flex' or 'priority', then the request will be processed with the corresponding service tier.
- When not set, the default behavior is 'auto'.
When the
service_tierparameter is set, the response body will include theservice_tiervalue based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.Default:
autoEnum:
auto,default,flex,scale,priority -
Type: null
Example:
null
Example: auto
ModelResponseProperties
|
Name |
Description |
|
metadata |
Type: Metadata Example
|
|
prompt_cache_key |
Type: string Used to cache responses for similar requests to optimize your cache hit rates. Replaces the Example: |
|
prompt_cache_retention |
Any of 2 types
Example: |
|
safety_identifier |
Type: string A stable identifier used to help detect users of your application that may be violating AI Studio's usage policies. Max length: Example: |
|
service_tier |
Type: ServiceTier Example: |
|
temperature |
Any of 2 types
Example: |
|
top_logprobs |
Any of 2 types
Example: |
|
top_p |
Any of 2 types
Example: |
|
user |
Type: string This field is being replaced by Example: |
Example
{
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory"
}
CreateModelResponseProperties
All of 2 types
-
Type: ModelResponseProperties
Example
{ "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory" } -
Type: object
top_logprobs
Type: integer
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.
Min value:
0Max value:
20Example
{ "top_logprobs": 0 }
Example
{
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory"
}
ModelIds
Model ID used to generate the response.
Any of 2 types
-
Type: string
Example:
example -
Type: null
Example:
null
Example: example
ReasoningEffort
Any of 2 types
-
Type: string
Constrains effort on reasoning for reasoning models.
Currently supported values arenone,minimal,low,medium,high, andxhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.Default:
mediumEnum:
none,minimal,low,medium,high,xhigh -
Type: null
Example:
null
Example: none
Reasoning
CURRENTLY NOT SUPPORTED
|
Name |
Description |
|
effort |
Type: ReasoningEffort Example: |
|
generate_summary |
Any of 2 types
Example: |
|
summary |
Any of 2 types
Example: |
Example
{
"effort": "medium",
"summary": "auto",
"generate_summary": "auto"
}
ResponseFormatText
Default response format. Used to generate text responses.
|
Name |
Description |
|
type |
Type: string The type of response format being defined. Always Const: Example: |
Example
{
"type": "text"
}
ResponseFormatJsonSchemaSchema
The schema for the response format, described as a JSON Schema object.
Learn how to build JSON schemas here.
|
Name |
Description |
Example
{}
TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses.
Learn more about Structured Outputs.
|
Name |
Description |
|
name |
Type: string 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. Example: |
|
schema |
Type: ResponseFormatJsonSchemaSchema The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here. Example
|
|
type |
Type: string The type of response format being defined. Always Const: Example: |
|
description |
Type: string A description of what the response format is for, used by the model to determine how to respond in the format. Example: |
|
strict |
Any of 2 types
Example: |
Example
{
"type": "json_schema",
"description": "example",
"name": "example",
"schema": {},
"strict": false
}
ResponseFormatJsonObject
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.
|
Name |
Description |
|
type |
Type: string The type of response format being defined. Always Const: Example: |
Example
{
"type": "json_object"
}
TextResponseFormatConfiguration
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.
The default format is { "type": "text" } with no additional options.
Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.
One of 3 types
-
Text
Type: ResponseFormatText
Default response format. Used to generate text responses.
Example
{ "type": "text" } -
JSON schema
Type: TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses.
Learn more about Structured Outputs.
Example
{ "type": "json_schema", "description": "example", "name": "example", "schema": {}, "strict": false } -
JSON object
Type: ResponseFormatJsonObject
JSON object response format. An older method of generating JSON responses.
Usingjson_schemais 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.Example
{ "type": "json_object" }
Example
{
"type": "text"
}
Verbosity
Any of 2 types
-
Type: string
Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses.
Currently supported values arelow,medium, andhigh.Default:
mediumEnum:
low,medium,high -
Type: null
Example:
null
Example: low
ResponseTextParam
Configuration options for a text response from the model. Can be plain text or structured JSON data.
|
Name |
Description |
|
format |
Type: TextResponseFormatConfiguration An object specifying the format that the model must output. Configuring The default format is Setting to Example
|
|
verbosity |
Type: Verbosity Example: |
Example
{
"format": {
"type": "text"
},
"verbosity": "medium"
}
FunctionTool
Defines a function in your own code the model can choose to call. Learn more about function calling.
|
Name |
Description |
||
|
name |
Type: string The name of the function to call. Example: |
||
|
parameters |
Any of 2 types
Example
|
||
|
strict |
Any of 2 types
Example: |
||
|
type |
Type: string The type of the function tool. Always Default: Const: |
||
|
defer_loading |
Type: boolean Whether this function is deferred and loaded via tool search. |
||
|
description |
Any of 2 types
Example: |
Example
{
"type": "function",
"name": "example",
"description": "example",
"parameters": {},
"strict": true,
"defer_loading": true
}
RankerVersionType
Type: string
Enum: auto, default-2024-11-15
HybridSearchOptions
|
Name |
Description |
|
embedding_weight |
Type: number The weight of the embedding in the reciprocal ranking fusion. |
|
text_weight |
Type: number The weight of the text in the reciprocal ranking fusion. |
Example
{
"embedding_weight": 0.5,
"text_weight": 0.5
}
RankingOptions
|
Name |
Description |
|
hybrid_search |
Type: HybridSearchOptions Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. Example
|
|
ranker |
Type: RankerVersionType The ranker to use for the file search. Enum: |
|
score_threshold |
Type: number 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. |
Example
{
"ranker": "auto",
"score_threshold": 0.5,
"hybrid_search": {
"embedding_weight": 0.5,
"text_weight": 0.5
}
}
ComparisonFilter
A filter used to compare a specified attribute key to a given value using a defined comparison operation.
|
Name |
Description |
|
key |
Type: string The key to compare against the value. Example: |
|
type |
Type: string Specifies the comparison operator:
Default: Enum: |
|
value |
One of 4 types
The value to compare against the attribute key; supports string, number, or boolean types. Example: |
Example
{
"type": "eq",
"key": "example",
"value": "example"
}
CompoundFilter
Combine multiple filters using and or or.
|
Name |
Description |
|
filters |
Type: arrayOne of 2 types
Array of filters to combine. Items can be Example
|
|
type |
Type: string Type of operation: Enum: |
Example
{
"type": "and",
"filters": [
{
"type": "eq",
"key": "example",
"value": "example"
}
]
}
Filters
Any of 2 types
-
Comparison Filter
Type: ComparisonFilter
A filter used to compare a specified attribute key to a given value using a defined comparison operation.
Example
{ "type": "eq", "key": "example", "value": "example" } -
Compound Filter
Type: CompoundFilter
Combine multiple filters using
andoror.Example
{ "type": "and", "filters": [ { "type": "eq", "key": "example", "value": "example" } ] }
Example
{
"type": "eq",
"key": "example",
"value": "example"
}
FileSearchTool
A tool that searches for relevant content from uploaded files. Learn more about the File Search tool.
|
Name |
Description |
|
type |
Type: string The type of the file search tool. Always Default: Const: |
|
vector_store_ids |
Type: string[] The IDs of the vector stores to search. Example
|
|
filters |
Any of 2 types
Example
|
|
max_num_results |
Type: integer The maximum number of results to return. This number should be between 1 and 50 inclusive. |
|
ranking_options |
Type: RankingOptions Ranking options for search. Example
|
Example
{
"type": "file_search",
"vector_store_ids": [
"example"
],
"max_num_results": 0,
"ranking_options": {
"ranker": "auto",
"score_threshold": 0.5,
"hybrid_search": {
"embedding_weight": 0.5,
"text_weight": 0.5
}
},
"filters": {
"type": "eq",
"key": "example",
"value": "example"
}
}
WebSearchApproximateLocation
Any of 2 types
-
Type: Web search approximate location
city
Any of 2 types
-
Type: string
Free text input for the city of the user, e.g.
San Francisco.Example:
example -
Type: null
Example:
null
Example:
examplecountry
Any of 2 types
-
Type: string
The two-letter ISO country code of the user, e.g.
US.Example:
example -
Type: null
Example:
null
Example:
exampleregion
Any of 2 types
-
Type: string
Free text input for the region of the user, e.g.
California.Example:
example -
Type: null
Example:
null
Example:
exampletimezone
Any of 2 types
-
Type: string
The IANA timezone of the user, e.g.
America/Los_Angeles.Example:
example -
Type: null
Example:
null
Example:
exampletype
Type: string
The type of location approximation. Always
approximate.Default:
approximateConst:
approximateThe approximate location of the user.
Example
{ "type": "approximate", "country": "example", "region": "example", "city": "example", "timezone": "example" } -
-
Type: null
Example:
null
Example
{
"type": "approximate",
"country": "example",
"region": "example",
"city": "example",
"timezone": "example"
}
WebSearchTool
Search the Internet for sources related to the prompt. Learn more about the web search tool.
|
Name |
Description |
||
|
type |
Type: string The type of the web search tool. One of Default: Enum: |
||
|
filters |
Any of 2 types
Example
|
||
|
search_context_size |
Type: string High level guidance for the amount of context window space to use for the search. One of Default: Enum: |
||
|
user_location |
Type: WebSearchApproximateLocation Example
|
Example
{
"type": "web_search",
"filters": {
"allowed_domains": []
},
"user_location": {
"type": "approximate",
"country": "example",
"region": "example",
"city": "example",
"timezone": "example"
},
"search_context_size": "medium"
}
MCPToolFilter
A filter object to specify which tools are allowed.
|
Name |
Description |
|
read_only |
Type: boolean Indicates whether or not a tool modifies data or is read-only. If an MCP server is annotated with |
|
tool_names |
Type: string[] List of allowed tool names. Example
|
Example
{
"tool_names": [
"example"
],
"read_only": true
}
MCPTool
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
|
Name |
Description |
||||
|
server_label |
Type: string A label for this MCP server, used to identify it in tool calls. Example: |
||||
|
type |
Type: string The type of the MCP tool. Always Const: Example: |
||||
|
allowed_tools |
Any of 2 types
Example
|
||||
|
authorization |
Type: string An OAuth access token that can be used with a remote MCP server, Example: |
||||
|
connector_id |
Type: string Identifier for service connectors. One of Enum: |
||||
|
defer_loading |
Type: boolean Whether this MCP tool is deferred and discovered via tool search. |
||||
|
headers |
Any of 2 types
Example
|
||||
|
require_approval |
Any of 2 types
Example
|
||||
|
server_description |
Type: string Optional description of the MCP server, used to provide more context. Example: |
||||
|
server_url |
Type: string The URL for the MCP server. One of Example: |
Example
{
"type": "mcp",
"server_label": "example",
"server_url": "example",
"connector_id": "connector_dropbox",
"authorization": "example",
"server_description": "example",
"headers": {},
"allowed_tools": [
"example"
],
"require_approval": "always",
"defer_loading": true
}
ContainerMemoryLimit
Type: string
Enum: 1g, 4g, 16g, 64g
ContainerNetworkPolicyDisabledParam
|
Name |
Description |
|
type |
Type: string Disable outbound network access. Always Default: Const: |
Example
{
"type": "disabled"
}
ContainerNetworkPolicyDomainSecretParam
|
Name |
Description |
|
domain |
Type: string The domain associated with the secret. Min length: Example: |
|
name |
Type: string The name of the secret to inject for the domain. Min length: Example: |
|
value |
Type: string The secret value to inject for the domain. Min length: Max length: Example: |
Example
{
"domain": "example",
"name": "example",
"value": "example"
}
ContainerNetworkPolicyAllowlistParam
|
Name |
Description |
|
allowed_domains |
Type: string[] A list of allowed domains when type is Min items: Example
|
|
type |
Type: string Allow outbound network access only to specified domains. Always Default: Const: |
|
domain_secrets |
Type: ContainerNetworkPolicyDomainSecretParam[] Optional domain-scoped secrets for allowlisted domains. Min items: Example
|
Example
{
"type": "allowlist",
"allowed_domains": [
"example"
],
"domain_secrets": [
{
"domain": "example",
"name": "example",
"value": "example"
}
]
}
AutoCodeInterpreterToolParam
Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.
|
Name |
Description |
|
type |
Type: string Always Default: Const: |
|
file_ids |
Type: string[] An optional list of uploaded files to make available to your code. Max items: Example
|
|
memory_limit |
Any of 2 types
Example: |
|
network_policy |
One of 2 types
Network access policy for the container. Example
|
Example
{
"type": "auto",
"file_ids": [
"example"
],
"memory_limit": "1g",
"network_policy": {
"type": "disabled"
}
}
CodeInterpreterTool
A tool that runs Python code to help generate a response to a prompt.
|
Name |
Description |
|
container |
One of 2 types
The code interpreter container. Can be a container ID or an object that specifies uploaded file IDs to make available to your code, along with an optional Example: |
|
type |
Type: string The type of the code interpreter tool. Always Const: Example: |
Example
{
"type": "code_interpreter",
"container": "example"
}
InputFidelity
Control how much effort the model will exert to match the style and features, especially facial features, of input images.
Supports high and low. Defaults to low.
Type: string
Enum: high, low
ImageGenActionEnum
Type: string
Enum: generate, edit, auto
ImageGenTool
A tool that generates images using the image generation models.
|
Name |
Description |
||||
|
type |
Type: string The type of the image generation tool. Always Const: Example: |
||||
|
action |
Type: ImageGenActionEnum Whether to generate a new image or edit an existing image. Default: Enum: |
||||
|
background |
Type: string CURRENTLY NOT SUPPORTED Background type for the generated image. One of Default: Enum: |
||||
|
input_fidelity |
Any of 2 types
Example: |
||||
|
input_image_mask |
Type: object
CURRENTLY NOT SUPPORTED Optional mask for inpainting. Contains Example
|
||||
|
model |
Any of 2 types
Example: |
||||
|
moderation |
Type: string CURRENTLY NOT SUPPORTED Moderation level for the generated image. Default: Enum: |
||||
|
output_compression |
Type: integer Compression level for the output image. Default: Min value: Max value: |
||||
|
output_format |
Type: string The output format of the generated image. One of Default: Enum: |
||||
|
partial_images |
Type: integer Number of partial images to generate in streaming mode, from 0 (default value) to 3. Default: Min value: Max value: |
||||
|
quality |
Type: string The quality of the generated image. One of Default: Enum: |
||||
|
size |
Type: string The size of the generated image. One of Default: Enum: |
Example
{
"type": "image_generation",
"model": "example",
"quality": "auto",
"size": "auto",
"output_format": "png",
"output_compression": 100,
"moderation": "auto",
"background": "auto",
"input_fidelity": "high",
"input_image_mask": {
"image_url": "example",
"file_id": "example"
},
"partial_images": 0,
"action": "generate"
}
Tool
A tool that can be used to generate a response.
One of 6 types
-
Function
Type: FunctionTool
Defines a function in your own code the model can choose to call. Learn more about function calling.
Example
{ "type": "function", "name": "example", "description": "example", "parameters": {}, "strict": true, "defer_loading": true } -
File search
Type: FileSearchTool
A tool that searches for relevant content from uploaded files. Learn more about the File Search tool.
Example
{ "type": "file_search", "vector_store_ids": [ "example" ], "max_num_results": 0, "ranking_options": { "ranker": "auto", "score_threshold": 0.5, "hybrid_search": { "embedding_weight": 0.5, "text_weight": 0.5 } }, "filters": { "type": "eq", "key": "example", "value": "example" } } -
Web search
Type: WebSearchTool
Search the Internet for sources related to the prompt. Learn more about the web search tool.
Example
{ "type": "web_search", "filters": { "allowed_domains": [] }, "user_location": { "type": "approximate", "country": "example", "region": "example", "city": "example", "timezone": "example" }, "search_context_size": "medium" } -
MCP tool
Type: MCPTool
Give the model access to additional tools via remote Model Context Protocol (MCP) servers. Learn more about MCP.
Example
{ "type": "mcp", "server_label": "example", "server_url": "example", "connector_id": "connector_dropbox", "authorization": "example", "server_description": "example", "headers": {}, "allowed_tools": [ "example" ], "require_approval": "always", "defer_loading": true } -
Code interpreter
Type: CodeInterpreterTool
A tool that runs Python code to help generate a response to a prompt.
Example
{ "type": "code_interpreter", "container": "example" } -
Image generation tool
Type: ImageGenTool
A tool that generates images using the image generation models.
Example
{ "type": "image_generation", "model": "example", "quality": "auto", "size": "auto", "output_format": "png", "output_compression": 100, "moderation": "auto", "background": "auto", "input_fidelity": "high", "input_image_mask": { "image_url": "example", "file_id": "example" }, "partial_images": 0, "action": "generate" }
Example
{
"type": "function",
"name": "example",
"description": "example",
"parameters": {},
"strict": true,
"defer_loading": true
}
ToolsArray
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. We support the following categories of tools:
-
Built-in tools: Tools that are provided by AI Studio that extend the
model's capabilities, like web search
or file search. Learn more about
built-in tools. -
MCP Tools: Integrations with third-party systems via custom MCP
servers or predefined connectors. Learn more about
MCP Tools. -
Function calls: Functions that are defined by you, enabling the model to call your own code with strongly typed arguments
and outputs. You can also use custom tools to call your own code.
Type: Tool[]
Example
[
{
"type": "function",
"name": "example",
"description": "example",
"parameters": {},
"strict": true,
"defer_loading": true
}
]
ToolChoiceOptions
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tool and instead generates a message.automeans the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools.
Type: string
Enum: none, auto, required
ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
|
Name |
Description |
|
mode |
Type: string Constrains the tools available to the model to a pre-defined set.
Enum: |
|
tools |
Type: object[]A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like:
Example
|
|
type |
Type: string Allowed tool configuration type. Always Const: Example: |
Example
{
"type": "allowed_tools",
"mode": "auto",
"tools": [
{}
]
}
ToolChoiceTypes
Indicates that the model should use a built-in tool to generate a response.
Learn more about built-in tools.
|
Name |
Description |
|
type |
Type: string The type of hosted tool the model should to use. Learn more about built-in tools. Enum: |
Example
{
"type": "file_search"
}
ToolChoiceFunction
Use this option to force the model to call a specific function.
|
Name |
Description |
|
name |
Type: string The name of the function to call. Example: |
|
type |
Type: string For function calling, the type is always Const: Example: |
Example
{
"type": "function",
"name": "example"
}
ToolChoiceMCP
Use this option to force the model to call a specific tool on a remote MCP server.
|
Name |
Description |
|
server_label |
Type: string The label of the MCP server to use. Example: |
|
type |
Type: string For MCP tools, the type is always Const: Example: |
|
name |
Any of 2 types
Example: |
Example
{
"type": "mcp",
"server_label": "example",
"name": "example"
}
ToolChoiceCustom
Use this option to force the model to call a specific custom tool.
|
Name |
Description |
|
name |
Type: string The name of the custom tool to call. Example: |
|
type |
Type: string For custom tool calling, the type is always Const: Example: |
Example
{
"type": "custom",
"name": "example"
}
SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
|
Name |
Description |
|
type |
Type: string The tool to call. Always Default: Const: |
Example
{
"type": "apply_patch"
}
SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
|
Name |
Description |
|
type |
Type: string The tool to call. Always Default: Const: |
Example
{
"type": "shell"
}
ToolChoiceParam
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 8 types
-
Tool choice mode
Type: ToolChoiceOptions
Controls which (if any) tool is called by the model.
nonemeans the model will not call any tool and instead generates a message.automeans the model can pick between generating a message or calling one or more tools.requiredmeans the model must call one or more tools.
Enum:
none,auto,required -
Allowed tools
Type: ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
Example
{ "type": "allowed_tools", "mode": "auto", "tools": [ {} ] } -
Hosted tool
Type: ToolChoiceTypes
Indicates that the model should use a built-in tool to generate a response.
Learn more about built-in tools.Example
{ "type": "file_search" } -
Function tool
Type: ToolChoiceFunction
Use this option to force the model to call a specific function.
Example
{ "type": "function", "name": "example" } -
MCP tool
Type: ToolChoiceMCP
Use this option to force the model to call a specific tool on a remote MCP server.
Example
{ "type": "mcp", "server_label": "example", "name": "example" } -
Custom tool
Type: ToolChoiceCustom
Use this option to force the model to call a specific custom tool.
Example
{ "type": "custom", "name": "example" } -
Specific apply patch tool choice
Type: SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
Example
{ "type": "apply_patch" } -
Specific shell tool choice
Type: SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
Example
{ "type": "shell" }
Example: none
InputTextContent
A text input to the model.
|
Name |
Description |
|
text |
Type: string The text input to the model. Example: |
|
type |
Type: string The type of the input item. Always Default: Const: |
Example
{
"type": "input_text",
"text": "example"
}
ImageDetail
Type: string
Enum: low, high, auto, original
InputImageContent
An image input to the model.
|
Name |
Description |
|
detail |
Type: ImageDetail The detail level of the image to be sent to the model. One of Enum: |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
file_id |
Any of 2 types
Example: |
|
image_url |
Any of 2 types
Example: |
Example
{
"type": "input_image",
"image_url": "example",
"file_id": "example",
"detail": "low"
}
FileInputDetail
Type: string
Enum: low, high
InputFileContent
A file input to the model.
|
Name |
Description |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
detail |
Type: FileInputDetail The detail level of the file to be sent to the model. Use Enum: |
|
file_data |
Type: string The content of the file to be sent to the model. Example: |
|
file_id |
Any of 2 types
Example: |
|
file_url |
Type: string The URL of the file to be sent to the model. Example: |
|
filename |
Type: string The name of the file to be sent to the model. Example: |
Example
{
"type": "input_file",
"file_id": "example",
"filename": "example",
"file_data": "example",
"file_url": "example",
"detail": "low"
}
ResponsePromptVariables
Any of 2 types
-
Type: Prompt Variables
[additional]
One of 4 types
-
Type: string
Example:
example -
Input text
Type: InputTextContent
A text input to the model.
Example
{ "type": "input_text", "text": "example" } -
Input image
Type: InputImageContent
An image input to the model.
Example
{ "type": "input_image", "image_url": "example", "file_id": "example", "detail": "low" } -
Input file
Type: InputFileContent
A file input to the model.
Example
{ "type": "input_file", "file_id": "example", "filename": "example", "file_data": "example", "file_url": "example", "detail": "low" }
Example:
exampleOptional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files.
Example
{} -
-
Type: null
Example:
null
Example
{}
Prompt
Any of 2 types
-
Type: object
id
Type: string
The unique identifier of the prompt template to use.
Example:
examplevariables
Type: ResponsePromptVariables
Example
{}version
Any of 2 types
-
Type: string
Optional version of the prompt template.
Example:
example -
Type: null
Example:
null
Example:
exampleReference to a prompt template and its variables.
Example
{ "id": "example", "version": "example", "variables": {} } -
-
Type: null
Example:
null
Example
{
"id": "example",
"version": "example",
"variables": {}
}
ResponseProperties
|
Name |
Description |
|
background |
Any of 2 types
Example: |
|
max_tool_calls |
Any of 2 types
Example: |
|
model |
Type: ModelIds Model ID used to generate the response. Model ID used to generate the response. Example: |
|
previous_response_id |
Any of 2 types
Example: |
|
prompt |
Type: Prompt Example
|
|
reasoning |
Any of 2 types
Example
|
|
text |
Type: ResponseTextParam Configuration options for a text response from the model. Can be plain text or structured JSON data. Example
|
|
tool_choice |
Type: ToolChoiceParam How the model should select which tool (or tools) to use when generating a response. See the Example: |
|
tools |
Type: ToolsArray An array of tools the model may call while generating a response. You can specify which tool to use by setting the
Example
|
|
truncation |
Any of 2 types
Example: |
Example
{
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": "medium",
"summary": "auto",
"generate_summary": "auto"
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tools": [
{
"type": "function",
"name": "example",
"description": "example",
"parameters": {},
"strict": true,
"defer_loading": true
}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": "example",
"variables": {}
},
"truncation": "disabled"
}
InputContent
One of 3 types
-
Input text
Type: InputTextContent
A text input to the model.
Example
{ "type": "input_text", "text": "example" } -
Input image
Type: InputImageContent
An image input to the model.
Example
{ "type": "input_image", "image_url": "example", "file_id": "example", "detail": "low" } -
Input file
Type: InputFileContent
A file input to the model.
Example
{ "type": "input_file", "file_id": "example", "filename": "example", "file_data": "example", "file_url": "example", "detail": "low" }
Example
{
"type": "input_text",
"text": "example"
}
InputMessageContentList
A list of one or many input items to the model, containing different content types.
Type: InputContent[]
Example
[
{
"type": "input_text",
"text": "example"
}
]
InputMessage
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role.
|
Name |
Description |
|
content |
Type: InputMessageContentList A list of one or many input items to the model, containing different content types. Example
|
|
role |
Type: string The role of the message input. One of Enum: |
|
status |
Type: string The status of item. One of Enum: |
|
type |
Type: string The type of the message input. Always set to Const: Example: |
Example
{
"type": "message",
"role": "user",
"status": "in_progress",
"content": [
{
"type": "input_text",
"text": "example"
}
]
}
FileCitationBody
A citation to a file.
|
Name |
Description |
|
file_id |
Type: string The ID of the file. Example: |
|
filename |
Type: string The filename of the file cited. Example: |
|
index |
Type: integer The index of the file in the list of files. |
|
type |
Type: string The type of the file citation. Always Default: Const: |
Example
{
"type": "file_citation",
"file_id": "example",
"index": 0,
"filename": "example"
}
UrlCitationBody
A citation for a web resource used to generate a model response.
|
Name |
Description |
|
end_index |
Type: integer The index of the last character of the URL citation in the message. |
|
start_index |
Type: integer The index of the first character of the URL citation in the message. |
|
title |
Type: string The title of the web resource. Example: |
|
type |
Type: string The type of the URL citation. Always Default: Const: |
|
url |
Type: string The URL of the web resource. Example: |
Example
{
"type": "url_citation",
"url": "example",
"start_index": 0,
"end_index": 0,
"title": "example"
}
ContainerFileCitationBody
A citation for a container file used to generate a model response.
|
Name |
Description |
|
container_id |
Type: string The ID of the container file. Example: |
|
end_index |
Type: integer The index of the last character of the container file citation in the message. |
|
file_id |
Type: string The ID of the file. Example: |
|
filename |
Type: string The filename of the container file cited. Example: |
|
start_index |
Type: integer The index of the first character of the container file citation in the message. |
|
type |
Type: string The type of the container file citation. Always Default: Const: |
Example
{
"type": "container_file_citation",
"container_id": "example",
"file_id": "example",
"start_index": 0,
"end_index": 0,
"filename": "example"
}
FilePath
A path to a file.
|
Name |
Description |
|
file_id |
Type: string The ID of the file. Example: |
|
index |
Type: integer The index of the file in the list of files. |
|
type |
Type: string The type of the file path. Always Const: Example: |
Example
{
"type": "file_path",
"file_id": "example",
"index": 0
}
Annotation
An annotation that applies to a span of output text.
One of 4 types
-
File citation
Type: FileCitationBody
A citation to a file.
Example
{ "type": "file_citation", "file_id": "example", "index": 0, "filename": "example" } -
URL citation
Type: UrlCitationBody
A citation for a web resource used to generate a model response.
Example
{ "type": "url_citation", "url": "example", "start_index": 0, "end_index": 0, "title": "example" } -
Container file citation
Type: ContainerFileCitationBody
A citation for a container file used to generate a model response.
Example
{ "type": "container_file_citation", "container_id": "example", "file_id": "example", "start_index": 0, "end_index": 0, "filename": "example" } -
File path
Type: FilePath
A path to a file.
Example
{ "type": "file_path", "file_id": "example", "index": 0 }
Example
{
"type": "file_citation",
"file_id": "example",
"index": 0,
"filename": "example"
}
TopLogProb
The top log probability of a token.
|
Name |
Description |
|
bytes |
Type: integer[] Example
|
|
logprob |
Type: number |
|
token |
Type: string Example: |
Example
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
]
}
LogProb
The log probability of a token.
|
Name |
Description |
|
bytes |
Type: integer[] Example
|
|
logprob |
Type: number |
|
token |
Type: string Example: |
|
top_logprobs |
Type: TopLogProb[] Example
|
Example
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
],
"top_logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
]
}
]
}
OutputTextContent
A text output from the model.
|
Name |
Description |
|
annotations |
Type: Annotation[] The annotations of the text output. Example
|
|
logprobs |
Type: LogProb[] Example
|
|
text |
Type: string The text output from the model. Example: |
|
type |
Type: string The type of the output text. Always Default: Const: |
Example
{
"type": "output_text",
"text": "example",
"annotations": [
{
"type": "file_citation",
"file_id": "example",
"index": 0,
"filename": "example"
}
],
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
],
"top_logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
null
]
}
]
}
]
}
RefusalContent
A refusal from the model.
|
Name |
Description |
|
refusal |
Type: string The refusal explanation from the model. Example: |
|
type |
Type: string The type of the refusal. Always Default: Const: |
Example
{
"type": "refusal",
"refusal": "example"
}
OutputMessageContent
One of 2 types
-
Output text
Type: OutputTextContent
A text output from the model.
Example
{ "type": "output_text", "text": "example", "annotations": [ { "type": "file_citation", "file_id": "example", "index": 0, "filename": "example" } ], "logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ 0 ], "top_logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ null ] } ] } ] } -
Refusal
Type: RefusalContent
A refusal from the model.
Example
{ "type": "refusal", "refusal": "example" }
Example
{
"type": "output_text",
"text": "example",
"annotations": [
{
"type": "file_citation",
"file_id": "example",
"index": 0,
"filename": "example"
}
],
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
],
"top_logprobs": [
{}
]
}
]
}
MessagePhase
Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). Not used for user messages.
Type: string
Enum: commentary, final_answer
OutputMessage
An output message from the model.
|
Name |
Description |
|
content |
Type: OutputMessageContent[] The content of the output message. Example
|
|
id |
Type: string The unique ID of the output message. Example: |
|
role |
Type: string The role of the output message. Always Const: Example: |
|
status |
Type: string The status of the message input. One of Enum: |
|
type |
Type: string The type of the output message. Always Const: Example: |
|
phase |
Any of 2 types
Example: |
Example
{
"id": "example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "example",
"annotations": [
null
],
"logprobs": [
{}
]
}
],
"phase": "commentary",
"status": "in_progress"
}
VectorStoreFileAttributes
Any of 2 types
-
Type: object
[additional]
One of 3 types
-
Type: string
Max length:
512Example:
example -
Type: number
-
Type: boolean
Example:
exampleSet of 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.
Max properties:
16Example
{} -
-
Type: unknown
Example:
null
Default: null
FileSearchToolCall
The results of a File Search tool call.
|
Name |
Description |
||||||||||
|
id |
Type: string The unique ID of the file search tool call. Example: |
||||||||||
|
queries |
Type: string[] The queries used to search for files. Example
|
||||||||||
|
status |
Type: string The status of the file search tool call. One of Enum: |
||||||||||
|
type |
Type: string The type of the file search tool call. Always Const: Example: |
||||||||||
|
results |
Any of 2 types
Example
|
Example
{
"id": "example",
"type": "file_search_call",
"status": "in_progress",
"queries": [
"example"
],
"results": [
{
"file_id": "example",
"text": "example",
"filename": "example",
"attributes": null,
"score": 0.5
}
]
}
WebSearchActionSearch
Action type "search" - Performs a web search query.
|
Name |
Description |
||||
|
query |
Type: string [DEPRECATED] The search query. Example: |
||||
|
type |
Type: string The action type. Const: Example: |
||||
|
queries |
Type: string[] The search queries. Example
|
||||
|
sources |
Type: Web search source
The sources used in the search. Example
|
Example
{
"type": "search",
"query": "example",
"queries": [
"example"
],
"sources": [
{
"type": "url",
"url": "example"
}
]
}
WebSearchActionOpenPage
Action type "open_page" - Opens a specific URL from search results.
|
Name |
Description |
|
type |
Type: string The action type. Const: Example: |
|
url |
Any of 2 types
The URL opened by the model. Example: |
Example
{
"type": "open_page",
"url": "https://example.com"
}
WebSearchActionFind
Action type "find_in_page": Searches for a pattern within a loaded page.
|
Name |
Description |
|
pattern |
Type: string The pattern or text to search for within the page. Example: |
|
type |
Type: string The action type. Const: Example: |
|
url |
Type: string<uri> The URL of the page searched for the pattern. Example: |
Example
{
"type": "find_in_page",
"url": "https://example.com",
"pattern": "example"
}
WebSearchToolCall
The results of a web search tool call.
|
Name |
Description |
|
action |
Type: object One of 3 types
An object describing the specific action taken in this web search call. Includes details on how the model used the web (search, open_page, find_in_page). Example
|
|
id |
Type: string The unique ID of the web search tool call. Example: |
|
status |
Type: string The status of the web search tool call. Enum: |
|
type |
Type: string The type of the web search tool call. Always Const: Example: |
Example
{
"id": "example",
"type": "web_search_call",
"status": "in_progress",
"action": {
"type": "search",
"query": "example",
"queries": [
"example"
],
"sources": [
{
"type": "url",
"url": "example"
}
]
}
}
FunctionToolCall
A tool call to run a function.
|
Name |
Description |
|
arguments |
Type: string A JSON string of the arguments to pass to the function. Example: |
|
call_id |
Type: string The unique ID of the function tool call generated by the model. Example: |
|
name |
Type: string The name of the function to run. Example: |
|
type |
Type: string The type of the function tool call. Always Const: Example: |
|
id |
Type: string The unique ID of the function tool call. Example: |
|
namespace |
Type: string The namespace of the function to run. Example: |
|
status |
Type: string The status of the item. One of Enum: |
Example
{
"id": "example",
"type": "function_call",
"call_id": "example",
"namespace": "example",
"name": "example",
"arguments": "example",
"status": "in_progress"
}
InputTextContentParam
A text input to the model.
|
Name |
Description |
|
text |
Type: string The text input to the model. Max length: Example: |
|
type |
Type: string The type of the input item. Always Default: Const: |
Example
{
"type": "input_text",
"text": "example"
}
InputImageContentParamAutoParam
An image input to the model.
|
Name |
Description |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
detail |
Any of 2 types
Example: |
|
file_id |
Any of 2 types
Example: |
|
image_url |
Any of 2 types
Example: |
Example
{
"type": "input_image",
"image_url": "example",
"file_id": "fvtdeb81rt1d978c5hvb",
"detail": "low"
}
InputFileContentParam
A file input to the model.
|
Name |
Description |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
detail |
Type: FileDetailEnum The detail level of the file to be sent to the model. Use Enum: |
|
file_data |
Any of 2 types
Example: |
|
file_id |
Any of 2 types
Example: |
|
file_url |
Any of 2 types
Example: |
|
filename |
Any of 2 types
Example: |
Example
{
"type": "input_file",
"file_id": "fvtdeb81rt1d978c5hvb",
"filename": "example",
"file_data": "example",
"file_url": "example",
"detail": "low"
}
FunctionCallItemStatus
Type: string
Enum: in_progress, completed, incomplete
FunctionCallOutputItemParam
The output of a function tool call.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the function tool call generated by the model. Min length: Max length: Example: |
|
output |
One of 2 types
Text, image, or file output of the function tool call. Example: |
|
type |
Type: string The type of the function tool call output. Always Default: Const: |
|
id |
Any of 2 types
Example: |
|
status |
Any of 2 types
Example: |
Example
{
"id": "example",
"call_id": "example",
"type": "function_call_output",
"output": "example",
"status": "in_progress"
}
SummaryTextContent
A summary text from the model.
|
Name |
Description |
|
text |
Type: string A summary of the reasoning output from the model so far. Example: |
|
type |
Type: string The type of the object. Always Default: Const: |
Example
{
"type": "summary_text",
"text": "example"
}
ReasoningTextContent
Reasoning text from the model.
|
Name |
Description |
|
text |
Type: string The reasoning text from the model. Example: |
|
type |
Type: string The type of the reasoning text. Always Default: Const: |
Example
{
"type": "reasoning_text",
"text": "example"
}
ReasoningItem
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your input to the Responses API for subsequent turns of a conversation if you are manually managing context.
|
Name |
Description |
|
id |
Type: string The unique identifier of the reasoning content. Example: |
|
summary |
Type: SummaryTextContent[] Reasoning summary content. Example
|
|
type |
Type: string The type of the object. Always Const: Example: |
|
content |
Type: ReasoningTextContent[] Reasoning text content. Example
|
|
encrypted_content |
Any of 2 types
Example: |
|
status |
Type: string The status of the item. One of Enum: |
Example
{
"type": "reasoning",
"id": "example",
"encrypted_content": "example",
"summary": [
{
"type": "summary_text",
"text": "example"
}
],
"content": [
{
"type": "reasoning_text",
"text": "example"
}
],
"status": "in_progress"
}
CompactionSummaryItemParam
A compaction item generated by the v1/responses/compact API.
|
Name |
Description |
|
encrypted_content |
Type: string The encrypted content of the compaction summary. Max length: Example: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
id |
Any of 2 types
Example: |
Example
{
"id": "example",
"type": "compaction",
"encrypted_content": "example"
}
ImageGenToolCall
An image generation request made by the model.
|
Name |
Description |
|
id |
Type: string The unique ID of the image generation call. Example: |
|
result |
Any of 2 types
Example: |
|
status |
Type: string The status of the image generation call. Enum: |
|
type |
Type: string The type of the image generation call. Always Const: Example: |
Example
{
"type": "image_generation_call",
"id": "example",
"status": "in_progress",
"result": "example"
}
CodeInterpreterOutputLogs
The logs output from the code interpreter.
|
Name |
Description |
|
logs |
Type: string The logs output from the code interpreter. Example: |
|
type |
Type: string The type of the output. Always Default: Const: |
Example
{
"type": "logs",
"logs": "example"
}
CodeInterpreterOutputImage
The image output from the code interpreter.
|
Name |
Description |
|
type |
Type: string The type of the output. Always Default: Const: |
|
url |
Type: string The URL of the image output from the code interpreter. Example: |
Example
{
"type": "image",
"url": "example"
}
CodeInterpreterToolCall
A tool call to run code.
|
Name |
Description |
|
code |
Any of 2 types
Example: |
|
container_id |
Type: string The ID of the container used to run the code. Example: |
|
id |
Type: string The unique ID of the code interpreter tool call. Example: |
|
outputs |
Any of 2 types
Example
|
|
status |
Type: string The status of the code interpreter tool call. Valid values are Enum: |
|
type |
Type: string The type of the code interpreter tool call. Always Default: Const: |
Example
{
"type": "code_interpreter_call",
"id": "example",
"status": "in_progress",
"container_id": "example",
"code": "example",
"outputs": [
{
"type": "logs",
"logs": "example"
}
]
}
MCPListToolsTool
A tool available on an MCP server.
|
Name |
Description |
|
input_schema |
Type: object The JSON schema describing the tool's input. Example
|
|
name |
Type: string The name of the tool. Example: |
|
annotations |
Any of 2 types
Example
|
|
description |
Any of 2 types
Example: |
Example
{
"name": "example",
"description": "example",
"input_schema": {},
"annotations": {}
}
MCPListTools
A list of tools available on an MCP server.
|
Name |
Description |
|
id |
Type: string The unique ID of the list. Example: |
|
server_label |
Type: string The label of the MCP server. Example: |
|
tools |
Type: MCPListToolsTool[] The tools available on the server. Example
|
|
type |
Type: string The type of the item. Always Const: Example: |
|
error |
Any of 2 types
Example: |
Example
{
"type": "mcp_list_tools",
"id": "example",
"server_label": "example",
"tools": [
{
"name": "example",
"description": "example",
"input_schema": {},
"annotations": {}
}
],
"error": "example"
}
MCPApprovalRequest
A request for human approval of a tool invocation.
|
Name |
Description |
|
arguments |
Type: string A JSON string of arguments for the tool. Example: |
|
id |
Type: string The unique ID of the approval request. Example: |
|
name |
Type: string The name of the tool to run. Example: |
|
server_label |
Type: string The label of the MCP server making the request. Example: |
|
type |
Type: string The type of the item. Always Const: Example: |
Example
{
"type": "mcp_approval_request",
"id": "example",
"server_label": "example",
"name": "example",
"arguments": "example"
}
MCPApprovalResponse
A response to an MCP approval request.
|
Name |
Description |
|
approval_request_id |
Type: string The ID of the approval request being answered. Example: |
|
approve |
Type: boolean Whether the request was approved. |
|
type |
Type: string The type of the item. Always Const: Example: |
|
id |
Any of 2 types
Example: |
|
reason |
Any of 2 types
Example: |
Example
{
"type": "mcp_approval_response",
"id": "example",
"approval_request_id": "example",
"approve": true,
"reason": "example"
}
MCPToolCallStatus
Type: string
Enum: in_progress, completed, incomplete, calling, failed
MCPToolCall
An invocation of a tool on an MCP server.
|
Name |
Description |
|
arguments |
Type: string A JSON string of the arguments passed to the tool. Example: |
|
id |
Type: string The unique ID of the tool call. Example: |
|
name |
Type: string The name of the tool that was run. Example: |
|
server_label |
Type: string The label of the MCP server running the tool. Example: |
|
type |
Type: string The type of the item. Always Const: Example: |
|
approval_request_id |
Any of 2 types
Example: |
|
error |
Any of 2 types
Example: |
|
output |
Any of 2 types
Example: |
|
status |
Type: MCPToolCallStatus The status of the tool call. One of Enum: |
Example
{
"type": "mcp_call",
"id": "example",
"server_label": "example",
"name": "example",
"arguments": "example",
"output": "example",
"error": "example",
"status": "in_progress",
"approval_request_id": "example"
}
Item
Content item used to generate a response.
Type: object
One of 14 types
-
Input message
Type: InputMessage
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole.Example
{ "type": "message", "role": "user", "status": "in_progress", "content": [ { "type": "input_text", "text": "example" } ] } -
Output message
Type: OutputMessage
An output message from the model.
Example
{ "id": "example", "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "example", "annotations": [ null ], "logprobs": [ {} ] } ], "phase": "commentary", "status": "in_progress" } -
File search tool call
Type: FileSearchToolCall
The results of a File Search tool call.
Example
{ "id": "example", "type": "file_search_call", "status": "in_progress", "queries": [ "example" ], "results": [ { "file_id": "example", "text": "example", "filename": "example", "attributes": null, "score": 0.5 } ] } -
Web search tool call
Type: WebSearchToolCall
The results of a web search tool call.
Example
{ "id": "example", "type": "web_search_call", "status": "in_progress", "action": { "type": "search", "query": "example", "queries": [ "example" ], "sources": [ { "type": "url", "url": "example" } ] } } -
Function tool call
Type: FunctionToolCall
A tool call to run a function.
Example
{ "id": "example", "type": "function_call", "call_id": "example", "namespace": "example", "name": "example", "arguments": "example", "status": "in_progress" } -
Function tool call output
Type: FunctionCallOutputItemParam
The output of a function tool call.
Example
{ "id": "example", "call_id": "example", "type": "function_call_output", "output": "example", "status": "in_progress" } -
Reasoning
Type: ReasoningItem
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
inputto the Responses API for subsequent turns of a conversation if you are manually managing context.Example
{ "type": "reasoning", "id": "example", "encrypted_content": "example", "summary": [ { "type": "summary_text", "text": "example" } ], "content": [ { "type": "reasoning_text", "text": "example" } ], "status": "in_progress" } -
Compaction item
Type: CompactionSummaryItemParam
A compaction item generated by the
v1/responses/compactAPI.Example
{ "id": "example", "type": "compaction", "encrypted_content": "example" } -
Image generation call
Type: ImageGenToolCall
An image generation request made by the model.
Example
{ "type": "image_generation_call", "id": "example", "status": "in_progress", "result": "example" } -
Code interpreter tool call
Type: CodeInterpreterToolCall
A tool call to run code.
Example
{ "type": "code_interpreter_call", "id": "example", "status": "in_progress", "container_id": "example", "code": "example", "outputs": [ { "type": "logs", "logs": "example" } ] } -
MCP list tools
Type: MCPListTools
A list of tools available on an MCP server.
Example
{ "type": "mcp_list_tools", "id": "example", "server_label": "example", "tools": [ { "name": "example", "description": "example", "input_schema": {}, "annotations": {} } ], "error": "example" } -
MCP approval request
Type: MCPApprovalRequest
A request for human approval of a tool invocation.
Example
{ "type": "mcp_approval_request", "id": "example", "server_label": "example", "name": "example", "arguments": "example" } -
MCP approval response
Type: MCPApprovalResponse
A response to an MCP approval request.
Example
{ "type": "mcp_approval_response", "id": "example", "approval_request_id": "example", "approve": true, "reason": "example" } -
MCP tool call
Type: MCPToolCall
An invocation of a tool on an MCP server.
Example
{ "type": "mcp_call", "id": "example", "server_label": "example", "name": "example", "arguments": "example", "output": "example", "error": "example", "status": "in_progress", "approval_request_id": "example" }
Example
{
"type": "message",
"role": "user",
"status": "in_progress",
"content": [
{
"type": "input_text",
"text": "example"
}
]
}
ItemReferenceParam
An internal identifier for an item to reference.
|
Name |
Description |
|
id |
Type: string The ID of the item to reference. Example: |
|
type |
Any of 2 types
Example: |
Example
{
"type": "item_reference",
"id": "example"
}
InputItem
One of 2 types
-
Item
Type: Item
An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs.
Content item used to generate a response.
Example
{ "type": "message", "role": "user", "status": "in_progress", "content": [ { "type": "input_text", "text": "example" } ] } -
Item reference
Type: ItemReferenceParam
An internal identifier for an item to reference.
Example
{ "type": "item_reference", "id": "example" }
Example
{
"type": "message",
"role": "user",
"status": "in_progress",
"content": [
{}
]
}
InputParam
Text, image, or file inputs to the model, used to generate a response.
One of: Text input or Input item list
-
Text input
Type: string
A text input to the model, equivalent to a text input with the
userrole.Example:
example -
Input item list
Type: InputItem[]
A list of one or many input items to the model, containing different content types.
Example
[ { "type": "message", "role": "user", "status": "in_progress", "content": [ null ] } ]
Example: example
IncludeEnum
Specify additional output data to include in the model response. Currently supported values are:
web_search_call.action.sources: Include the sources of the web search tool call.code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items.computer_call_output.output.image_url: Include image urls from the computer call output.file_search_call.results: Include the search results of the file search tool call.message.input_image.image_url: Include image urls from the input message.message.output_text.logprobs: Include logprobs with assistant messages.reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when thestoreparameter is set tofalse, or when an organization is enrolled in the zero data retention program).
Type: string
Enum: file_search_call.results, web_search_call.results, web_search_call.action.sources, message.input_image.image_url, computer_call_output.output.image_url, code_interpreter_call.outputs, reasoning.encrypted_content, message.output_text.logprobs
ResponseStreamOptions
Any of 2 types
-
Type: object | null
include_obfuscation
Type: boolean
When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an
obfuscationfield on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks.
These obfuscation fields are included by default, but add a small amount of overhead to the data stream. You can setinclude_obfuscationto false to optimize for bandwidth if you trust the network links between your application and the OpenAI API.Options for streaming responses. Only set this when you set
stream: true.Default:
nullExample
{ "include_obfuscation": true } -
Type: null
Example:
null
Example
{
"include_obfuscation": true
}
ConversationParam-2
The conversation that this response belongs to.
|
Name |
Description |
|
id |
Type: string The unique ID of the conversation. Example: |
Example
{
"id": "example"
}
ConversationParam
The conversation that this response belongs to. Items from this conversation are prepended to input_items for this response request.
Input items and output items from this response are automatically added to this conversation after this response completes.
One of 2 types
-
Conversation ID
Type: string
The unique ID of the conversation.
Example:
example -
Conversation object
Type: ConversationParam-2
The conversation that this response belongs to.
Example
{ "id": "example" }
Default: null
ContextManagementParam
|
Name |
Description |
|
type |
Type: string The context management entry type. Currently only 'compaction' is supported. Example: |
|
compact_threshold |
Any of 2 types
Example: |
Example
{
"type": "example",
"compact_threshold": 1000
}
Responses
200 OK
OK
Body
application/json
{
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": "medium",
"summary": "auto",
"generate_summary": "auto"
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {
"type": "text"
},
"verbosity": "medium"
},
"tools": [
{
"type": "function",
"name": "example",
"description": null,
"parameters": null,
"strict": null,
"defer_loading": true
}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": "example",
"variables": {}
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{
"id": "example",
"type": "message",
"role": "assistant",
"content": [
null
],
"phase": null,
"status": "in_progress"
}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
}
All of 3 types
-
Type: ModelResponseProperties
Example
{ "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory" } -
Type: ResponseProperties
Example
{ "previous_response_id": "example", "model": "example", "reasoning": { "effort": "medium", "summary": "auto", "generate_summary": "auto" }, "background": false, "max_tool_calls": 0, "text": { "format": { "type": "text" }, "verbosity": "medium" }, "tools": [ { "type": "function", "name": "example", "description": "example", "parameters": {}, "strict": true, "defer_loading": true } ], "tool_choice": "none", "prompt": { "id": "example", "version": "example", "variables": {} }, "truncation": "disabled" } -
Type: object
created_at
Type: number
Unix timestamp (in seconds) of when this Response was created.
error
Type: ResponseError
Example
{ "code": "server_error", "message": "example" }id
Type: string
Unique identifier for this Response.
Example:
exampleincomplete_details
Any of 2 types
-
Type: object
reason
Type: string
The reason why the response is incomplete.
Enum:
max_output_tokens,content_filterDetails about why the response is incomplete.
Example
{ "reason": "max_output_tokens" } -
Type: null
Example:
null
Example
{ "reason": "max_output_tokens" }instructions
Any of 2 types
-
One of 2 types
-
Type: string
A text input to the model, equivalent to a text input with the
developerrole.Example:
example -
Input item list
Type: InputItem[]
A list of one or many input items to the model, containing different content types.
Example
[ { "type": "message", "role": "user", "status": "in_progress", "content": [ null ] } ]
A system (or developer) message inserted into the model's context.
When using along withprevious_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.Example:
example -
-
Type: null
Example:
null
Example:
exampleobject
Type: string
The object type of this resource - always set to
response.Const:
responseExample:
exampleoutput
Type: OutputItem[]
An array of content items generated by the model.
- The length and order of items in the
outputarray is dependent
on the model's response. - Rather than accessing the first item in the
outputarray and
assuming it's anassistantmessage with the content generated by
the model, you might consider using theoutput_textproperty where
supported in SDKs.
Example
[ { "id": "example", "type": "message", "role": "assistant", "content": [ {} ], "phase": "commentary", "status": "in_progress" } ]parallel_tool_calls
Type: boolean
Whether to allow the model to run tool calls in parallel.
Default:
truecompleted_at
Any of 2 types
-
Type: number
Unix timestamp (in seconds) of when this Response was completed.
Only present when the status iscompleted. -
Type: null
Example:
null
Example:
0.5conversation
Any of 2 types
-
Conversation
Type: Conversation-2
The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.
Default:
null -
Type: null
Example:
null
Example
{ "id": "example" }max_output_tokens
Any of 2 types
-
Type: integer
An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.
-
Type: null
Example:
null
Example:
0output_text
Any of 2 types
-
Type: string
SDK-only convenience property that contains the aggregated text output from all
output_textitems in theoutputarray, if any are present.
Supported in the Python and JavaScript OpenAI SDKs.Example:
example -
Type: null
Example:
null
Example:
examplestatus
Type: string
The status of the response generation. One of
completed,failed,in_progress,cancelled,queued, orincomplete.Enum:
completed,failed,in_progress,cancelled,queued,incompleteusage
Type: ResponseUsage
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
Example
{ "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }Example
{ "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ { "id": "example", "type": "message", "role": "assistant", "content": [ null ], "phase": "commentary", "status": "in_progress" } ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 } -
InputImageContentParamAutoParam
An image input to the model.
|
Name |
Description |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
detail |
Any of 2 types
Example: |
|
file_id |
Any of 2 types
Example: |
|
image_url |
Any of 2 types
Example: |
Example
{
"type": "input_image",
"image_url": "example",
"file_id": "fvtdeb81rt1d978c5hvb",
"detail": "low"
}
InputFileContentParam
A file input to the model.
|
Name |
Description |
|
type |
Type: string The type of the input item. Always Default: Const: |
|
detail |
Type: FileDetailEnum The detail level of the file to be sent to the model. Use Enum: |
|
file_data |
Any of 2 types
Example: |
|
file_id |
Any of 2 types
Example: |
|
file_url |
Any of 2 types
Example: |
|
filename |
Any of 2 types
Example: |
Example
{
"type": "input_file",
"file_id": "fvtdeb81rt1d978c5hvb",
"filename": "example",
"file_data": "example",
"file_url": "example",
"detail": "low"
}
FunctionCallOutputItemParam
The output of a function tool call.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the function tool call generated by the model. Min length: Max length: Example: |
|
output |
One of 2 types
Text, image, or file output of the function tool call. Example: |
|
type |
Type: string The type of the function tool call output. Always Default: Const: |
|
id |
Any of 2 types
Example: |
|
status |
Any of 2 types
Example: |
Example
{
"id": "example",
"call_id": "example",
"type": "function_call_output",
"output": "example",
"status": "in_progress"
}
Item
Content item used to generate a response.
Type: object
One of 14 types
-
Input message
Type: InputMessage
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole.Example
{ "type": "message", "role": "user", "status": "in_progress", "content": [ { "type": "input_text", "text": "example" } ] } -
Output message
Type: OutputMessage
An output message from the model.
Example
{ "id": "example", "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "example", "annotations": [ null ], "logprobs": [ {} ] } ], "phase": "commentary", "status": "in_progress" } -
File search tool call
Type: FileSearchToolCall
The results of a File Search tool call.
Example
{ "id": "example", "type": "file_search_call", "status": "in_progress", "queries": [ "example" ], "results": [ { "file_id": "example", "text": "example", "filename": "example", "attributes": null, "score": 0.5 } ] } -
Web search tool call
Type: WebSearchToolCall
The results of a web search tool call.
Example
{ "id": "example", "type": "web_search_call", "status": "in_progress", "action": { "type": "search", "query": "example", "queries": [ "example" ], "sources": [ { "type": "url", "url": "example" } ] } } -
Function tool call
Type: FunctionToolCall
A tool call to run a function.
Example
{ "id": "example", "type": "function_call", "call_id": "example", "namespace": "example", "name": "example", "arguments": "example", "status": "in_progress" } -
Function tool call output
Type: FunctionCallOutputItemParam
The output of a function tool call.
Example
{ "id": "example", "call_id": "example", "type": "function_call_output", "output": "example", "status": "in_progress" } -
Reasoning
Type: ReasoningItem
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
inputto the Responses API for subsequent turns of a conversation if you are manually managing context.Example
{ "type": "reasoning", "id": "example", "encrypted_content": "example", "summary": [ { "type": "summary_text", "text": "example" } ], "content": [ { "type": "reasoning_text", "text": "example" } ], "status": "in_progress" } -
Compaction item
Type: CompactionSummaryItemParam
A compaction item generated by the
v1/responses/compactAPI.Example
{ "id": "example", "type": "compaction", "encrypted_content": "example" } -
Image generation call
Type: ImageGenToolCall
An image generation request made by the model.
Example
{ "type": "image_generation_call", "id": "example", "status": "in_progress", "result": "example" } -
Code interpreter tool call
Type: CodeInterpreterToolCall
A tool call to run code.
Example
{ "type": "code_interpreter_call", "id": "example", "status": "in_progress", "container_id": "example", "code": "example", "outputs": [ { "type": "logs", "logs": "example" } ] } -
MCP list tools
Type: MCPListTools
A list of tools available on an MCP server.
Example
{ "type": "mcp_list_tools", "id": "example", "server_label": "example", "tools": [ { "name": "example", "description": "example", "input_schema": {}, "annotations": {} } ], "error": "example" } -
MCP approval request
Type: MCPApprovalRequest
A request for human approval of a tool invocation.
Example
{ "type": "mcp_approval_request", "id": "example", "server_label": "example", "name": "example", "arguments": "example" } -
MCP approval response
Type: MCPApprovalResponse
A response to an MCP approval request.
Example
{ "type": "mcp_approval_response", "id": "example", "approval_request_id": "example", "approve": true, "reason": "example" } -
MCP tool call
Type: MCPToolCall
An invocation of a tool on an MCP server.
Example
{ "type": "mcp_call", "id": "example", "server_label": "example", "name": "example", "arguments": "example", "output": "example", "error": "example", "status": "in_progress", "approval_request_id": "example" }
Example
{
"type": "message",
"role": "user",
"status": "in_progress",
"content": [
{
"type": "input_text",
"text": "example"
}
]
}
InputItem
One of 2 types
-
Item
Type: Item
An item representing part of the context for the response to be generated by the model. Can contain text, images, and audio inputs, as well as previous assistant responses and tool call outputs.
Content item used to generate a response.
Example
{ "type": "message", "role": "user", "status": "in_progress", "content": [ { "type": "input_text", "text": "example" } ] } -
Item reference
Type: ItemReferenceParam
An internal identifier for an item to reference.
Example
{ "type": "item_reference", "id": "example" }
Example
{
"type": "message",
"role": "user",
"status": "in_progress",
"content": [
{}
]
}
InputParam
Text, image, or file inputs to the model, used to generate a response.
One of: Text input or Input item list
-
Text input
Type: string
A text input to the model, equivalent to a text input with the
userrole.Example:
example -
Input item list
Type: InputItem[]
A list of one or many input items to the model, containing different content types.
Example
[ { "type": "message", "role": "user", "status": "in_progress", "content": [ null ] } ]
Example: example
ResponseErrorCode
The error code for the response.
Type: string
Enum: 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, image_file_not_found
ResponseError
Any of 2 types
-
Type: object
code
Type: ResponseErrorCode
The error code for the response.
Enum:
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,image_file_not_foundmessage
Type: string
A human-readable description of the error.
Example:
exampleAn error object returned when the model fails to generate a Response.
Example
{ "code": "server_error", "message": "example" } -
Type: null
Example:
null
Example
{
"code": "server_error",
"message": "example"
}
FunctionToolCallOutput
The output of a function tool call.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the function tool call generated by the model. Example: |
|
output |
One of: string output or output content list
The output from the function call generated by your code. Example: |
|
type |
Type: string The type of the function tool call output. Always Const: Example: |
|
id |
Type: string The unique ID of the function tool call output. Populated when this item is returned via API. Example: |
|
status |
Type: string The status of the item. One of Enum: |
Example
{
"id": "example",
"type": "function_call_output",
"call_id": "example",
"output": "example",
"status": "in_progress"
}
FunctionToolCallOutputResource
All of 2 types
-
Function tool call output
Type: FunctionToolCallOutput
The output of a function tool call.
Example
{ "id": "example", "type": "function_call_output", "call_id": "example", "output": "example", "status": "in_progress" } -
Type: object
id
Type: string
The unique ID of the function call tool output.
Example:
examplestatus
Type: FunctionCallOutputStatusEnum
The status of the item. One of
in_progress,completed, orincomplete. Populated when items are returned via API.Enum:
in_progress,completed,incompletecreated_by
Type: string
The identifier of the actor that created the item.
Example:
exampleExample
{ "id": "example", "status": "in_progress", "created_by": "example" }
Example
{
"id": "example",
"type": "function_call_output",
"call_id": "example",
"output": "example",
"status": "in_progress",
"created_by": "example"
}
ToolSearchExecutionType
Type: string
Enum: server, client
ToolSearchCall
|
Name |
Description |
|
arguments |
Type: unknown Arguments used for the tool search call. Example: |
|
call_id |
Any of 2 types
Example: |
|
execution |
Type: ToolSearchExecutionType Whether tool search was executed by the server or by the client. Enum: |
|
id |
Type: string The unique ID of the tool search call item. Example: |
|
status |
Type: FunctionCallStatus The status of the tool search call item that was recorded. Enum: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The identifier of the actor that created the item. Example: |
Example
{
"type": "tool_search_call",
"id": "example",
"call_id": "example",
"execution": "server",
"arguments": null,
"status": "in_progress",
"created_by": "example"
}
ToolSearchOutput
|
Name |
Description |
|
call_id |
Any of 2 types
Example: |
|
execution |
Type: ToolSearchExecutionType Whether tool search was executed by the server or by the client. Enum: |
|
id |
Type: string The unique ID of the tool search output item. Example: |
|
status |
Type: FunctionCallOutputStatusEnum The status of the tool search output item that was recorded. Enum: |
|
tools |
Type: Tool[] The loaded tool definitions returned by tool search. Example
|
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The identifier of the actor that created the item. Example: |
Example
{
"type": "tool_search_output",
"id": "example",
"call_id": "example",
"execution": "server",
"tools": [
{
"type": "function",
"name": "example",
"description": "example",
"parameters": {},
"strict": true,
"defer_loading": true
}
],
"status": "in_progress",
"created_by": "example"
}
CompactionBody
A compaction item generated by the v1/responses/compact API.
|
Name |
Description |
|
encrypted_content |
Type: string The encrypted content that was produced by compaction. Example: |
|
id |
Type: string The unique ID of the compaction item. Example: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The identifier of the actor that created the item. Example: |
Example
{
"type": "compaction",
"id": "example",
"encrypted_content": "example",
"created_by": "example"
}
LocalShellExecAction
Execute a shell command on the server.
|
Name |
Description |
||
|
command |
Type: string[] The command to run. Example
|
||
|
env |
Type: object
Environment variables to set for the command. Example
|
||
|
type |
Type: string The type of the local shell action. Always Default: Const: |
||
|
timeout_ms |
Any of 2 types
Example: |
||
|
user |
Any of 2 types
Example: |
||
|
working_directory |
Any of 2 types
Example: |
Example
{
"type": "exec",
"command": [
"example"
],
"timeout_ms": 0,
"working_directory": "example",
"env": {},
"user": "example"
}
LocalShellToolCall
A tool call to run a command on the local shell.
|
Name |
Description |
|
action |
Type: LocalShellExecAction Execute a shell command on the server. Example
|
|
call_id |
Type: string The unique ID of the local shell tool call generated by the model. Example: |
|
id |
Type: string The unique ID of the local shell call. Example: |
|
status |
Type: string The status of the local shell call. Enum: |
|
type |
Type: string The type of the local shell call. Always Const: Example: |
Example
{
"type": "local_shell_call",
"id": "example",
"call_id": "example",
"action": {
"type": "exec",
"command": [
"example"
],
"timeout_ms": 0,
"working_directory": "example",
"env": {},
"user": "example"
},
"status": "in_progress"
}
LocalShellToolCallOutput
The output of a local shell tool call.
|
Name |
Description |
|
id |
Type: string The unique ID of the local shell tool call generated by the model. Example: |
|
output |
Type: string A JSON string of the output of the local shell tool call. Example: |
|
type |
Type: string The type of the local shell tool call output. Always Const: Example: |
|
status |
Any of 2 types
Example: |
Example
{
"type": "local_shell_call_output",
"id": "example",
"output": "example",
"status": "in_progress"
}
FunctionShellAction
Execute a shell command.
|
Name |
Description |
|
commands |
Type: string[] Example
|
|
max_output_length |
Any of 2 types
Example: |
|
timeout_ms |
Any of 2 types
Example: |
Example
{
"commands": [
"example"
],
"timeout_ms": 0,
"max_output_length": 0
}
LocalEnvironmentResource
Represents the use of a local environment to perform shell actions.
|
Name |
Description |
|
type |
Type: string The environment type. Always Default: Const: |
Example
{
"type": "local"
}
ContainerReferenceResource
Represents a container created with /v1/containers.
|
Name |
Description |
|
container_id |
Type: string Example: |
|
type |
Type: string The environment type. Always Default: Const: |
Example
{
"type": "container_reference",
"container_id": "example"
}
FunctionShellCall
A tool call that executes one or more shell commands in a managed environment.
|
Name |
Description |
|
action |
Type: FunctionShellAction The shell commands and limits that describe how to run the tool call. Execute a shell command. Example
|
|
call_id |
Type: string The unique ID of the shell tool call generated by the model. Example: |
|
environment |
Any of 2 types
Example
|
|
id |
Type: string The unique ID of the shell tool call. Populated when this item is returned via API. Example: |
|
status |
Type: LocalShellCallStatus The status of the shell call. One of Enum: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The ID of the entity that created this tool call. Example: |
Example
{
"type": "shell_call",
"id": "example",
"call_id": "example",
"action": {
"commands": [
"example"
],
"timeout_ms": 0,
"max_output_length": 0
},
"status": "in_progress",
"environment": {
"type": "local"
},
"created_by": "example"
}
FunctionShellCallOutputTimeoutOutcome
Indicates that the shell call exceeded its configured time limit.
|
Name |
Description |
|
type |
Type: string The outcome type. Always Default: Const: |
Example
{
"type": "timeout"
}
FunctionShellCallOutputExitOutcome
Indicates that the shell commands finished and returned an exit code.
|
Name |
Description |
|
exit_code |
Type: integer Exit code from the shell process. |
|
type |
Type: string The outcome type. Always Default: Const: |
Example
{
"type": "exit",
"exit_code": 0
}
FunctionShellCallOutputContent
The content of a shell tool call output that was emitted.
|
Name |
Description |
|
outcome |
One of 2 types
Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. Example
|
|
stderr |
Type: string The standard error output that was captured. Example: |
|
stdout |
Type: string The standard output that was captured. Example: |
|
created_by |
Type: string The identifier of the actor that created the item. Example: |
Example
{
"stdout": "example",
"stderr": "example",
"outcome": {
"type": "timeout"
},
"created_by": "example"
}
FunctionShellCallOutput
The output of a shell tool call that was emitted.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the shell tool call generated by the model. Example: |
|
id |
Type: string The unique ID of the shell call output. Populated when this item is returned via API. Example: |
|
max_output_length |
Any of 2 types
Example: |
|
output |
Type: FunctionShellCallOutputContent[] An array of shell call output contents Example
|
|
status |
Type: LocalShellCallOutputStatusEnum The status of the shell call output. One of Enum: |
|
type |
Type: string The type of the shell call output. Always Default: Const: |
|
created_by |
Type: string The identifier of the actor that created the item. Example: |
Example
{
"type": "shell_call_output",
"id": "example",
"call_id": "example",
"status": "in_progress",
"output": [
{
"stdout": "example",
"stderr": "example",
"outcome": {
"type": "timeout"
},
"created_by": "example"
}
],
"max_output_length": 0,
"created_by": "example"
}
ApplyPatchCallStatus
Type: string
Enum: in_progress, completed
ApplyPatchCreateFileOperation
Instruction describing how to create a file via the apply_patch tool.
|
Name |
Description |
|
diff |
Type: string Diff to apply. Example: |
|
path |
Type: string Path of the file to create. Example: |
|
type |
Type: string Create a new file with the provided diff. Default: Const: |
Example
{
"type": "create_file",
"path": "example",
"diff": "example"
}
ApplyPatchDeleteFileOperation
Instruction describing how to delete a file via the apply_patch tool.
|
Name |
Description |
|
path |
Type: string Path of the file to delete. Example: |
|
type |
Type: string Delete the specified file. Default: Const: |
Example
{
"type": "delete_file",
"path": "example"
}
ApplyPatchUpdateFileOperation
Instruction describing how to update a file via the apply_patch tool.
|
Name |
Description |
|
diff |
Type: string Diff to apply. Example: |
|
path |
Type: string Path of the file to update. Example: |
|
type |
Type: string Update an existing file with the provided diff. Default: Const: |
Example
{
"type": "update_file",
"path": "example",
"diff": "example"
}
ApplyPatchToolCall
A tool call that applies file diffs by creating, deleting, or updating files.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the apply patch tool call generated by the model. Example: |
|
id |
Type: string The unique ID of the apply patch tool call. Populated when this item is returned via API. Example: |
|
operation |
One of 3 types
One of the create_file, delete_file, or update_file operations applied via apply_patch. Example
|
|
status |
Type: ApplyPatchCallStatus The status of the apply patch tool call. One of Enum: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The ID of the entity that created this tool call. Example: |
Example
{
"type": "apply_patch_call",
"id": "example",
"call_id": "example",
"status": "in_progress",
"operation": {
"type": "create_file",
"path": "example",
"diff": "example"
},
"created_by": "example"
}
ApplyPatchCallOutputStatus
Type: string
Enum: completed, failed
ApplyPatchToolCallOutput
The output emitted by an apply patch tool call.
|
Name |
Description |
|
call_id |
Type: string The unique ID of the apply patch tool call generated by the model. Example: |
|
id |
Type: string The unique ID of the apply patch tool call output. Populated when this item is returned via API. Example: |
|
status |
Type: ApplyPatchCallOutputStatus The status of the apply patch tool call output. One of Enum: |
|
type |
Type: string The type of the item. Always Default: Const: |
|
created_by |
Type: string The ID of the entity that created this tool call output. Example: |
|
output |
Any of 2 types
Example: |
Example
{
"type": "apply_patch_call_output",
"id": "example",
"call_id": "example",
"status": "completed",
"output": "example",
"created_by": "example"
}
MCPApprovalResponseResource
A response to an MCP approval request.
|
Name |
Description |
|
approval_request_id |
Type: string The ID of the approval request being answered. Example: |
|
approve |
Type: boolean Whether the request was approved. |
|
id |
Type: string The unique ID of the approval response Example: |
|
type |
Type: string The type of the item. Always Const: Example: |
|
reason |
Any of 2 types
Example: |
Example
{
"type": "mcp_approval_response",
"id": "example",
"approval_request_id": "example",
"approve": true,
"reason": "example"
}
CustomToolCall
A call to a custom tool created by the model.
|
Name |
Description |
|
call_id |
Type: string An identifier used to map this custom tool call to a tool call output. Example: |
|
input |
Type: string The input for the custom tool call generated by the model. Example: |
|
name |
Type: string The name of the custom tool being called. Example: |
|
type |
Type: string The type of the custom tool call. Always Const: Example: |
|
id |
Type: string The unique ID of the custom tool call in the OpenAI platform. Example: |
|
namespace |
Type: string The namespace of the custom tool being called. Example: |
Example
{
"type": "custom_tool_call",
"id": "example",
"call_id": "example",
"namespace": "example",
"name": "example",
"input": "example"
}
CustomToolCallOutput
The output of a custom tool call from your code, being sent back to the model.
|
Name |
Description |
|
call_id |
Type: string The call ID, used to map this custom tool call output to a custom tool call. Example: |
|
output |
One of: string output or output content list
The output from the custom tool call generated by your code. Can be a string or an list of output content. Example: |
|
type |
Type: string The type of the custom tool call output. Always Const: Example: |
|
id |
Type: string The unique ID of the custom tool call output in the AI Studio platform. Example: |
Example
{
"type": "custom_tool_call_output",
"id": "example",
"call_id": "example",
"output": "example"
}
CustomToolCallOutputResource
All of 2 types
-
Custom tool call output
Type: CustomToolCallOutput
The output of a custom tool call from your code, being sent back to the model.
Example
{ "type": "custom_tool_call_output", "id": "example", "call_id": "example", "output": "example" } -
Type: object
id
Type: string
The unique ID of the custom tool call output item.
Example:
examplestatus
Type: FunctionCallOutputStatusEnum
The status of the item. One of
in_progress,completed, orincomplete. Populated when items are returned via API.Enum:
in_progress,completed,incompletecreated_by
Type: string
The identifier of the actor that created the item.
Example:
exampleExample
{ "id": "example", "status": "in_progress", "created_by": "example" }
Example
{
"type": "custom_tool_call_output",
"id": "example",
"call_id": "example",
"output": "example",
"status": "in_progress",
"created_by": "example"
}
OutputItem
One of 23 types
-
Output message
Type: OutputMessage
An output message from the model.
Example
{ "id": "example", "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "example", "annotations": [ null ], "logprobs": [ {} ] } ], "phase": "commentary", "status": "in_progress" } -
File search tool call
Type: FileSearchToolCall
The results of a File Search tool call.
Example
{ "id": "example", "type": "file_search_call", "status": "in_progress", "queries": [ "example" ], "results": [ { "file_id": "example", "text": "example", "filename": "example", "attributes": null, "score": 0.5 } ] } -
Function tool call
Type: FunctionToolCall
A tool call to run a function.
Example
{ "id": "example", "type": "function_call", "call_id": "example", "namespace": "example", "name": "example", "arguments": "example", "status": "in_progress" } -
Type: FunctionToolCallOutputResource
Example
{ "id": "example", "type": "function_call_output", "call_id": "example", "output": "example", "status": "in_progress", "created_by": "example" } -
Web search tool call
Type: WebSearchToolCall
The results of a web search tool call.
Example
{ "id": "example", "type": "web_search_call", "status": "in_progress", "action": { "type": "search", "query": "example", "queries": [ "example" ], "sources": [ { "type": "url", "url": "example" } ] } } -
Reasoning
Type: ReasoningItem
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
inputto the Responses API for subsequent turns of a conversation if you are manually managing context.Example
{ "type": "reasoning", "id": "example", "encrypted_content": "example", "summary": [ { "type": "summary_text", "text": "example" } ], "content": [ { "type": "reasoning_text", "text": "example" } ], "status": "in_progress" } -
Type: ToolSearchCall
Example
{ "type": "tool_search_call", "id": "example", "call_id": "example", "execution": "server", "arguments": null, "status": "in_progress", "created_by": "example" } -
Type: ToolSearchOutput
Example
{ "type": "tool_search_output", "id": "example", "call_id": "example", "execution": "server", "tools": [ { "type": "function", "name": "example", "description": "example", "parameters": {}, "strict": true, "defer_loading": true } ], "status": "in_progress", "created_by": "example" } -
Compaction item
Type: CompactionBody
A compaction item generated by the
v1/responses/compactAPI.Example
{ "type": "compaction", "id": "example", "encrypted_content": "example", "created_by": "example" } -
Image generation call
Type: ImageGenToolCall
An image generation request made by the model.
Example
{ "type": "image_generation_call", "id": "example", "status": "in_progress", "result": "example" } -
Code interpreter tool call
Type: CodeInterpreterToolCall
A tool call to run code.
Example
{ "type": "code_interpreter_call", "id": "example", "status": "in_progress", "container_id": "example", "code": "example", "outputs": [ { "type": "logs", "logs": "example" } ] } -
Local shell call
Type: LocalShellToolCall
A tool call to run a command on the local shell.
Example
{ "type": "local_shell_call", "id": "example", "call_id": "example", "action": { "type": "exec", "command": [ "example" ], "timeout_ms": 0, "working_directory": "example", "env": {}, "user": "example" }, "status": "in_progress" } -
Local shell call output
Type: LocalShellToolCallOutput
The output of a local shell tool call.
Example
{ "type": "local_shell_call_output", "id": "example", "output": "example", "status": "in_progress" } -
Shell tool call
Type: FunctionShellCall
A tool call that executes one or more shell commands in a managed environment.
Example
{ "type": "shell_call", "id": "example", "call_id": "example", "action": { "commands": [ "example" ], "timeout_ms": 0, "max_output_length": 0 }, "status": "in_progress", "environment": { "type": "local" }, "created_by": "example" } -
Shell call output
Type: FunctionShellCallOutput
The output of a shell tool call that was emitted.
Example
{ "type": "shell_call_output", "id": "example", "call_id": "example", "status": "in_progress", "output": [ { "stdout": "example", "stderr": "example", "outcome": { "type": "timeout" }, "created_by": "example" } ], "max_output_length": 0, "created_by": "example" } -
Apply patch tool call
Type: ApplyPatchToolCall
A tool call that applies file diffs by creating, deleting, or updating files.
Example
{ "type": "apply_patch_call", "id": "example", "call_id": "example", "status": "in_progress", "operation": { "type": "create_file", "path": "example", "diff": "example" }, "created_by": "example" } -
Apply patch tool call output
Type: ApplyPatchToolCallOutput
The output emitted by an apply patch tool call.
Example
{ "type": "apply_patch_call_output", "id": "example", "call_id": "example", "status": "completed", "output": "example", "created_by": "example" } -
MCP tool call
Type: MCPToolCall
An invocation of a tool on an MCP server.
Example
{ "type": "mcp_call", "id": "example", "server_label": "example", "name": "example", "arguments": "example", "output": "example", "error": "example", "status": "in_progress", "approval_request_id": "example" } -
MCP list tools
Type: MCPListTools
A list of tools available on an MCP server.
Example
{ "type": "mcp_list_tools", "id": "example", "server_label": "example", "tools": [ { "name": "example", "description": "example", "input_schema": {}, "annotations": {} } ], "error": "example" } -
MCP approval request
Type: MCPApprovalRequest
A request for human approval of a tool invocation.
Example
{ "type": "mcp_approval_request", "id": "example", "server_label": "example", "name": "example", "arguments": "example" } -
MCP approval response
Type: MCPApprovalResponseResource
A response to an MCP approval request.
Example
{ "type": "mcp_approval_response", "id": "example", "approval_request_id": "example", "approve": true, "reason": "example" } -
Custom tool call
Type: CustomToolCall
A call to a custom tool created by the model.
Example
{ "type": "custom_tool_call", "id": "example", "call_id": "example", "namespace": "example", "name": "example", "input": "example" } -
ResponseCustomToolCallOutputItem
Type: CustomToolCallOutputResource
Example
{ "type": "custom_tool_call_output", "id": "example", "call_id": "example", "output": "example", "status": "in_progress", "created_by": "example" }
Example
{
"id": "example",
"type": "message",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "example",
"annotations": [
null
],
"logprobs": [
null
]
}
],
"phase": "commentary",
"status": "in_progress"
}
ResponseUsage
Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used.
|
Name |
Description |
||
|
input_tokens |
Type: integer The number of input tokens. |
||
|
input_tokens_details |
Type: object
A detailed breakdown of the input tokens. Example
|
||
|
output_tokens |
Type: integer The number of output tokens. |
||
|
output_tokens_details |
Type: object
A detailed breakdown of the output tokens. Example
|
||
|
total_tokens |
Type: integer The total number of tokens used. |
Example
{
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
}
Conversation-2
The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.
|
Name |
Description |
|
id |
Type: string The unique ID of the conversation that this response was associated with. Example: |
Example
{
"id": "example"
}
Body
text/event-stream
{
"type": "response.audio.delta",
"sequence_number": 0,
"delta": "example"
}
Any of 53 types
-
Type: ResponseAudioDeltaEvent
Emitted when there is a partial audio response.
Example
{ "type": "response.audio.delta", "sequence_number": 0, "delta": "example" } -
Type: ResponseAudioDoneEvent
Emitted when the audio response is complete.
Example
{ "type": "response.audio.done", "sequence_number": 0 } -
Type: ResponseAudioTranscriptDeltaEvent
Emitted when there is a partial transcript of audio.
Example
{ "type": "response.audio.transcript.delta", "delta": "example", "sequence_number": 0 } -
Type: ResponseAudioTranscriptDoneEvent
Emitted when the full audio transcript is completed.
Example
{ "type": "response.audio.transcript.done", "sequence_number": 0 } -
Type: ResponseCodeInterpreterCallCodeDeltaEvent
Emitted when a partial code snippet is streamed by the code interpreter.
Example
{ "type": "response.code_interpreter_call_code.delta", "output_index": 0, "item_id": "example", "delta": "example", "sequence_number": 0 } -
Type: ResponseCodeInterpreterCallCodeDoneEvent
Emitted when the code snippet is finalized by the code interpreter.
Example
{ "type": "response.code_interpreter_call_code.done", "output_index": 0, "item_id": "example", "code": "example", "sequence_number": 0 } -
Type: ResponseCodeInterpreterCallCompletedEvent
Emitted when the code interpreter call is completed.
Example
{ "type": "response.code_interpreter_call.completed", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseCodeInterpreterCallInProgressEvent
Emitted when a code interpreter call is in progress.
Example
{ "type": "response.code_interpreter_call.in_progress", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseCodeInterpreterCallInterpretingEvent
Emitted when the code interpreter is actively interpreting the code snippet.
Example
{ "type": "response.code_interpreter_call.interpreting", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseCompletedEvent
Emitted when the model response is complete.
Example
{ "type": "response.completed", "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 }, "sequence_number": 0 } -
Type: ResponseContentPartAddedEvent
Emitted when a new content part is added.
Example
{ "type": "response.content_part.added", "item_id": "example", "output_index": 0, "content_index": 0, "part": { "type": "output_text", "text": "example", "annotations": [ {} ], "logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ null ], "top_logprobs": [ null ] } ] }, "sequence_number": 0 } -
Type: ResponseContentPartDoneEvent
Emitted when a content part is done.
Example
{ "type": "response.content_part.done", "item_id": "example", "output_index": 0, "content_index": 0, "sequence_number": 0, "part": { "type": "output_text", "text": "example", "annotations": [ {} ], "logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ null ], "top_logprobs": [ null ] } ] } } -
Type: ResponseCreatedEvent
An event that is emitted when a response is created.
Example
{ "type": "response.created", "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 }, "sequence_number": 0 } -
Type: ResponseErrorEvent
Emitted when an error occurs.
Example
{ "type": "error", "code": "example", "message": "example", "param": "example", "sequence_number": 0 } -
Type: ResponseFileSearchCallCompletedEvent
Emitted when a file search call is completed (results found).
Example
{ "type": "response.file_search_call.completed", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseFileSearchCallInProgressEvent
Emitted when a file search call is initiated.
Example
{ "type": "response.file_search_call.in_progress", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseFileSearchCallSearchingEvent
Emitted when a file search is currently searching.
Example
{ "type": "response.file_search_call.searching", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseFunctionCallArgumentsDeltaEvent
Emitted when there is a partial function-call arguments delta.
Example
{ "type": "response.function_call_arguments.delta", "item_id": "example", "output_index": 0, "sequence_number": 0, "delta": "example" } -
Type: ResponseFunctionCallArgumentsDoneEvent
Emitted when function-call arguments are finalized.
Example
{ "type": "response.function_call_arguments.done", "item_id": "example", "name": "example", "output_index": 0, "sequence_number": 0, "arguments": "example" } -
Type: ResponseInProgressEvent
Emitted when the response is in progress.
Example
{ "type": "response.in_progress", "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 }, "sequence_number": 0 } -
Type: ResponseFailedEvent
An event that is emitted when a response fails.
Example
{ "type": "response.failed", "sequence_number": 0, "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 } } -
Type: ResponseIncompleteEvent
An event that is emitted when a response finishes as incomplete.
Example
{ "type": "response.incomplete", "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 }, "sequence_number": 0 } -
Type: ResponseOutputItemAddedEvent
Emitted when a new output item is added.
Example
{ "type": "response.output_item.added", "output_index": 0, "sequence_number": 0, "item": { "id": "example", "type": "message", "role": "assistant", "content": [ {} ], "phase": "commentary", "status": "in_progress" } } -
Type: ResponseOutputItemDoneEvent
Emitted when an output item is marked done.
Example
{ "type": "response.output_item.done", "output_index": 0, "sequence_number": 0, "item": { "id": "example", "type": "message", "role": "assistant", "content": [ {} ], "phase": "commentary", "status": "in_progress" } } -
Type: ResponseReasoningSummaryPartAddedEvent
Emitted when a new reasoning summary part is added.
Example
{ "type": "response.reasoning_summary_part.added", "item_id": "example", "output_index": 0, "summary_index": 0, "sequence_number": 0, "part": { "type": "summary_text", "text": "example" } } -
Type: ResponseReasoningSummaryPartDoneEvent
Emitted when a reasoning summary part is completed.
Example
{ "type": "response.reasoning_summary_part.done", "item_id": "example", "output_index": 0, "summary_index": 0, "sequence_number": 0, "part": { "type": "summary_text", "text": "example" } } -
Type: ResponseReasoningSummaryTextDeltaEvent
Emitted when a delta is added to a reasoning summary text.
Example
{ "type": "response.reasoning_summary_text.delta", "item_id": "example", "output_index": 0, "summary_index": 0, "delta": "example", "sequence_number": 0 } -
Type: ResponseReasoningSummaryTextDoneEvent
Emitted when a reasoning summary text is completed.
Example
{ "type": "response.reasoning_summary_text.done", "item_id": "example", "output_index": 0, "summary_index": 0, "text": "example", "sequence_number": 0 } -
Type: ResponseReasoningTextDeltaEvent
Emitted when a delta is added to a reasoning text.
Example
{ "type": "response.reasoning_text.delta", "item_id": "example", "output_index": 0, "content_index": 0, "delta": "example", "sequence_number": 0 } -
Type: ResponseReasoningTextDoneEvent
Emitted when a reasoning text is completed.
Example
{ "type": "response.reasoning_text.done", "item_id": "example", "output_index": 0, "content_index": 0, "text": "example", "sequence_number": 0 } -
Type: ResponseRefusalDeltaEvent
Emitted when there is a partial refusal text.
Example
{ "type": "response.refusal.delta", "item_id": "example", "output_index": 0, "content_index": 0, "delta": "example", "sequence_number": 0 } -
Type: ResponseRefusalDoneEvent
Emitted when refusal text is finalized.
Example
{ "type": "response.refusal.done", "item_id": "example", "output_index": 0, "content_index": 0, "refusal": "example", "sequence_number": 0 } -
Type: ResponseTextDeltaEvent
Emitted when there is an additional text delta.
Example
{ "type": "response.output_text.delta", "item_id": "example", "output_index": 0, "content_index": 0, "delta": "example", "sequence_number": 0, "logprobs": [ { "token": "example", "logprob": 0.5, "top_logprobs": [ { "token": "example", "logprob": 0.5 } ] } ] } -
Type: ResponseTextDoneEvent
Emitted when text content is finalized.
Example
{ "type": "response.output_text.done", "item_id": "example", "output_index": 0, "content_index": 0, "text": "example", "sequence_number": 0, "logprobs": [ { "token": "example", "logprob": 0.5, "top_logprobs": [ { "token": "example", "logprob": 0.5 } ] } ] } -
Type: ResponseWebSearchCallCompletedEvent
Emitted when a web search call is completed.
Example
{ "type": "response.web_search_call.completed", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseWebSearchCallInProgressEvent
Emitted when a web search call is initiated.
Example
{ "type": "response.web_search_call.in_progress", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
Type: ResponseWebSearchCallSearchingEvent
Emitted when a web search call is executing.
Example
{ "type": "response.web_search_call.searching", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
ResponseImageGenCallCompletedEvent
Type: ResponseImageGenCallCompletedEvent
Emitted when an image generation tool call has completed and the final image is available.
Example
{ "type": "response.image_generation_call.completed", "output_index": 0, "sequence_number": 0, "item_id": "example" } -
ResponseImageGenCallGeneratingEvent
Type: ResponseImageGenCallGeneratingEvent
Emitted when an image generation tool call is actively generating an image (intermediate state).
Example
{ "type": "response.image_generation_call.generating", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
ResponseImageGenCallInProgressEvent
Type: ResponseImageGenCallInProgressEvent
Emitted when an image generation tool call is in progress.
Example
{ "type": "response.image_generation_call.in_progress", "output_index": 0, "item_id": "example", "sequence_number": 0 } -
ResponseImageGenCallPartialImageEvent
Type: ResponseImageGenCallPartialImageEvent
Emitted when a partial image is available during image generation streaming.
Example
{ "type": "response.image_generation_call.partial_image", "output_index": 0, "item_id": "example", "sequence_number": 0, "partial_image_index": 0, "partial_image_b64": "example" } -
ResponseMCPCallArgumentsDeltaEvent
Type: ResponseMCPCallArgumentsDeltaEvent
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
Example
{ "type": "response.mcp_call_arguments.delta", "output_index": 0, "item_id": "example", "delta": "example", "sequence_number": 0 } -
ResponseMCPCallArgumentsDoneEvent
Type: ResponseMCPCallArgumentsDoneEvent
Emitted when the arguments for an MCP tool call are finalized.
Example
{ "type": "response.mcp_call_arguments.done", "output_index": 0, "item_id": "example", "arguments": "example", "sequence_number": 0 } -
ResponseMCPCallCompletedEvent
Type: ResponseMCPCallCompletedEvent
Emitted when an MCP tool call has completed successfully.
Example
{ "type": "response.mcp_call.completed", "item_id": "example", "output_index": 0, "sequence_number": 0 } -
ResponseMCPCallFailedEvent
Type: ResponseMCPCallFailedEvent
Emitted when an MCP tool call has failed.
Example
{ "type": "response.mcp_call.failed", "item_id": "example", "output_index": 0, "sequence_number": 0 } -
ResponseMCPCallInProgressEvent
Type: ResponseMCPCallInProgressEvent
Emitted when an MCP tool call is in progress.
Example
{ "type": "response.mcp_call.in_progress", "sequence_number": 0, "output_index": 0, "item_id": "example" } -
ResponseMCPListToolsCompletedEvent
Type: ResponseMCPListToolsCompletedEvent
Emitted when the list of available MCP tools has been successfully retrieved.
Example
{ "type": "response.mcp_list_tools.completed", "item_id": "example", "output_index": 0, "sequence_number": 0 } -
ResponseMCPListToolsFailedEvent
Type: ResponseMCPListToolsFailedEvent
Emitted when the attempt to list available MCP tools has failed.
Example
{ "type": "response.mcp_list_tools.failed", "item_id": "example", "output_index": 0, "sequence_number": 0 } -
ResponseMCPListToolsInProgressEvent
Type: ResponseMCPListToolsInProgressEvent
Emitted when the system is in the process of retrieving the list of available MCP tools.
Example
{ "type": "response.mcp_list_tools.in_progress", "item_id": "example", "output_index": 0, "sequence_number": 0 } -
ResponseOutputTextAnnotationAddedEvent
Type: ResponseOutputTextAnnotationAddedEvent
Emitted when an annotation is added to output text content.
Example
{ "type": "response.output_text.annotation.added", "item_id": "example", "output_index": 0, "content_index": 0, "annotation_index": 0, "sequence_number": 0, "annotation": {} } -
ResponseQueuedEvent
Type: ResponseQueuedEvent
Emitted when a response is queued and waiting to be processed.
Example
{ "type": "response.queued", "response": { "metadata": {}, "top_logprobs": 0, "temperature": 1, "top_p": 1, "user": "example", "safety_identifier": "example", "prompt_cache_key": "example", "service_tier": "auto", "prompt_cache_retention": "in-memory", "previous_response_id": "example", "model": "example", "reasoning": { "effort": null, "summary": null, "generate_summary": null }, "background": false, "max_tool_calls": 0, "text": { "format": {}, "verbosity": "medium" }, "tools": [ {} ], "tool_choice": "none", "prompt": { "id": "example", "version": null, "variables": null }, "truncation": "disabled", "id": "example", "object": "response", "status": "completed", "created_at": 0.5, "completed_at": 0.5, "error": { "code": "server_error", "message": "example" }, "incomplete_details": { "reason": "max_output_tokens" }, "output": [ {} ], "instructions": "example", "output_text": "example", "usage": { "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }, "parallel_tool_calls": true, "conversation": null, "max_output_tokens": 0 }, "sequence_number": 0 } -
ResponseCustomToolCallInputDelta
Type: ResponseCustomToolCallInputDeltaEvent
Event representing a delta (partial update) to the input of a custom tool call.
Example
{ "type": "response.custom_tool_call_input.delta", "sequence_number": 0, "output_index": 0, "item_id": "example", "delta": "example" } -
ResponseCustomToolCallInputDone
Type: ResponseCustomToolCallInputDoneEvent
Event indicating that input for a custom tool call is complete.
Example
{ "type": "response.custom_tool_call_input.done", "sequence_number": 0, "output_index": 0, "item_id": "example", "input": "example" }
ResponseAudioDeltaEvent
Emitted when there is a partial audio response.
|
Name |
Description |
|
delta |
Type: string A chunk of Base64 encoded response audio bytes. Example: |
|
sequence_number |
Type: integer A sequence number for this chunk of the stream response. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.audio.delta",
"sequence_number": 0,
"delta": "example"
}
ResponseAudioDoneEvent
Emitted when the audio response is complete.
|
Name |
Description |
|
sequence_number |
Type: integer The sequence number of the delta. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.audio.done",
"sequence_number": 0
}
ResponseAudioTranscriptDeltaEvent
Emitted when there is a partial transcript of audio.
|
Name |
Description |
|
delta |
Type: string The partial transcript of the audio response. Example: |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.audio.transcript.delta",
"delta": "example",
"sequence_number": 0
}
ResponseAudioTranscriptDoneEvent
Emitted when the full audio transcript is completed.
|
Name |
Description |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.audio.transcript.done",
"sequence_number": 0
}
ResponseCodeInterpreterCallCodeDeltaEvent
Emitted when a partial code snippet is streamed by the code interpreter.
|
Name |
Description |
|
delta |
Type: string The partial code snippet being streamed by the code interpreter. Example: |
|
item_id |
Type: string The unique identifier of the code interpreter tool call item. Example: |
|
output_index |
Type: integer The index of the output item in the response for which the code is being streamed. |
|
sequence_number |
Type: integer The sequence number of this event, used to order streaming events. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.code_interpreter_call_code.delta",
"output_index": 0,
"item_id": "example",
"delta": "example",
"sequence_number": 0
}
ResponseCodeInterpreterCallCodeDoneEvent
Emitted when the code snippet is finalized by the code interpreter.
|
Name |
Description |
|
code |
Type: string The final code snippet output by the code interpreter. Example: |
|
item_id |
Type: string The unique identifier of the code interpreter tool call item. Example: |
|
output_index |
Type: integer The index of the output item in the response for which the code is finalized. |
|
sequence_number |
Type: integer The sequence number of this event, used to order streaming events. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.code_interpreter_call_code.done",
"output_index": 0,
"item_id": "example",
"code": "example",
"sequence_number": 0
}
ResponseCodeInterpreterCallCompletedEvent
Emitted when the code interpreter call is completed.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the code interpreter tool call item. Example: |
|
output_index |
Type: integer The index of the output item in the response for which the code interpreter call is completed. |
|
sequence_number |
Type: integer The sequence number of this event, used to order streaming events. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.code_interpreter_call.completed",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseCodeInterpreterCallInProgressEvent
Emitted when a code interpreter call is in progress.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the code interpreter tool call item. Example: |
|
output_index |
Type: integer The index of the output item in the response for which the code interpreter call is in progress. |
|
sequence_number |
Type: integer The sequence number of this event, used to order streaming events. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.code_interpreter_call.in_progress",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseCodeInterpreterCallInterpretingEvent
Emitted when the code interpreter is actively interpreting the code snippet.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the code interpreter tool call item. Example: |
|
output_index |
Type: integer The index of the output item in the response for which the code interpreter is interpreting code. |
|
sequence_number |
Type: integer The sequence number of this event, used to order streaming events. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.code_interpreter_call.interpreting",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseCompletedEvent
Emitted when the model response is complete.
|
Name |
Description |
|
response |
Type: Response Properties of the completed response. Example
|
|
sequence_number |
Type: integer The sequence number for this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.completed",
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
},
"sequence_number": 0
}
OutputContent
One of 3 types
-
Output text
Type: OutputTextContent
A text output from the model.
Example
{ "type": "output_text", "text": "example", "annotations": [ { "type": "file_citation", "file_id": "example", "index": 0, "filename": "example" } ], "logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ 0 ], "top_logprobs": [ { "token": "example", "logprob": 0.5, "bytes": [ null ] } ] } ] } -
Refusal
Type: RefusalContent
A refusal from the model.
Example
{ "type": "refusal", "refusal": "example" } -
Reasoning text
Type: ReasoningTextContent
Reasoning text from the model.
Example
{ "type": "reasoning_text", "text": "example" }
Example
{
"type": "output_text",
"text": "example",
"annotations": [
{
"type": "file_citation",
"file_id": "example",
"index": 0,
"filename": "example"
}
],
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
0
],
"top_logprobs": [
{}
]
}
]
}
ResponseContentPartAddedEvent
Emitted when a new content part is added.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that was added. |
|
item_id |
Type: string The ID of the output item that the content part was added to. Example: |
|
output_index |
Type: integer The index of the output item that the content part was added to. |
|
part |
Type: OutputContent The content part that was added. Example
|
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.content_part.added",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"part": {
"type": "output_text",
"text": "example",
"annotations": [
{}
],
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
null
],
"top_logprobs": [
null
]
}
]
},
"sequence_number": 0
}
ResponseContentPartDoneEvent
Emitted when a content part is done.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that is done. |
|
item_id |
Type: string The ID of the output item that the content part was added to. Example: |
|
output_index |
Type: integer The index of the output item that the content part was added to. |
|
part |
Type: OutputContent The content part that is done. Example
|
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.content_part.done",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"sequence_number": 0,
"part": {
"type": "output_text",
"text": "example",
"annotations": [
{}
],
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"bytes": [
null
],
"top_logprobs": [
null
]
}
]
}
}
ResponseCreatedEvent
An event that is emitted when a response is created.
|
Name |
Description |
|
response |
Type: Response The response that was created. Example
|
|
sequence_number |
Type: integer The sequence number for this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.created",
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
},
"sequence_number": 0
}
ResponseErrorEvent
Emitted when an error occurs.
|
Name |
Description |
|
code |
Any of 2 types
Example: |
|
message |
Type: string The error message. Example: |
|
param |
Any of 2 types
Example: |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "error",
"code": "example",
"message": "example",
"param": "example",
"sequence_number": 0
}
ResponseFileSearchCallCompletedEvent
Emitted when a file search call is completed (results found).
|
Name |
Description |
|
item_id |
Type: string The ID of the output item that the file search call is initiated. Example: |
|
output_index |
Type: integer The index of the output item that the file search call is initiated. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.file_search_call.completed",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseFileSearchCallInProgressEvent
Emitted when a file search call is initiated.
|
Name |
Description |
|
item_id |
Type: string The ID of the output item that the file search call is initiated. Example: |
|
output_index |
Type: integer The index of the output item that the file search call is initiated. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.file_search_call.in_progress",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseFileSearchCallSearchingEvent
Emitted when a file search is currently searching.
|
Name |
Description |
|
item_id |
Type: string The ID of the output item that the file search call is initiated. Example: |
|
output_index |
Type: integer The index of the output item that the file search call is searching. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.file_search_call.searching",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseFunctionCallArgumentsDeltaEvent
Emitted when there is a partial function-call arguments delta.
|
Name |
Description |
|
delta |
Type: string The function-call arguments delta that is added. Example: |
|
item_id |
Type: string The ID of the output item that the function-call arguments delta is added to. Example: |
|
output_index |
Type: integer The index of the output item that the function-call arguments delta is added to. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.function_call_arguments.delta",
"item_id": "example",
"output_index": 0,
"sequence_number": 0,
"delta": "example"
}
ResponseFunctionCallArgumentsDoneEvent
Emitted when function-call arguments are finalized.
|
Name |
Description |
|
arguments |
Type: string The function-call arguments. Example: |
|
item_id |
Type: string The ID of the item. Example: |
|
name |
Type: string The name of the function that was called. Example: |
|
output_index |
Type: integer The index of the output item. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string Const: Example: |
Example
{
"type": "response.function_call_arguments.done",
"item_id": "example",
"name": "example",
"output_index": 0,
"sequence_number": 0,
"arguments": "example"
}
ResponseInProgressEvent
Emitted when the response is in progress.
|
Name |
Description |
|
response |
Type: Response The response that is in progress. Example
|
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.in_progress",
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
},
"sequence_number": 0
}
ResponseFailedEvent
An event that is emitted when a response fails.
|
Name |
Description |
|
response |
Type: Response The response that failed. Example
|
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.failed",
"sequence_number": 0,
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
}
}
ResponseIncompleteEvent
An event that is emitted when a response finishes as incomplete.
|
Name |
Description |
|
response |
Type: Response The response that was incomplete. Example
|
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.incomplete",
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
},
"sequence_number": 0
}
ResponseOutputItemAddedEvent
Emitted when a new output item is added.
|
Name |
Description |
|
item |
Type: OutputItem The output item that was added. Example
|
|
output_index |
Type: integer The index of the output item that was added. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.output_item.added",
"output_index": 0,
"sequence_number": 0,
"item": {
"id": "example",
"type": "message",
"role": "assistant",
"content": [
{}
],
"phase": "commentary",
"status": "in_progress"
}
}
ResponseOutputItemDoneEvent
Emitted when an output item is marked done.
|
Name |
Description |
|
item |
Type: OutputItem The output item that was marked done. Example
|
|
output_index |
Type: integer The index of the output item that was marked done. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.output_item.done",
"output_index": 0,
"sequence_number": 0,
"item": {
"id": "example",
"type": "message",
"role": "assistant",
"content": [
{}
],
"phase": "commentary",
"status": "in_progress"
}
}
ResponseReasoningSummaryPartAddedEvent
Emitted when a new reasoning summary part is added.
|
Name |
Description |
||||
|
item_id |
Type: string The ID of the item this summary part is associated with. Example: |
||||
|
output_index |
Type: integer The index of the output item this summary part is associated with. |
||||
|
part |
Type: object
The summary part that was added. Example
|
||||
|
sequence_number |
Type: integer The sequence number of this event. |
||||
|
summary_index |
Type: integer The index of the summary part within the reasoning summary. |
||||
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_summary_part.added",
"item_id": "example",
"output_index": 0,
"summary_index": 0,
"sequence_number": 0,
"part": {
"type": "summary_text",
"text": "example"
}
}
ResponseReasoningSummaryPartDoneEvent
Emitted when a reasoning summary part is completed.
|
Name |
Description |
||||
|
item_id |
Type: string The ID of the item this summary part is associated with. Example: |
||||
|
output_index |
Type: integer The index of the output item this summary part is associated with. |
||||
|
part |
Type: object
The completed summary part. Example
|
||||
|
sequence_number |
Type: integer The sequence number of this event. |
||||
|
summary_index |
Type: integer The index of the summary part within the reasoning summary. |
||||
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_summary_part.done",
"item_id": "example",
"output_index": 0,
"summary_index": 0,
"sequence_number": 0,
"part": {
"type": "summary_text",
"text": "example"
}
}
ResponseReasoningSummaryTextDeltaEvent
Emitted when a delta is added to a reasoning summary text.
|
Name |
Description |
|
delta |
Type: string The text delta that was added to the summary. Example: |
|
item_id |
Type: string The ID of the item this summary text delta is associated with. Example: |
|
output_index |
Type: integer The index of the output item this summary text delta is associated with. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
summary_index |
Type: integer The index of the summary part within the reasoning summary. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_summary_text.delta",
"item_id": "example",
"output_index": 0,
"summary_index": 0,
"delta": "example",
"sequence_number": 0
}
ResponseReasoningSummaryTextDoneEvent
Emitted when a reasoning summary text is completed.
|
Name |
Description |
|
item_id |
Type: string The ID of the item this summary text is associated with. Example: |
|
output_index |
Type: integer The index of the output item this summary text is associated with. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
summary_index |
Type: integer The index of the summary part within the reasoning summary. |
|
text |
Type: string The full text of the completed reasoning summary. Example: |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_summary_text.done",
"item_id": "example",
"output_index": 0,
"summary_index": 0,
"text": "example",
"sequence_number": 0
}
ResponseReasoningTextDeltaEvent
Emitted when a delta is added to a reasoning text.
|
Name |
Description |
|
content_index |
Type: integer The index of the reasoning content part this delta is associated with. |
|
delta |
Type: string The text delta that was added to the reasoning content. Example: |
|
item_id |
Type: string The ID of the item this reasoning text delta is associated with. Example: |
|
output_index |
Type: integer The index of the output item this reasoning text delta is associated with. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_text.delta",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"delta": "example",
"sequence_number": 0
}
ResponseReasoningTextDoneEvent
Emitted when a reasoning text is completed.
|
Name |
Description |
|
content_index |
Type: integer The index of the reasoning content part. |
|
item_id |
Type: string The ID of the item this reasoning text is associated with. Example: |
|
output_index |
Type: integer The index of the output item this reasoning text is associated with. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
text |
Type: string The full text of the completed reasoning content. Example: |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.reasoning_text.done",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"text": "example",
"sequence_number": 0
}
ResponseRefusalDeltaEvent
Emitted when there is a partial refusal text.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that the refusal text is added to. |
|
delta |
Type: string The refusal text that is added. Example: |
|
item_id |
Type: string The ID of the output item that the refusal text is added to. Example: |
|
output_index |
Type: integer The index of the output item that the refusal text is added to. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.refusal.delta",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"delta": "example",
"sequence_number": 0
}
ResponseRefusalDoneEvent
Emitted when refusal text is finalized.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that the refusal text is finalized. |
|
item_id |
Type: string The ID of the output item that the refusal text is finalized. Example: |
|
output_index |
Type: integer The index of the output item that the refusal text is finalized. |
|
refusal |
Type: string The refusal text that is finalized. Example: |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.refusal.done",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"refusal": "example",
"sequence_number": 0
}
ResponseLogProb
A logprob is the logarithmic probability that the model assigns to producing a particular token at a given position in the sequence. Less-negative (higher) logprob values indicate greater model confidence in that token choice.
|
Name |
Description |
||||
|
logprob |
Type: number The log probability of this token. |
||||
|
token |
Type: string A possible text token. Example: |
||||
|
top_logprobs |
Type: object[]
The log probability of the top 20 most likely tokens. Example
|
Example
{
"token": "example",
"logprob": 0.5,
"top_logprobs": [
{
"token": "example",
"logprob": 0.5
}
]
}
ResponseTextDeltaEvent
Emitted when there is an additional text delta.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that the text delta was added to. |
|
delta |
Type: string The text delta that was added. Example: |
|
item_id |
Type: string The ID of the output item that the text delta was added to. Example: |
|
logprobs |
Type: ResponseLogProb[] The log probabilities of the tokens in the delta. Example
|
|
output_index |
Type: integer The index of the output item that the text delta was added to. |
|
sequence_number |
Type: integer The sequence number for this event. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.output_text.delta",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"delta": "example",
"sequence_number": 0,
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"top_logprobs": [
{
"token": "example",
"logprob": 0.5
}
]
}
]
}
ResponseTextDoneEvent
Emitted when text content is finalized.
|
Name |
Description |
|
content_index |
Type: integer The index of the content part that the text content is finalized. |
|
item_id |
Type: string The ID of the output item that the text content is finalized. Example: |
|
logprobs |
Type: ResponseLogProb[] The log probabilities of the tokens in the delta. Example
|
|
output_index |
Type: integer The index of the output item that the text content is finalized. |
|
sequence_number |
Type: integer The sequence number for this event. |
|
text |
Type: string The text content that is finalized. Example: |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.output_text.done",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"text": "example",
"sequence_number": 0,
"logprobs": [
{
"token": "example",
"logprob": 0.5,
"top_logprobs": [
{
"token": "example",
"logprob": 0.5
}
]
}
]
}
ResponseWebSearchCallCompletedEvent
Emitted when a web search call is completed.
|
Name |
Description |
|
item_id |
Type: string Unique ID for the output item associated with the web search call. Example: |
|
output_index |
Type: integer The index of the output item that the web search call is associated with. |
|
sequence_number |
Type: integer The sequence number of the web search call being processed. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.web_search_call.completed",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseWebSearchCallInProgressEvent
Emitted when a web search call is initiated.
|
Name |
Description |
|
item_id |
Type: string Unique ID for the output item associated with the web search call. Example: |
|
output_index |
Type: integer The index of the output item that the web search call is associated with. |
|
sequence_number |
Type: integer The sequence number of the web search call being processed. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.web_search_call.in_progress",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseWebSearchCallSearchingEvent
Emitted when a web search call is executing.
|
Name |
Description |
|
item_id |
Type: string Unique ID for the output item associated with the web search call. Example: |
|
output_index |
Type: integer The index of the output item that the web search call is associated with. |
|
sequence_number |
Type: integer The sequence number of the web search call being processed. |
|
type |
Type: string The type of the event. Always Const: Example: |
Example
{
"type": "response.web_search_call.searching",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseImageGenCallCompletedEvent
Emitted when an image generation tool call has completed and the final image is available.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the image generation item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.image_generation_call.completed'. Const: Example: |
Example
{
"type": "response.image_generation_call.completed",
"output_index": 0,
"sequence_number": 0,
"item_id": "example"
}
ResponseImageGenCallGeneratingEvent
Emitted when an image generation tool call is actively generating an image (intermediate state).
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the image generation item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of the image generation item being processed. |
|
type |
Type: string The type of the event. Always 'response.image_generation_call.generating'. Const: Example: |
Example
{
"type": "response.image_generation_call.generating",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseImageGenCallInProgressEvent
Emitted when an image generation tool call is in progress.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the image generation item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of the image generation item being processed. |
|
type |
Type: string The type of the event. Always 'response.image_generation_call.in_progress'. Const: Example: |
Example
{
"type": "response.image_generation_call.in_progress",
"output_index": 0,
"item_id": "example",
"sequence_number": 0
}
ResponseImageGenCallPartialImageEvent
Emitted when a partial image is available during image generation streaming.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the image generation item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
partial_image_b64 |
Type: string Base64-encoded partial image data, suitable for rendering as an image. Example: |
|
partial_image_index |
Type: integer 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). |
|
sequence_number |
Type: integer The sequence number of the image generation item being processed. |
|
type |
Type: string The type of the event. Always 'response.image_generation_call.partial_image'. Const: Example: |
Example
{
"type": "response.image_generation_call.partial_image",
"output_index": 0,
"item_id": "example",
"sequence_number": 0,
"partial_image_index": 0,
"partial_image_b64": "example"
}
ResponseMCPCallArgumentsDeltaEvent
Emitted when there is a delta (partial update) to the arguments of an MCP tool call.
|
Name |
Description |
|
delta |
Type: string A JSON string containing the partial update to the arguments for the MCP tool call. Example: |
|
item_id |
Type: string The unique identifier of the MCP tool call item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_call_arguments.delta'. Const: Example: |
Example
{
"type": "response.mcp_call_arguments.delta",
"output_index": 0,
"item_id": "example",
"delta": "example",
"sequence_number": 0
}
ResponseMCPCallArgumentsDoneEvent
Emitted when the arguments for an MCP tool call are finalized.
|
Name |
Description |
|
arguments |
Type: string A JSON string containing the finalized arguments for the MCP tool call. Example: |
|
item_id |
Type: string The unique identifier of the MCP tool call item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_call_arguments.done'. Const: Example: |
Example
{
"type": "response.mcp_call_arguments.done",
"output_index": 0,
"item_id": "example",
"arguments": "example",
"sequence_number": 0
}
ResponseMCPCallCompletedEvent
Emitted when an MCP tool call has completed successfully.
|
Name |
Description |
|
item_id |
Type: string The ID of the MCP tool call item that completed. Example: |
|
output_index |
Type: integer The index of the output item that completed. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_call.completed'. Const: Example: |
Example
{
"type": "response.mcp_call.completed",
"item_id": "example",
"output_index": 0,
"sequence_number": 0
}
ResponseMCPCallFailedEvent
Emitted when an MCP tool call has failed.
|
Name |
Description |
|
item_id |
Type: string The ID of the MCP tool call item that failed. Example: |
|
output_index |
Type: integer The index of the output item that failed. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_call.failed'. Const: Example: |
Example
{
"type": "response.mcp_call.failed",
"item_id": "example",
"output_index": 0,
"sequence_number": 0
}
ResponseMCPCallInProgressEvent
Emitted when an MCP tool call is in progress.
|
Name |
Description |
|
item_id |
Type: string The unique identifier of the MCP tool call item being processed. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_call.in_progress'. Const: Example: |
Example
{
"type": "response.mcp_call.in_progress",
"sequence_number": 0,
"output_index": 0,
"item_id": "example"
}
ResponseMCPListToolsCompletedEvent
Emitted when the list of available MCP tools has been successfully retrieved.
|
Name |
Description |
|
item_id |
Type: string The ID of the MCP tool call item that produced this output. Example: |
|
output_index |
Type: integer The index of the output item that was processed. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_list_tools.completed'. Const: Example: |
Example
{
"type": "response.mcp_list_tools.completed",
"item_id": "example",
"output_index": 0,
"sequence_number": 0
}
ResponseMCPListToolsFailedEvent
Emitted when the attempt to list available MCP tools has failed.
|
Name |
Description |
|
item_id |
Type: string The ID of the MCP tool call item that failed. Example: |
|
output_index |
Type: integer The index of the output item that failed. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_list_tools.failed'. Const: Example: |
Example
{
"type": "response.mcp_list_tools.failed",
"item_id": "example",
"output_index": 0,
"sequence_number": 0
}
ResponseMCPListToolsInProgressEvent
Emitted when the system is in the process of retrieving the list of available MCP tools.
|
Name |
Description |
|
item_id |
Type: string The ID of the MCP tool call item that is being processed. Example: |
|
output_index |
Type: integer The index of the output item that is being processed. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.mcp_list_tools.in_progress'. Const: Example: |
Example
{
"type": "response.mcp_list_tools.in_progress",
"item_id": "example",
"output_index": 0,
"sequence_number": 0
}
ResponseOutputTextAnnotationAddedEvent
Emitted when an annotation is added to output text content.
|
Name |
Description |
|
annotation |
Type: object The annotation object being added. (See annotation schema for details.) Example
|
|
annotation_index |
Type: integer The index of the annotation within the content part. |
|
content_index |
Type: integer The index of the content part within the output item. |
|
item_id |
Type: string The unique identifier of the item to which the annotation is being added. Example: |
|
output_index |
Type: integer The index of the output item in the response's output array. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The type of the event. Always 'response.output_text.annotation.added'. Const: Example: |
Example
{
"type": "response.output_text.annotation.added",
"item_id": "example",
"output_index": 0,
"content_index": 0,
"annotation_index": 0,
"sequence_number": 0,
"annotation": {}
}
ResponseQueuedEvent
Emitted when a response is queued and waiting to be processed.
|
Name |
Description |
|
response |
Type: Response The full response object that is queued. Example
|
|
sequence_number |
Type: integer The sequence number for this event. |
|
type |
Type: string The type of the event. Always 'response.queued'. Const: Example: |
Example
{
"type": "response.queued",
"response": {
"metadata": {},
"top_logprobs": 0,
"temperature": 1,
"top_p": 1,
"user": "example",
"safety_identifier": "example",
"prompt_cache_key": "example",
"service_tier": "auto",
"prompt_cache_retention": "in-memory",
"previous_response_id": "example",
"model": "example",
"reasoning": {
"effort": null,
"summary": null,
"generate_summary": null
},
"background": false,
"max_tool_calls": 0,
"text": {
"format": {},
"verbosity": "medium"
},
"tools": [
{}
],
"tool_choice": "none",
"prompt": {
"id": "example",
"version": null,
"variables": null
},
"truncation": "disabled",
"id": "example",
"object": "response",
"status": "completed",
"created_at": 0.5,
"completed_at": 0.5,
"error": {
"code": "server_error",
"message": "example"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output": [
{}
],
"instructions": "example",
"output_text": "example",
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"parallel_tool_calls": true,
"conversation": null,
"max_output_tokens": 0
},
"sequence_number": 0
}
ResponseCustomToolCallInputDeltaEvent
Event representing a delta (partial update) to the input of a custom tool call.
|
Name |
Description |
|
delta |
Type: string The incremental input data (delta) for the custom tool call. Example: |
|
item_id |
Type: string Unique identifier for the API item associated with this event. Example: |
|
output_index |
Type: integer The index of the output this delta applies to. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The event type identifier. Const: Example: |
Example
{
"type": "response.custom_tool_call_input.delta",
"sequence_number": 0,
"output_index": 0,
"item_id": "example",
"delta": "example"
}
ResponseCustomToolCallInputDoneEvent
Event indicating that input for a custom tool call is complete.
|
Name |
Description |
|
input |
Type: string The complete input data for the custom tool call. Example: |
|
item_id |
Type: string Unique identifier for the API item associated with this event. Example: |
|
output_index |
Type: integer The index of the output this event applies to. |
|
sequence_number |
Type: integer The sequence number of this event. |
|
type |
Type: string The event type identifier. Const: Example: |
Example
{
"type": "response.custom_tool_call_input.done",
"sequence_number": 0,
"output_index": 0,
"item_id": "example",
"input": "example"
}
No longer supported, please use an alternative and newer version.