Saltar para o conteúdo principal

Este browser já não é suportado.

Atualize para o Microsoft Edge para tirar partido das mais recentes funcionalidades, atualizações de segurança e de suporte técnico.

Transferir Microsoft Edge Mais informações sobre o Internet Explorer e o Microsoft Edge
microsoft-foundry.rest.security.o-auth2-auth

Responses

Retrieve a model response

GET /openai/v1/responses/{response_id}

Retrieves a model response with the given ID.

Parâmetros de caminho

response_id string obrigatório

The response id path parameter.

Parâmetros de consultas

include[] OpenAI.IncludeEnum[]

The includables query parameter.

stream boolean

The stream query parameter.

starting_after integer

The sequence number of the event after which to start streaming.

Parâmetros do cabeçalho

x-ms-user-identity string

Opaque per-user identity string used to scope endpoint-scoped data to a specific end user. The caller must have the agents/endpoints/UserIdentityImpersonation/action RBAC permission.

Respostas

The request has succeeded.

Cabeçalhos

x-agent-session-id string

Session ID for this request. Only present for hosted agent responses. Returns the provided session ID or an auto-generated one if not provided in the request.

Corpo

Content-Type: application/json
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

Content-Type: text/event-stream
Qualquer uma das seguintes opções:
type enum obrigatório

The type of the event. Always response.audio.delta.

response.audio.delta
sequence_number integer obrigatório
delta string obrigatório

A chunk of Base64 encoded response audio bytes.

type enum obrigatório

The type of the event. Always response.audio.transcript.delta.

response.audio.transcript.delta
delta string obrigatório

The partial transcript of the audio response.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.code_interpreter_call_code.delta.

response.code_interpreter_call_code.delta
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the code interpreter tool call item.

delta string obrigatório

The partial code snippet being streamed by the code interpreter.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.code_interpreter_call.in_progress.

response.code_interpreter_call.in_progress
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the code interpreter tool call item.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.code_interpreter_call.interpreting.

response.code_interpreter_call.interpreting
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the code interpreter tool call item.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.content_part.added.

response.content_part.added
item_id string obrigatório

The ID of the output item that the content part was added to.

output_index integer obrigatório
content_index integer obrigatório
part output_text | refusal | reasoning_text obrigatório
Um dos seguintes:
output_text OpenAI.OutputContentOutputTextContent

A text output from the model.

type enum obrigatório

The type of the output text. Always output_text.

output_text
text string obrigatório

The text output from the model.

annotations OpenAI.Annotation[]

The annotations of the text output.

logprobs OpenAI.LogProb[]
refusal OpenAI.OutputContentRefusalContent

A refusal from the model.

type enum obrigatório

The type of the refusal. Always refusal.

refusal
refusal string obrigatório

The refusal explanation from the model.

reasoning_text OpenAI.OutputContentReasoningTextContent

Reasoning text from the model.

type enum obrigatório

The type of the reasoning text. Always reasoning_text.

reasoning_text
text string obrigatório

The reasoning text from the model.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.created.

response.created
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always error.

error
code string | null obrigatório
message string obrigatório

The error message.

param string | null obrigatório
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.file_search_call.in_progress.

response.file_search_call.in_progress
output_index integer obrigatório
item_id string obrigatório

The ID of the output item that the file search call is initiated.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.file_search_call.searching.

response.file_search_call.searching
output_index integer obrigatório
item_id string obrigatório

The ID of the output item that the file search call is initiated.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.function_call_arguments.delta.

response.function_call_arguments.delta
item_id string obrigatório

The ID of the output item that the function-call arguments delta is added to.

output_index integer obrigatório
sequence_number integer obrigatório
delta string obrigatório

The function-call arguments delta that is added.

type enum obrigatório

The type of the event. Always response.in_progress.

response.in_progress
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.failed.

response.failed
sequence_number integer obrigatório
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

type enum obrigatório

The type of the event. Always response.incomplete.

response.incomplete
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.output_item.added.

response.output_item.added
output_index integer obrigatório
sequence_number integer obrigatório
item structured_outputs | workflow_action | oauth_consent_request | bing_grounding_call | bing_grounding_call_output | sharepoint_grounding_preview_call | sharepoint_grounding_preview_call_output | azure_ai_search_call | azure_ai_search_call_output | bing_custom_search_preview_call | bing_custom_search_preview_call_output | openapi_call | openapi_call_output | browser_automation_preview_call | browser_automation_preview_call_output | fabric_dataagent_preview_call | fabric_dataagent_preview_call_output | azure_function_call | azure_function_call_output | a2a_preview_call | a2a_preview_call_output | memory_search_call | memory_command_preview_call | memory_command_preview_call_output | output_message | file_search_call | function_call | function_call_output | web_search_call | computer_call | computer_call_output | reasoning | program | program_output | tool_search_call | tool_search_output | additional_tools | compaction | image_generation_call | code_interpreter_call | local_shell_call | local_shell_call_output | shell_call | shell_call_output | apply_patch_call | apply_patch_call_output | mcp_call | mcp_list_tools | mcp_approval_request | mcp_approval_response | custom_tool_call | custom_tool_call_output obrigatório
Um dos seguintes:
structured_outputs StructuredOutputsOutputItem
type enum obrigatório
structured_outputs
output StructuredOutputsOutputItem obrigatório

The structured output captured during the response.

workflow_action WorkflowActionOutputItem
type enum obrigatório
workflow_action
kind string obrigatório

The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent').

action_id string obrigatório

Unique identifier for the action.

parent_action_id string

ID of the parent action if this is a nested action.

previous_action_id string

ID of the previous action if this action follows another.

status enum obrigatório

Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').

completedfailedin_progresscancelled
oauth_consent_request OAuthConsentRequestOutputItem

Request from the service for the user to perform OAuth consent.

id string obrigatório
type enum obrigatório
oauth_consent_request
consent_link string obrigatório

The link the user can use to perform OAuth consent.

server_label string obrigatório

The server label for the OAuth consent request.

bing_grounding_call BingGroundingToolCall

A Bing grounding tool call.

type enum obrigatório
bing_grounding_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_grounding_call_output BingGroundingToolCallOutput

The output of a Bing grounding tool call.

type enum obrigatório
bing_grounding_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call SharepointGroundingToolCall

A SharePoint grounding tool call.

type enum obrigatório
sharepoint_grounding_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call_output SharepointGroundingToolCallOutput

The output of a SharePoint grounding tool call.

type enum obrigatório
sharepoint_grounding_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call AzureAISearchToolCall

An Azure AI Search tool call.

type enum obrigatório
azure_ai_search_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call_output AzureAISearchToolCallOutput

The output of an Azure AI Search tool call.

type enum obrigatório
azure_ai_search_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call BingCustomSearchToolCall

A Bing custom search tool call.

type enum obrigatório
bing_custom_search_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call_output BingCustomSearchToolCallOutput

The output of a Bing custom search tool call.

type enum obrigatório
bing_custom_search_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call OpenApiToolCall

An OpenAPI tool call.

type enum obrigatório
openapi_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the OpenAPI operation being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call_output OpenApiToolCallOutput

The output of an OpenAPI tool call.

type enum obrigatório
openapi_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the OpenAPI operation that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call BrowserAutomationToolCall

A browser automation tool call.

type enum obrigatório
browser_automation_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call_output BrowserAutomationToolCallOutput

The output of a browser automation tool call.

type enum obrigatório
browser_automation_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call FabricDataAgentToolCall

A Fabric data agent tool call.

type enum obrigatório
fabric_dataagent_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call_output FabricDataAgentToolCallOutput

The output of a Fabric data agent tool call.

type enum obrigatório
fabric_dataagent_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call AzureFunctionToolCall

An Azure Function tool call.

type enum obrigatório
azure_function_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the Azure Function being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call_output AzureFunctionToolCallOutput

The output of an Azure Function tool call.

type enum obrigatório
azure_function_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the Azure Function that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call A2AToolCall

An A2A (Agent-to-Agent) tool call.

type enum obrigatório
a2a_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the A2A agent card being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call_output A2AToolCallOutput

The output of an A2A (Agent-to-Agent) tool call.

type enum obrigatório
a2a_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the A2A agent card that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memory_search_call MemorySearchToolCall

A memory search tool call.

type enum obrigatório
memory_search_call
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memories MemoryItem[] | null

The results returned from the memory search.

memory_command_preview_call MemoryCommandToolCall

A memory command tool call.

type enum obrigatório
memory_command_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool, including action (remember or forget) and content.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memory_command_preview_call_output MemoryCommandToolCallOutput

The output of a memory command tool call.

type enum obrigatório
memory_command_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
output_message OpenAI.OutputItemOutputMessage

An output message from the model.

id string obrigatório

The unique ID of the output message.

type enum obrigatório

The type of the output message. Always message.

output_message
role enum obrigatório

The role of the output message. Always assistant.

assistant
content OpenAI.OutputMessageContent[] obrigatório

The content of the output message.

phase enum

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

commentaryfinal_answer
status enum obrigatório

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
file_search_call OpenAI.OutputItemFileSearchToolCall

The results of a file search tool call. See the file search guide for more information.

id string obrigatório

The unique ID of the file search tool call.

type enum obrigatório

The type of the file search tool call. Always file_search_call.

file_search_call
status enum obrigatório

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

in_progresssearchingcompletedincompletefailed
queries string[] obrigatório

The queries used to search for files.

results OpenAI.FileSearchToolCallResults[] | null
function_call OpenAI.OutputItemFunctionToolCall

A tool call to run a function. See the function calling guide for more information.

id string obrigatório

The unique ID of the function tool call.

type enum obrigatório

The type of the function tool call. Always function_call.

function_call
call_id string obrigatório

The unique ID of the function tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

namespace string

The namespace of the function to run.

name string obrigatório

The name of the function to run.

arguments string obrigatório

A JSON string of the arguments to pass to the function.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
async boolean

Whether the function tool call runs asynchronously.

function_call_output OpenAI.OutputItemFunctionToolCallOutput

The output of a function tool call.

id string obrigatório

The unique ID of the function tool call output. Populated when this item is returned via API.

type enum obrigatório

The type of the function tool call output. Always function_call_output.

function_call_output
call_id string

The unique ID of the function tool call generated by the model.

name string

The name of the tool that produced the output.

namespace string

The namespace of the tool that produced the output.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCallerParam
type enum obrigatório

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum obrigatório

The caller type. Always program.

program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] obrigatório

The output from the function call generated by your code. Can be a string or an list of output content.

Um dos seguintes:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
web_search_call OpenAI.OutputItemWebSearchToolCall

The results of a web search tool call. See the web search guide for more information.

id string obrigatório

The unique ID of the web search tool call.

type enum obrigatório

The type of the web search tool call. Always web_search_call.

web_search_call
status enum obrigatório
in_progresssearchingcompletedfailedincomplete
action OpenAI.WebSearchActionSearch | OpenAI.WebSearchActionOpenPage | OpenAI.WebSearchActionFind

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).

Um dos seguintes:
type enum obrigatório

The action type.

search
query string

The search query.

queries string[]

The search queries.

sources OpenAI.WebSearchActionSearchSources[]

The sources used in the search.

type enum obrigatório

The action type.

open_page
url string | null

The URL opened by the model.

type enum obrigatório

The action type.

find_in_page
url string | null

The URL of the page searched for the pattern, when available.

pattern string obrigatório

The pattern or text to search for within the page.

computer_call OpenAI.OutputItemComputerToolCall

A tool call to a computer use tool. See the computer use guide for more information.

type enum obrigatório

The type of the computer call. Always computer_call.

computer_call
id string obrigatório

The unique ID of the computer call.

call_id string obrigatório

An identifier used when responding to the tool call with output.

action click | double_click | drag | keypress | move | screenshot | scroll | type | wait
Um dos seguintes:
click OpenAI.ClickParam

A click action.

type enum obrigatório

Specifies the event type. For a click action, this property is always click.

click
button enum obrigatório
leftrightwheelbackforward
x integer obrigatório
y integer obrigatório
keys string[] | null
double_click OpenAI.DoubleClickAction

A double click action.

type enum obrigatório

Specifies the event type. For a double click action, this property is always set to double_click.

double_click
x integer obrigatório
y integer obrigatório
keys string[] | null obrigatório
drag OpenAI.DragParam

A drag action.

type enum obrigatório

Specifies the event type. For a drag action, this property is always set to drag.

drag
path OpenAI.CoordParam[] obrigatório

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg [ { x: 100, y: 200 }, { x: 200, y: 300 } ]

keys string[] | null
keypress OpenAI.KeyPressAction

A collection of keypresses the model would like to perform.

type enum obrigatório

Specifies the event type. For a keypress action, this property is always set to keypress.

keypress
keys string[] obrigatório

The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.

move OpenAI.MoveParam

A mouse move action.

type enum obrigatório

Specifies the event type. For a move action, this property is always set to move.

move
x integer obrigatório
y integer obrigatório
keys string[] | null
screenshot OpenAI.ScreenshotParam

A screenshot action.

type enum obrigatório

Specifies the event type. For a screenshot action, this property is always set to screenshot.

screenshot
scroll OpenAI.ScrollParam

A scroll action.

type enum obrigatório

Specifies the event type. For a scroll action, this property is always set to scroll.

scroll
x integer obrigatório
y integer obrigatório
scroll_x integer obrigatório
scroll_y integer obrigatório
keys string[] | null
type OpenAI.TypeParam

An action to type in text.

type enum obrigatório

Specifies the event type. For a type action, this property is always set to type.

type
text string obrigatório

The text to type.

wait OpenAI.WaitParam

A wait action.

type enum obrigatório

Specifies the event type. For a wait action, this property is always set to wait.

wait
actions OpenAI.ComputerAction[]

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

pending_safety_checks OpenAI.ComputerCallSafetyCheckParam[] obrigatório

The pending safety checks for the computer call.

status enum obrigatório

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
computer_call_output OpenAI.OutputItemComputerToolCallOutput

The output of a computer tool call.

type enum obrigatório

The type of the computer tool call output. Always computer_call_output.

computer_call_output
id string obrigatório

The ID of the computer tool call output.

call_id string obrigatório

The ID of the computer tool call that produced the output.

acknowledged_safety_checks OpenAI.ComputerCallSafetyCheckParam[]

The safety checks reported by the API that have been acknowledged by the developer.

output OpenAI.ComputerScreenshotImage obrigatório

A computer screenshot image used with the computer use tool.

type enum obrigatório

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

computer_screenshot
image_url string

The URL of the screenshot image.

file_id string

The identifier of an uploaded file that contains the screenshot.

status enum

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
reasoning OpenAI.OutputItemReasoningItem

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.

type enum obrigatório

The type of the object. Always reasoning.

reasoning
id string obrigatório

The unique identifier of the reasoning content.

encrypted_content string | null
summary OpenAI.SummaryTextContent[] obrigatório

Reasoning summary content.

content OpenAI.ReasoningTextContent[]

Reasoning text content.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
program OpenAI.OutputItemProgram
type enum obrigatório

The type of the item. Always program.

program
id string obrigatório

The unique ID of the program item.

call_id string obrigatório

The stable call ID of the program item.

code string obrigatório

The JavaScript source executed by programmatic tool calling.

fingerprint string obrigatório

Opaque program replay fingerprint that must be round-tripped.

program_output OpenAI.OutputItemProgramOutput
type enum obrigatório

The type of the item. Always program_output.

program_output
id string obrigatório

The unique ID of the program output item.

call_id string obrigatório

The call ID of the program item.

result string obrigatório

The result produced by the program item.

status enum obrigatório
completedincomplete
tool_search_call OpenAI.OutputItemToolSearchCall
type enum obrigatório

The type of the item. Always tool_search_call.

tool_search_call
id string obrigatório

The unique ID of the tool search call item.

call_id string | null obrigatório
execution enum obrigatório
serverclient
arguments OpenAI.OutputItemToolSearchCall obrigatório

Arguments used for the tool search call.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

tool_search_output OpenAI.OutputItemToolSearchOutput
type enum obrigatório

The type of the item. Always tool_search_output.

tool_search_output
id string obrigatório

The unique ID of the tool search output item.

call_id string | null obrigatório
execution enum obrigatório
serverclient
tools OpenAI.Tool[] obrigatório

The loaded tool definitions returned by tool search.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

additional_tools OpenAI.OutputItemAdditionalTools
type enum obrigatório

The type of the item. Always additional_tools.

additional_tools
id string obrigatório

The unique ID of the additional tools item.

role enum obrigatório
unknownuserassistantsystemcriticdiscriminatordevelopertool
tools OpenAI.Tool[] obrigatório

The additional tool definitions made available at this item.

compaction OpenAI.OutputItemCompactionBody

A compaction item generated by the v1/responses/compact API.

type enum obrigatório

The type of the item. Always compaction.

compaction
id string obrigatório

The unique ID of the compaction item.

encrypted_content string obrigatório

The encrypted content that was produced by compaction.

created_by string

The identifier of the actor that created the item.

image_generation_call OpenAI.OutputItemImageGenToolCall

An image generation request made by the model.

type enum obrigatório

The type of the image generation call. Always image_generation_call.

image_generation_call
id string obrigatório

The unique ID of the image generation call.

status enum obrigatório

The status of the image generation call.

in_progresscompletedgeneratingfailed
result string | null obrigatório
error OpenAI.ImageGenToolCallError
code string | null obrigatório
type string obrigatório

The error type.

message string obrigatório

A description of the error.

param string | null obrigatório
moderation_details OpenAI.ImageGenToolCallModerationDetails
moderation_stage enum obrigatório

The stage where moderation blocked the image generation call.

inputoutputunknown
categories string[] obrigatório

Public moderation categories. New category values may be added over time.

size string | enum | null
Qualquer uma das seguintes opções:
string
enum
1024x10241024x15361536x1024
quality enum
lowmediumhighxhighmaxauto
action enum
generateeditauto
background enum
transparentopaqueauto
output_format enum
pngwebpjpeg
revised_prompt string | null
code_interpreter_call OpenAI.OutputItemCodeInterpreterToolCall

A tool call to run code.

type enum obrigatório

The type of the code interpreter tool call. Always code_interpreter_call.

code_interpreter_call
id string obrigatório

The unique ID of the code interpreter tool call.

status enum obrigatório

The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

in_progresscompletedincompleteinterpretingfailed
container_id string obrigatório

The ID of the container used to run the code.

code string | null obrigatório
outputs (OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[] | null obrigatório
local_shell_call OpenAI.OutputItemLocalShellToolCall

A tool call to run a command on the local shell.

type enum obrigatório

The type of the local shell call. Always local_shell_call.

local_shell_call
id string obrigatório

The unique ID of the local shell call.

call_id string obrigatório

The unique ID of the local shell tool call generated by the model.

action OpenAI.LocalShellExecAction obrigatório

Execute a shell command on the server.

type enum obrigatório

The type of the local shell action. Always exec.

exec
command string[] obrigatório

The command to run.

timeout_ms integer | null
working_directory string | null
env object obrigatório

Environment variables to set for the command.

[key: string] string
user string | null
status enum obrigatório

The status of the local shell call.

in_progresscompletedincomplete
local_shell_call_output OpenAI.OutputItemLocalShellToolCallOutput

The output of a local shell tool call.

type enum obrigatório

The type of the local shell tool call output. Always local_shell_call_output.

local_shell_call_output
id string obrigatório

The unique ID of the local shell tool call generated by the model.

output string obrigatório

A JSON string of the output of the local shell tool call.

status enum
in_progresscompletedincomplete
shell_call OpenAI.OutputItemFunctionShellCall

A tool call that executes one or more shell commands in a managed environment.

type enum obrigatório

The type of the item. Always shell_call.

shell_call
id string obrigatório

The unique ID of the shell tool call. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

action OpenAI.FunctionShellAction obrigatório

Execute a shell command.

commands string[] obrigatório
timeout_ms integer | null obrigatório
max_output_length integer | null obrigatório
status enum obrigatório
in_progresscompletedincomplete
environment local | container_reference | null obrigatório
Um dos seguintes:
local OpenAI.LocalEnvironmentResource

Represents the use of a local environment to perform shell actions.

type enum obrigatório

The environment type. Always local.

local
container_reference OpenAI.ContainerReferenceResource

Represents a container created with /v1/containers.

type enum obrigatório

The environment type. Always container_reference.

container_reference
container_id string obrigatório
created_by string

The ID of the entity that created this tool call.

shell_call_output OpenAI.OutputItemFunctionShellCallOutput

The output of a shell tool call that was emitted.

type enum obrigatório

The type of the shell call output. Always shell_call_output.

shell_call_output
id string obrigatório

The unique ID of the shell call output. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
in_progresscompletedincomplete
output OpenAI.FunctionShellCallOutputContent[] obrigatório

An array of shell call output contents

max_output_length integer | null obrigatório
created_by string

The identifier of the actor that created the item.

apply_patch_call OpenAI.OutputItemApplyPatchToolCall

A tool call that applies file diffs by creating, deleting, or updating files.

type enum obrigatório

The type of the item. Always apply_patch_call.

apply_patch_call
id string obrigatório

The unique ID of the apply patch tool call. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
in_progresscompleted
operation create_file | delete_file | update_file obrigatório

One of the create_file, delete_file, or update_file operations applied via apply_patch.

Um dos seguintes:
create_file OpenAI.ApplyPatchCreateFileOperation

Instruction describing how to create a file via the apply_patch tool.

type enum obrigatório

Create a new file with the provided diff.

create_file
path string obrigatório

Path of the file to create.

diff string obrigatório

Diff to apply.

delete_file OpenAI.ApplyPatchDeleteFileOperation

Instruction describing how to delete a file via the apply_patch tool.

type enum obrigatório

Delete the specified file.

delete_file
path string obrigatório

Path of the file to delete.

update_file OpenAI.ApplyPatchUpdateFileOperation

Instruction describing how to update a file via the apply_patch tool.

type enum obrigatório

Update an existing file with the provided diff.

update_file
path string obrigatório

Path of the file to update.

diff string obrigatório

Diff to apply.

created_by string

The ID of the entity that created this tool call.

apply_patch_call_output OpenAI.OutputItemApplyPatchToolCallOutput

The output emitted by an apply patch tool call.

type enum obrigatório

The type of the item. Always apply_patch_call_output.

apply_patch_call_output
id string obrigatório

The unique ID of the apply patch tool call output. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
completedfailed
output string | null
created_by string

The ID of the entity that created this tool call output.

mcp_call OpenAI.OutputItemMcpToolCall

An invocation of a tool on an MCP server.

type enum obrigatório

The type of the item. Always mcp_call.

mcp_call
id string obrigatório

The unique ID of the tool call.

server_label string obrigatório

The label of the MCP server running the tool.

name string obrigatório

The name of the tool that was run.

arguments string obrigatório

A JSON string of the arguments passed to the tool.

output string | null
error object

The error from the tool call, if any.

status enum
in_progresscompletedincompletecallingfailed
approval_request_id string | null
mcp_list_tools OpenAI.OutputItemMcpListTools

A list of tools available on an MCP server.

type enum obrigatório

The type of the item. Always mcp_list_tools.

mcp_list_tools
id string obrigatório

The unique ID of the list.

server_label string obrigatório

The label of the MCP server.

tools OpenAI.MCPListToolsTool[] obrigatório

The tools available on the server.

error protocol_error | tool_execution_error | http_error
Um dos seguintes:
protocol_error OpenAI.RealtimeMCPProtocolError
type enum obrigatório
protocol_error
code integer obrigatório
message string obrigatório
tool_execution_error OpenAI.RealtimeMCPToolExecutionError
type enum obrigatório
tool_execution_error
message string obrigatório
http_error OpenAI.RealtimeMCPHTTPError
type enum obrigatório
http_error
code integer obrigatório
message string obrigatório
mcp_approval_request OpenAI.OutputItemMcpApprovalRequest

A request for human approval of a tool invocation.

type enum obrigatório

The type of the item. Always mcp_approval_request.

mcp_approval_request
id string obrigatório

The unique ID of the approval request.

server_label string obrigatório

The label of the MCP server making the request.

name string obrigatório

The name of the tool to run.

arguments string obrigatório

A JSON string of arguments for the tool.

mcp_approval_response OpenAI.OutputItemMcpApprovalResponseResource

A response to an MCP approval request.

type enum obrigatório

The type of the item. Always mcp_approval_response.

mcp_approval_response
id string obrigatório

The unique ID of the approval response

approval_request_id string obrigatório

The ID of the approval request being answered.

approve boolean obrigatório

Whether the request was approved.

reason string | null
custom_tool_call OpenAI.OutputItemCustomToolCallResource
type enum obrigatório

The type of the custom tool call. Always custom_tool_call.

custom_tool_call
id string

The unique ID of the custom tool call in the OpenAI platform.

call_id string obrigatório

An identifier used to map this custom tool call to a tool call output.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

namespace string

The namespace of the custom tool being called.

name string obrigatório

The name of the custom tool being called.

input string obrigatório

The input for the custom tool call generated by the model.

async boolean

Whether the custom tool call runs asynchronously.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

custom_tool_call_output OpenAI.OutputItemCustomToolCallOutputResource
type enum obrigatório

The type of the custom tool call output. Always custom_tool_call_output.

custom_tool_call_output
id string

The unique ID of the custom tool call output in the OpenAI platform.

call_id string obrigatório

The call ID, used to map this custom tool call output to a custom tool call.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCallerParam
type enum obrigatório

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum obrigatório

The caller type. Always program.

program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] obrigatório

The output from the custom tool call generated by your code. Can be a string or an list of output content.

Um dos seguintes:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

type enum obrigatório

The type of the event. Always response.reasoning_summary_part.added.

response.reasoning_summary_part.added
item_id string obrigatório

The ID of the item this summary part is associated with.

output_index integer obrigatório
summary_index integer obrigatório
sequence_number integer obrigatório
part OpenAI.ResponseReasoningSummaryPartAddedEventPart obrigatório
type enum obrigatório
summary_text
text string obrigatório
type enum obrigatório

The type of the event. Always response.reasoning_summary_text.delta.

response.reasoning_summary_text.delta
item_id string obrigatório

The ID of the item this summary text delta is associated with.

output_index integer obrigatório
summary_index integer obrigatório
delta string obrigatório

The text delta that was added to the summary.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.reasoning_text.delta.

response.reasoning_text.delta
item_id string obrigatório

The ID of the item this reasoning text delta is associated with.

output_index integer obrigatório
content_index integer obrigatório
delta string obrigatório

The text delta that was added to the reasoning content.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.refusal.delta.

response.refusal.delta
item_id string obrigatório

The ID of the output item that the refusal text is added to.

output_index integer obrigatório
content_index integer obrigatório
delta string obrigatório

The refusal text that is added.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.output_text.delta.

response.output_text.delta
item_id string obrigatório

The ID of the output item that the text delta was added to.

output_index integer obrigatório
content_index integer obrigatório
delta string obrigatório

The text delta that was added.

sequence_number integer obrigatório
logprobs OpenAI.ResponseLogProb[] obrigatório

The log probabilities of the tokens in the delta.

type enum obrigatório

The type of the event. Always response.web_search_call.in_progress.

response.web_search_call.in_progress
output_index integer obrigatório
item_id string obrigatório

Unique ID for the output item associated with the web search call.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.web_search_call.searching.

response.web_search_call.searching
output_index integer obrigatório
item_id string obrigatório

Unique ID for the output item associated with the web search call.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.image_generation_call.generating'.

response.image_generation_call.generating
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the image generation item being processed.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.image_generation_call.in_progress'.

response.image_generation_call.in_progress
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the image generation item being processed.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.image_generation_call.partial_image'.

response.image_generation_call.partial_image
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the image generation item being processed.

sequence_number integer obrigatório
partial_image_index integer obrigatório
partial_image_b64 string obrigatório

Base64-encoded partial image data, suitable for rendering as an image.

size string

The image size that was used.

quality string

The image quality that was used.

background string

The background setting that was used.

output_format string

The output format that was used.

type enum obrigatório

The type of the event. Always 'response.mcp_call_arguments.delta'.

response.mcp_call_arguments.delta
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the MCP tool call item being processed.

delta string obrigatório

A JSON string containing the partial update to the arguments for the MCP tool call.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.mcp_call.failed'.

response.mcp_call.failed
item_id string obrigatório

The ID of the MCP tool call item that failed.

output_index integer obrigatório
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.mcp_call.in_progress'.

response.mcp_call.in_progress
sequence_number integer obrigatório
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the MCP tool call item being processed.

type enum obrigatório

The type of the event. Always 'response.mcp_list_tools.failed'.

response.mcp_list_tools.failed
item_id string obrigatório

The ID of the MCP tool call item that failed.

output_index integer obrigatório
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.mcp_list_tools.in_progress'.

response.mcp_list_tools.in_progress
item_id string obrigatório

The ID of the MCP tool call item that is being processed.

output_index integer obrigatório
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.output_text.annotation.added'.

response.output_text.annotation.added
item_id string obrigatório

The unique identifier of the item to which the annotation is being added.

output_index integer obrigatório
content_index integer obrigatório
annotation_index integer obrigatório
sequence_number integer obrigatório
annotation file_citation | url_citation | container_file_citation | file_path obrigatório

An annotation that applies to a span of output text.

Um dos seguintes:
file_citation OpenAI.FileCitationBody

A citation to a file.

type enum obrigatório

The type of the file citation. Always file_citation.

file_citation
file_id string obrigatório

The ID of the file.

index integer obrigatório
filename string obrigatório

The filename of the file cited.

url_citation OpenAI.UrlCitationBody

A citation for a web resource used to generate a model response.

type enum obrigatório

The type of the URL citation. Always url_citation.

url_citation
url string obrigatório

The URL of the web resource.

start_index integer obrigatório
end_index integer obrigatório
title string obrigatório

The title of the web resource.

container_file_citation OpenAI.ContainerFileCitationBody

A citation for a container file used to generate a model response.

type enum obrigatório

The type of the container file citation. Always container_file_citation.

container_file_citation
container_id string obrigatório

The ID of the container file.

file_id string obrigatório

The ID of the file.

start_index integer obrigatório
end_index integer obrigatório
filename string obrigatório

The filename of the container file cited.

file_path OpenAI.FilePath

A path to a file.

type enum obrigatório

The type of the file path. Always file_path.

file_path
file_id string obrigatório

The ID of the file.

index integer obrigatório
type enum obrigatório

The type of the event. Always 'response.queued'.

response.queued
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

sequence_number integer obrigatório
type enum obrigatório

The event type identifier.

response.custom_tool_call_input.delta
sequence_number integer obrigatório
output_index integer obrigatório
item_id string obrigatório

Unique identifier for the API item associated with this event.

delta string obrigatório

The incremental input data (delta) for the custom tool call.

type enum obrigatório

The type of the event. Always response.audio.done.

response.audio.done
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.audio.transcript.done.

response.audio.transcript.done
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.code_interpreter_call_code.done.

response.code_interpreter_call_code.done
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the code interpreter tool call item.

code string obrigatório

The final code snippet output by the code interpreter.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.code_interpreter_call.completed.

response.code_interpreter_call.completed
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the code interpreter tool call item.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.completed.

response.completed
response OpenAI.Response obrigatório
metadata OpenAI.Metadata | null

Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.

[key: string] string
top_logprobs integer | null
temperature number | null
top_p number | null
user string | null

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

safety_identifier string | null
prompt_cache_key string | null
prompt_cache_retention enum
in_memory24h
previous_response_id string | null
model string

The model deployment to use for the creation of this response.

background boolean | null
max_tool_calls integer | null
text OpenAI.ResponseTextParam

Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: - Text inputs and outputs - Structured Outputs

format json_schema | text | json_object

An object specifying the format that the model must output. Configuring { "type": "json_schema" } enables Structured Outputs, which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide. The default format is { "type": "text" } with no additional options. Not recommended for gpt-4o and newer models:* Setting to { "type": "json_object" } enables the older JSON mode, which ensures the message the model generates is valid JSON. Using json_schema is preferred for models that support it.

Um dos seguintes:
json_schema OpenAI.TextResponseFormatJsonSchema

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

type enum obrigatório

The type of response format being defined. Always json_schema.

json_schema
description string

A description of what the response format is for, used by the model to determine how to respond in the format.

name string obrigatório

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.

schema OpenAI.ResponseFormatJsonSchemaSchema obrigatório

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

strict boolean | null
text OpenAI.TextResponseFormatConfigurationResponseFormatText

Default response format. Used to generate text responses.

type enum obrigatório

The type of response format being defined. Always text.

text
json_object OpenAI.TextResponseFormatConfigurationResponseFormatJsonObject

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.

type enum obrigatório

The type of response format being defined. Always json_object.

json_object
verbosity enum

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 are low, medium, and high. The default is medium.

lowmediumhigh
tools OpenAI.Tool[]

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 OpenAI 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 such as Google Drive and SharePoint. Learn more about MCP Tools. - Function calls (custom tools): Functions that are defined by you, enabling the model to call your own code with strongly typed arguments and outputs. Learn more about function calling. You can also use custom tools to call your own code.

tool_choice enum | OpenAI.ToolChoiceParam
Um dos seguintes:
enum

Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools.

noneautorequired
Um dos seguintes:
function OpenAI.ToolChoiceFunction

Use this option to force the model to call a specific function.

type enum obrigatório

For function calling, the type is always function.

function
name string obrigatório

The name of the function to call.

mcp OpenAI.ToolChoiceMCP

Use this option to force the model to call a specific tool on a remote MCP server.

type enum obrigatório

For MCP tools, the type is always mcp.

mcp
server_label string obrigatório

The label of the MCP server to use.

name string | null
allowed_tools OpenAI.ToolChoiceAllowed

Constrains the tools available to the model to a pre-defined set.

type enum obrigatório

Allowed tool configuration type. Always allowed_tools.

allowed_tools
mode enum obrigatório

Constrains the tools available to the model to a pre-defined set. auto allows the model to pick from among the allowed tools and generate a message. required requires the model to call one or more of the allowed tools.

autorequired
tools object[] obrigatório

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: json [ { "type": "function", "name": "get_weather" }, { "type": "mcp", "server_label": "deepwiki" }, { "type": "image_generation" } ]

custom OpenAI.ToolChoiceCustom

Use this option to force the model to call a specific custom tool.

type enum obrigatório

For custom tool calling, the type is always custom.

custom
name string obrigatório

The name of the custom tool to call.

programmatic_tool_calling OpenAI.SpecificProgrammaticToolCallingParam
type enum obrigatório

The tool to call. Always programmatic_tool_calling.

programmatic_tool_calling
apply_patch OpenAI.SpecificApplyPatchParam

Forces the model to call the apply_patch tool when executing a tool call.

type enum obrigatório

The tool to call. Always apply_patch.

apply_patch
shell OpenAI.SpecificFunctionShellParam

Forces the model to call the shell tool when a tool call is required.

type enum obrigatório

The tool to call. Always shell.

shell
file_search OpenAI.ToolChoiceFileSearch

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
file_search
web_search_preview OpenAI.ToolChoiceWebSearchPreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview
computer_use_preview OpenAI.ToolChoiceComputerUsePreview

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use_preview
web_search_preview_2025_03_11 OpenAI.ToolChoiceWebSearchPreview20250311

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
web_search_preview_2025_03_11
image_generation OpenAI.ToolChoiceImageGeneration

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
image_generation
code_interpreter OpenAI.ToolChoiceCodeInterpreter

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
code_interpreter
computer OpenAI.ToolChoiceComputer

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer
computer_use OpenAI.ToolChoiceComputerUse

Indicates that the model should use a built-in tool to generate a response. Learn more about built-in tools.

type enum obrigatório
computer_use
prompt OpenAI.Prompt

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

id string obrigatório

The unique identifier of the prompt template to use.

version string | null
variables OpenAI.ResponsePromptVariables | null

Optional 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.

[key: string] string | OpenAI.InputTextContent | OpenAI.InputImageContent | OpenAI.InputFileContent
Qualquer uma das seguintes opções:
string
type enum obrigatório

The type of the input item. Always input_text.

input_text
text string obrigatório

The text input to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_image.

input_image
image_url string | null
file_id string | null
detail enum obrigatório
lowhighautooriginal
prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
type enum obrigatório

The type of the input item. Always input_file.

input_file
file_id string | null
filename string

The name of the file to be sent to the model.

file_data string

The content of the file to be sent to the model.

prompt_cache_breakpoint OpenAI.PromptCacheBreakpointConfig

Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's prompt_cache_options.ttl; the boundary is not rounded to a token block.

mode enum obrigatório

The breakpoint mode. Always explicit.

explicit
file_url string

The URL of the file to be sent to the model.

detail enum
autolowhigh
service_tier enum

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', then the request will be processed with the Flex Processing service tier. - To opt-in to Fast mode at the request level, include the service_tier=fast or service_tier=priority parameter for Responses or Chat Completions. The response will show service_tier=priority regardless of if you specify service_tier=fast or priority in your request. - If set to 'ultrafast', then the request will be processed with the access-controlled Ultrafast Processing service tier. This tier is currently available for gpt-5.6-sol; a response served through it will show service_tier=ultrafast. - When not set, the default behavior is 'auto'. When the service_tier parameter is set, the response body will include the service_tier value based on the processing mode actually used to serve the request. This response value may be different from the value set in the parameter.

autodefaultflexscalepriorityfastultrafast
truncation enum
autodisabled
id string obrigatório

Unique identifier for this Response.

object enum obrigatório

The object type of this resource - always set to response.

response
status enum

The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.

completedfailedin_progresscancelledqueuedincomplete
access_programs OpenAI.AccessProgramsBody | null obrigatório
cyber enum obrigatório
standarddaybreak_bluedaybreak_red
created_at integer obrigatório

Unix timestamp (in seconds) of when this Response was created.

completed_at integer | null
error OpenAI.ResponseError | null obrigatório

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

type string | null

The original error type, or null if it was not recorded.

param string | null

The request parameter associated with the error, or null if none was recorded.

code enum obrigatório

The error code for the response.

server_errorrate_limit_exceededinvalid_promptdata_residency_mismatchbio_policymisalignment_policy_violationvector_store_timeoutinvalid_imageinvalid_image_formatinvalid_base64_imageinvalid_image_urlimage_too_largeimage_too_smallimage_parse_errorimage_content_policy_violationinvalid_image_modeimage_file_too_largeunsupported_image_media_typeempty_image_filefailed_to_download_imageimage_file_not_found
message string obrigatório

A human-readable description of the error.

misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

incomplete_details OpenAI.ResponseIncompleteDetails | null obrigatório
reason enum
max_output_tokensmax_messagescontent_filtersteered
output OpenAI.OutputItem[] obrigatório

An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs.

reasoning OpenAI.Reasoning | null

Configuration options for reasoning models.

mode string | enum
Qualquer uma das seguintes opções:
string
enum
standardpro
effort string | enum | null

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, xhigh, and max. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. Not all reasoning models support every value. See the reasoning guide for model-specific support.

Qualquer uma das seguintes opções:
string
enum
noneminimallowmediumhighxhighmax
summary enum
autoconcisedetailed
context enum
autocurrent_turnall_turns
generate_summary enum
autoconcisedetailed
instructions string | OpenAI.InputItem[] | null obrigatório
Qualquer uma das seguintes opções:
string
OpenAI.InputItem[]
output_text string | null
usage OpenAI.ResponseUsage | null

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

input_tokens integer obrigatório
input_tokens_details OpenAI.ResponseUsageInputTokensDetails obrigatório
cached_tokens integer obrigatório
cache_write_tokens integer obrigatório
output_tokens integer obrigatório
output_tokens_details OpenAI.ResponseUsageOutputTokensDetails obrigatório
reasoning_tokens integer obrigatório
total_tokens integer obrigatório
prompt_cache_options OpenAI.PromptCacheOptions

The prompt-caching options that were applied to the response. Supported for gpt-5.6 and later models.

ttl enum obrigatório
30m
mode enum obrigatório
implicitexplicit
comparison_response_id string | null
prompt_cache_diagnostics cache_miss | cache_hit | comparison_response_not_found | unavailable

Prompt cache diagnostics requested for this response.

Um dos seguintes:
cache_miss OpenAI.PromptCacheMissDiagnosticsBody
type enum obrigatório
cache_miss
reason enum obrigatório
model_changedprompt_cache_key_changedtools_changedtext_format_changedreasoning_effort_changedverbosity_changedcontext_compactedinput_changedservice_tier_changed
cache_missed_tokens integer obrigatório
comparison_reusable_tokens integer
cache_hit OpenAI.PromptCacheHitDiagnosticsBody
type enum obrigatório
cache_hit
comparison_response_not_found OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type enum obrigatório
comparison_response_not_found
unavailable OpenAI.PromptCacheUnavailableDiagnosticsBody
type enum obrigatório
unavailable
moderation OpenAI.Moderation | null

Moderation results or errors for the response input and output.

input error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
output error | moderation_result obrigatório

Moderation results or an error for a response moderation check.

Um dos seguintes:
error OpenAI.ModerationErrorBody

An error produced while attempting moderation for the response input or output.

type enum obrigatório

The object type, which was always error for moderation failures.

error
code string obrigatório

The error code.

message string obrigatório

The error message.

moderation_result OpenAI.ModerationResultBody

A moderation result produced for the response input or output.

type enum obrigatório

The object type, which was always moderation_result for successful moderation results.

moderation_result
model string obrigatório

The moderation model that produced this result.

flagged boolean obrigatório

A boolean indicating whether the content was flagged by any category.

categories object obrigatório

A dictionary of moderation categories to booleans, True if the input is flagged under this category.

[key: string] boolean
category_scores object obrigatório

A dictionary of moderation categories to scores.

[key: string] number
category_applied_input_types object obrigatório

Which modalities of input are reflected by the score for each category.

[key: string] enum[]
parallel_tool_calls boolean obrigatório

Whether to allow the model to run tool calls in parallel.

conversation OpenAI.ResponseConversation | null

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

id string obrigatório

The unique ID of the conversation that this response was associated with.

max_output_tokens integer | null
agent_reference AgentReference | null obrigatório

The agent used for this response

type enum obrigatório
agent_reference
name string obrigatório

The name of the agent.

version string

The version identifier of the agent.

model_selection_details ModelSelectionDetails

Model selection metadata providing visibility into routing decisions.

model_router_details ModelRouterDetails obrigatório

Routing decision metadata from Model Router.

mode string | enum obrigatório

The routing mode used by Model Router for the request.

Qualquer uma das seguintes opções:
string
enum
balancedcostquality
session_affinity SessionAffinityDetails

Effective Model Router session affinity metadata for a request.

mode string | enum obrigatório

Effective modes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
stickynone
source string | enum

Conversation identifier sources supported by Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
session_id_payloadsession_id_headernot_availableconversationprevious_response_id
decision string | enum

Final outcomes reported for Model Router session affinity.

Qualquer uma das seguintes opções:
string
enum
initializeretainswitch
routing_trace RoutingTraceEntry[] obrigatório

Ordered trace of routing decisions. Contains one entry for Chat Completions, and may contain multiple entries for Responses API or agent scenarios where multiple inference turns occur.

content_filters ContentFilterResult[]

The content filter evaluation results.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.content_part.done.

response.content_part.done
item_id string obrigatório

The ID of the output item that the content part was added to.

output_index integer obrigatório
content_index integer obrigatório
sequence_number integer obrigatório
part output_text | refusal | reasoning_text obrigatório
Um dos seguintes:
output_text OpenAI.OutputContentOutputTextContent

A text output from the model.

type enum obrigatório

The type of the output text. Always output_text.

output_text
text string obrigatório

The text output from the model.

annotations OpenAI.Annotation[]

The annotations of the text output.

logprobs OpenAI.LogProb[]
refusal OpenAI.OutputContentRefusalContent

A refusal from the model.

type enum obrigatório

The type of the refusal. Always refusal.

refusal
refusal string obrigatório

The refusal explanation from the model.

reasoning_text OpenAI.OutputContentReasoningTextContent

Reasoning text from the model.

type enum obrigatório

The type of the reasoning text. Always reasoning_text.

reasoning_text
text string obrigatório

The reasoning text from the model.

type enum obrigatório

The type of the event. Always response.file_search_call.completed.

response.file_search_call.completed
output_index integer obrigatório
item_id string obrigatório

The ID of the output item that the file search call is initiated.

sequence_number integer obrigatório
type enum obrigatório
response.function_call_arguments.done
item_id string obrigatório

The ID of the item.

output_index integer obrigatório
sequence_number integer obrigatório
arguments string obrigatório

The function-call arguments.

type enum obrigatório

The type of the event. Always response.output_item.done.

response.output_item.done
output_index integer obrigatório
sequence_number integer obrigatório
item structured_outputs | workflow_action | oauth_consent_request | bing_grounding_call | bing_grounding_call_output | sharepoint_grounding_preview_call | sharepoint_grounding_preview_call_output | azure_ai_search_call | azure_ai_search_call_output | bing_custom_search_preview_call | bing_custom_search_preview_call_output | openapi_call | openapi_call_output | browser_automation_preview_call | browser_automation_preview_call_output | fabric_dataagent_preview_call | fabric_dataagent_preview_call_output | azure_function_call | azure_function_call_output | a2a_preview_call | a2a_preview_call_output | memory_search_call | memory_command_preview_call | memory_command_preview_call_output | output_message | file_search_call | function_call | function_call_output | web_search_call | computer_call | computer_call_output | reasoning | program | program_output | tool_search_call | tool_search_output | additional_tools | compaction | image_generation_call | code_interpreter_call | local_shell_call | local_shell_call_output | shell_call | shell_call_output | apply_patch_call | apply_patch_call_output | mcp_call | mcp_list_tools | mcp_approval_request | mcp_approval_response | custom_tool_call | custom_tool_call_output obrigatório
Um dos seguintes:
structured_outputs StructuredOutputsOutputItem
type enum obrigatório
structured_outputs
output StructuredOutputsOutputItem obrigatório

The structured output captured during the response.

workflow_action WorkflowActionOutputItem
type enum obrigatório
workflow_action
kind string obrigatório

The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent').

action_id string obrigatório

Unique identifier for the action.

parent_action_id string

ID of the parent action if this is a nested action.

previous_action_id string

ID of the previous action if this action follows another.

status enum obrigatório

Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').

completedfailedin_progresscancelled
oauth_consent_request OAuthConsentRequestOutputItem

Request from the service for the user to perform OAuth consent.

id string obrigatório
type enum obrigatório
oauth_consent_request
consent_link string obrigatório

The link the user can use to perform OAuth consent.

server_label string obrigatório

The server label for the OAuth consent request.

bing_grounding_call BingGroundingToolCall

A Bing grounding tool call.

type enum obrigatório
bing_grounding_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_grounding_call_output BingGroundingToolCallOutput

The output of a Bing grounding tool call.

type enum obrigatório
bing_grounding_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call SharepointGroundingToolCall

A SharePoint grounding tool call.

type enum obrigatório
sharepoint_grounding_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
sharepoint_grounding_preview_call_output SharepointGroundingToolCallOutput

The output of a SharePoint grounding tool call.

type enum obrigatório
sharepoint_grounding_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call AzureAISearchToolCall

An Azure AI Search tool call.

type enum obrigatório
azure_ai_search_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_ai_search_call_output AzureAISearchToolCallOutput

The output of an Azure AI Search tool call.

type enum obrigatório
azure_ai_search_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call BingCustomSearchToolCall

A Bing custom search tool call.

type enum obrigatório
bing_custom_search_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
bing_custom_search_preview_call_output BingCustomSearchToolCallOutput

The output of a Bing custom search tool call.

type enum obrigatório
bing_custom_search_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call OpenApiToolCall

An OpenAPI tool call.

type enum obrigatório
openapi_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the OpenAPI operation being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
openapi_call_output OpenApiToolCallOutput

The output of an OpenAPI tool call.

type enum obrigatório
openapi_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the OpenAPI operation that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call BrowserAutomationToolCall

A browser automation tool call.

type enum obrigatório
browser_automation_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
browser_automation_preview_call_output BrowserAutomationToolCallOutput

The output of a browser automation tool call.

type enum obrigatório
browser_automation_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call FabricDataAgentToolCall

A Fabric data agent tool call.

type enum obrigatório
fabric_dataagent_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
fabric_dataagent_preview_call_output FabricDataAgentToolCallOutput

The output of a Fabric data agent tool call.

type enum obrigatório
fabric_dataagent_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call AzureFunctionToolCall

An Azure Function tool call.

type enum obrigatório
azure_function_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the Azure Function being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
azure_function_call_output AzureFunctionToolCallOutput

The output of an Azure Function tool call.

type enum obrigatório
azure_function_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the Azure Function that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call A2AToolCall

An A2A (Agent-to-Agent) tool call.

type enum obrigatório
a2a_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the A2A agent card being called.

arguments string obrigatório

A JSON string of the arguments to pass to the tool.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
a2a_preview_call_output A2AToolCallOutput

The output of an A2A (Agent-to-Agent) tool call.

type enum obrigatório
a2a_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

name string obrigatório

The name of the A2A agent card that was called.

output object | string | any[]

The output content from a tool call, which can be a dictionary, string, or array.

Qualquer uma das seguintes opções:
object
string
any[]
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memory_search_call MemorySearchToolCall

A memory search tool call.

type enum obrigatório
memory_search_call
status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memories MemoryItem[] | null

The results returned from the memory search.

memory_command_preview_call MemoryCommandToolCall

A memory command tool call.

type enum obrigatório
memory_command_preview_call
call_id string obrigatório

The unique ID of the tool call generated by the model.

arguments string obrigatório

A JSON string of the arguments to pass to the tool, including action (remember or forget) and content.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
memory_command_preview_call_output MemoryCommandToolCallOutput

The output of a memory command tool call.

type enum obrigatório
memory_command_preview_call_output
call_id string obrigatório

The unique ID of the tool call generated by the model.

status enum obrigatório

The status of a tool call.

in_progresscompletedincompletefailed
output_message OpenAI.OutputItemOutputMessage

An output message from the model.

id string obrigatório

The unique ID of the output message.

type enum obrigatório

The type of the output message. Always message.

output_message
role enum obrigatório

The role of the output message. Always assistant.

assistant
content OpenAI.OutputMessageContent[] obrigatório

The content of the output message.

phase enum

Labels an assistant message as intermediate commentary (commentary) or the final answer (final_answer). For models like gpt-5.3-codex and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages.

commentaryfinal_answer
status enum obrigatório

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
file_search_call OpenAI.OutputItemFileSearchToolCall

The results of a file search tool call. See the file search guide for more information.

id string obrigatório

The unique ID of the file search tool call.

type enum obrigatório

The type of the file search tool call. Always file_search_call.

file_search_call
status enum obrigatório

The status of the file search tool call. One of in_progress, searching, incomplete or failed,

in_progresssearchingcompletedincompletefailed
queries string[] obrigatório

The queries used to search for files.

results OpenAI.FileSearchToolCallResults[] | null
function_call OpenAI.OutputItemFunctionToolCall

A tool call to run a function. See the function calling guide for more information.

id string obrigatório

The unique ID of the function tool call.

type enum obrigatório

The type of the function tool call. Always function_call.

function_call
call_id string obrigatório

The unique ID of the function tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

namespace string

The namespace of the function to run.

name string obrigatório

The name of the function to run.

arguments string obrigatório

A JSON string of the arguments to pass to the function.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
async boolean

Whether the function tool call runs asynchronously.

function_call_output OpenAI.OutputItemFunctionToolCallOutput

The output of a function tool call.

id string obrigatório

The unique ID of the function tool call output. Populated when this item is returned via API.

type enum obrigatório

The type of the function tool call output. Always function_call_output.

function_call_output
call_id string

The unique ID of the function tool call generated by the model.

name string

The name of the tool that produced the output.

namespace string

The namespace of the tool that produced the output.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCallerParam
type enum obrigatório

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum obrigatório

The caller type. Always program.

program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] obrigatório

The output from the function call generated by your code. Can be a string or an list of output content.

Um dos seguintes:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
web_search_call OpenAI.OutputItemWebSearchToolCall

The results of a web search tool call. See the web search guide for more information.

id string obrigatório

The unique ID of the web search tool call.

type enum obrigatório

The type of the web search tool call. Always web_search_call.

web_search_call
status enum obrigatório
in_progresssearchingcompletedfailedincomplete
action OpenAI.WebSearchActionSearch | OpenAI.WebSearchActionOpenPage | OpenAI.WebSearchActionFind

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).

Um dos seguintes:
type enum obrigatório

The action type.

search
query string

The search query.

queries string[]

The search queries.

sources OpenAI.WebSearchActionSearchSources[]

The sources used in the search.

type enum obrigatório

The action type.

open_page
url string | null

The URL opened by the model.

type enum obrigatório

The action type.

find_in_page
url string | null

The URL of the page searched for the pattern, when available.

pattern string obrigatório

The pattern or text to search for within the page.

computer_call OpenAI.OutputItemComputerToolCall

A tool call to a computer use tool. See the computer use guide for more information.

type enum obrigatório

The type of the computer call. Always computer_call.

computer_call
id string obrigatório

The unique ID of the computer call.

call_id string obrigatório

An identifier used when responding to the tool call with output.

action click | double_click | drag | keypress | move | screenshot | scroll | type | wait
Um dos seguintes:
click OpenAI.ClickParam

A click action.

type enum obrigatório

Specifies the event type. For a click action, this property is always click.

click
button enum obrigatório
leftrightwheelbackforward
x integer obrigatório
y integer obrigatório
keys string[] | null
double_click OpenAI.DoubleClickAction

A double click action.

type enum obrigatório

Specifies the event type. For a double click action, this property is always set to double_click.

double_click
x integer obrigatório
y integer obrigatório
keys string[] | null obrigatório
drag OpenAI.DragParam

A drag action.

type enum obrigatório

Specifies the event type. For a drag action, this property is always set to drag.

drag
path OpenAI.CoordParam[] obrigatório

An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg [ { x: 100, y: 200 }, { x: 200, y: 300 } ]

keys string[] | null
keypress OpenAI.KeyPressAction

A collection of keypresses the model would like to perform.

type enum obrigatório

Specifies the event type. For a keypress action, this property is always set to keypress.

keypress
keys string[] obrigatório

The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.

move OpenAI.MoveParam

A mouse move action.

type enum obrigatório

Specifies the event type. For a move action, this property is always set to move.

move
x integer obrigatório
y integer obrigatório
keys string[] | null
screenshot OpenAI.ScreenshotParam

A screenshot action.

type enum obrigatório

Specifies the event type. For a screenshot action, this property is always set to screenshot.

screenshot
scroll OpenAI.ScrollParam

A scroll action.

type enum obrigatório

Specifies the event type. For a scroll action, this property is always set to scroll.

scroll
x integer obrigatório
y integer obrigatório
scroll_x integer obrigatório
scroll_y integer obrigatório
keys string[] | null
type OpenAI.TypeParam

An action to type in text.

type enum obrigatório

Specifies the event type. For a type action, this property is always set to type.

type
text string obrigatório

The text to type.

wait OpenAI.WaitParam

A wait action.

type enum obrigatório

Specifies the event type. For a wait action, this property is always set to wait.

wait
actions OpenAI.ComputerAction[]

Flattened batched actions for computer_use. Each action includes an type discriminator and action-specific fields.

pending_safety_checks OpenAI.ComputerCallSafetyCheckParam[] obrigatório

The pending safety checks for the computer call.

status enum obrigatório

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
computer_call_output OpenAI.OutputItemComputerToolCallOutput

The output of a computer tool call.

type enum obrigatório

The type of the computer tool call output. Always computer_call_output.

computer_call_output
id string obrigatório

The ID of the computer tool call output.

call_id string obrigatório

The ID of the computer tool call that produced the output.

acknowledged_safety_checks OpenAI.ComputerCallSafetyCheckParam[]

The safety checks reported by the API that have been acknowledged by the developer.

output OpenAI.ComputerScreenshotImage obrigatório

A computer screenshot image used with the computer use tool.

type enum obrigatório

Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot.

computer_screenshot
image_url string

The URL of the screenshot image.

file_id string

The identifier of an uploaded file that contains the screenshot.

status enum

The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.

in_progresscompletedincomplete
reasoning OpenAI.OutputItemReasoningItem

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.

type enum obrigatório

The type of the object. Always reasoning.

reasoning
id string obrigatório

The unique identifier of the reasoning content.

encrypted_content string | null
summary OpenAI.SummaryTextContent[] obrigatório

Reasoning summary content.

content OpenAI.ReasoningTextContent[]

Reasoning text content.

status enum

The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.

in_progresscompletedincomplete
program OpenAI.OutputItemProgram
type enum obrigatório

The type of the item. Always program.

program
id string obrigatório

The unique ID of the program item.

call_id string obrigatório

The stable call ID of the program item.

code string obrigatório

The JavaScript source executed by programmatic tool calling.

fingerprint string obrigatório

Opaque program replay fingerprint that must be round-tripped.

program_output OpenAI.OutputItemProgramOutput
type enum obrigatório

The type of the item. Always program_output.

program_output
id string obrigatório

The unique ID of the program output item.

call_id string obrigatório

The call ID of the program item.

result string obrigatório

The result produced by the program item.

status enum obrigatório
completedincomplete
tool_search_call OpenAI.OutputItemToolSearchCall
type enum obrigatório

The type of the item. Always tool_search_call.

tool_search_call
id string obrigatório

The unique ID of the tool search call item.

call_id string | null obrigatório
execution enum obrigatório
serverclient
arguments OpenAI.OutputItemToolSearchCall obrigatório

Arguments used for the tool search call.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

tool_search_output OpenAI.OutputItemToolSearchOutput
type enum obrigatório

The type of the item. Always tool_search_output.

tool_search_output
id string obrigatório

The unique ID of the tool search output item.

call_id string | null obrigatório
execution enum obrigatório
serverclient
tools OpenAI.Tool[] obrigatório

The loaded tool definitions returned by tool search.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

additional_tools OpenAI.OutputItemAdditionalTools
type enum obrigatório

The type of the item. Always additional_tools.

additional_tools
id string obrigatório

The unique ID of the additional tools item.

role enum obrigatório
unknownuserassistantsystemcriticdiscriminatordevelopertool
tools OpenAI.Tool[] obrigatório

The additional tool definitions made available at this item.

compaction OpenAI.OutputItemCompactionBody

A compaction item generated by the v1/responses/compact API.

type enum obrigatório

The type of the item. Always compaction.

compaction
id string obrigatório

The unique ID of the compaction item.

encrypted_content string obrigatório

The encrypted content that was produced by compaction.

created_by string

The identifier of the actor that created the item.

image_generation_call OpenAI.OutputItemImageGenToolCall

An image generation request made by the model.

type enum obrigatório

The type of the image generation call. Always image_generation_call.

image_generation_call
id string obrigatório

The unique ID of the image generation call.

status enum obrigatório

The status of the image generation call.

in_progresscompletedgeneratingfailed
result string | null obrigatório
error OpenAI.ImageGenToolCallError
code string | null obrigatório
type string obrigatório

The error type.

message string obrigatório

A description of the error.

param string | null obrigatório
moderation_details OpenAI.ImageGenToolCallModerationDetails
moderation_stage enum obrigatório

The stage where moderation blocked the image generation call.

inputoutputunknown
categories string[] obrigatório

Public moderation categories. New category values may be added over time.

size string | enum | null
Qualquer uma das seguintes opções:
string
enum
1024x10241024x15361536x1024
quality enum
lowmediumhighxhighmaxauto
action enum
generateeditauto
background enum
transparentopaqueauto
output_format enum
pngwebpjpeg
revised_prompt string | null
code_interpreter_call OpenAI.OutputItemCodeInterpreterToolCall

A tool call to run code.

type enum obrigatório

The type of the code interpreter tool call. Always code_interpreter_call.

code_interpreter_call
id string obrigatório

The unique ID of the code interpreter tool call.

status enum obrigatório

The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.

in_progresscompletedincompleteinterpretingfailed
container_id string obrigatório

The ID of the container used to run the code.

code string | null obrigatório
outputs (OpenAI.CodeInterpreterOutputLogs | OpenAI.CodeInterpreterOutputImage)[] | null obrigatório
local_shell_call OpenAI.OutputItemLocalShellToolCall

A tool call to run a command on the local shell.

type enum obrigatório

The type of the local shell call. Always local_shell_call.

local_shell_call
id string obrigatório

The unique ID of the local shell call.

call_id string obrigatório

The unique ID of the local shell tool call generated by the model.

action OpenAI.LocalShellExecAction obrigatório

Execute a shell command on the server.

type enum obrigatório

The type of the local shell action. Always exec.

exec
command string[] obrigatório

The command to run.

timeout_ms integer | null
working_directory string | null
env object obrigatório

Environment variables to set for the command.

[key: string] string
user string | null
status enum obrigatório

The status of the local shell call.

in_progresscompletedincomplete
local_shell_call_output OpenAI.OutputItemLocalShellToolCallOutput

The output of a local shell tool call.

type enum obrigatório

The type of the local shell tool call output. Always local_shell_call_output.

local_shell_call_output
id string obrigatório

The unique ID of the local shell tool call generated by the model.

output string obrigatório

A JSON string of the output of the local shell tool call.

status enum
in_progresscompletedincomplete
shell_call OpenAI.OutputItemFunctionShellCall

A tool call that executes one or more shell commands in a managed environment.

type enum obrigatório

The type of the item. Always shell_call.

shell_call
id string obrigatório

The unique ID of the shell tool call. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

action OpenAI.FunctionShellAction obrigatório

Execute a shell command.

commands string[] obrigatório
timeout_ms integer | null obrigatório
max_output_length integer | null obrigatório
status enum obrigatório
in_progresscompletedincomplete
environment local | container_reference | null obrigatório
Um dos seguintes:
local OpenAI.LocalEnvironmentResource

Represents the use of a local environment to perform shell actions.

type enum obrigatório

The environment type. Always local.

local
container_reference OpenAI.ContainerReferenceResource

Represents a container created with /v1/containers.

type enum obrigatório

The environment type. Always container_reference.

container_reference
container_id string obrigatório
created_by string

The ID of the entity that created this tool call.

shell_call_output OpenAI.OutputItemFunctionShellCallOutput

The output of a shell tool call that was emitted.

type enum obrigatório

The type of the shell call output. Always shell_call_output.

shell_call_output
id string obrigatório

The unique ID of the shell call output. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the shell tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
in_progresscompletedincomplete
output OpenAI.FunctionShellCallOutputContent[] obrigatório

An array of shell call output contents

max_output_length integer | null obrigatório
created_by string

The identifier of the actor that created the item.

apply_patch_call OpenAI.OutputItemApplyPatchToolCall

A tool call that applies file diffs by creating, deleting, or updating files.

type enum obrigatório

The type of the item. Always apply_patch_call.

apply_patch_call
id string obrigatório

The unique ID of the apply patch tool call. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
in_progresscompleted
operation create_file | delete_file | update_file obrigatório

One of the create_file, delete_file, or update_file operations applied via apply_patch.

Um dos seguintes:
create_file OpenAI.ApplyPatchCreateFileOperation

Instruction describing how to create a file via the apply_patch tool.

type enum obrigatório

Create a new file with the provided diff.

create_file
path string obrigatório

Path of the file to create.

diff string obrigatório

Diff to apply.

delete_file OpenAI.ApplyPatchDeleteFileOperation

Instruction describing how to delete a file via the apply_patch tool.

type enum obrigatório

Delete the specified file.

delete_file
path string obrigatório

Path of the file to delete.

update_file OpenAI.ApplyPatchUpdateFileOperation

Instruction describing how to update a file via the apply_patch tool.

type enum obrigatório

Update an existing file with the provided diff.

update_file
path string obrigatório

Path of the file to update.

diff string obrigatório

Diff to apply.

created_by string

The ID of the entity that created this tool call.

apply_patch_call_output OpenAI.OutputItemApplyPatchToolCallOutput

The output emitted by an apply patch tool call.

type enum obrigatório

The type of the item. Always apply_patch_call_output.

apply_patch_call_output
id string obrigatório

The unique ID of the apply patch tool call output. Populated when this item is returned via API.

call_id string obrigatório

The unique ID of the apply patch tool call generated by the model.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

status enum obrigatório
completedfailed
output string | null
created_by string

The ID of the entity that created this tool call output.

mcp_call OpenAI.OutputItemMcpToolCall

An invocation of a tool on an MCP server.

type enum obrigatório

The type of the item. Always mcp_call.

mcp_call
id string obrigatório

The unique ID of the tool call.

server_label string obrigatório

The label of the MCP server running the tool.

name string obrigatório

The name of the tool that was run.

arguments string obrigatório

A JSON string of the arguments passed to the tool.

output string | null
error object

The error from the tool call, if any.

status enum
in_progresscompletedincompletecallingfailed
approval_request_id string | null
mcp_list_tools OpenAI.OutputItemMcpListTools

A list of tools available on an MCP server.

type enum obrigatório

The type of the item. Always mcp_list_tools.

mcp_list_tools
id string obrigatório

The unique ID of the list.

server_label string obrigatório

The label of the MCP server.

tools OpenAI.MCPListToolsTool[] obrigatório

The tools available on the server.

error protocol_error | tool_execution_error | http_error
Um dos seguintes:
protocol_error OpenAI.RealtimeMCPProtocolError
type enum obrigatório
protocol_error
code integer obrigatório
message string obrigatório
tool_execution_error OpenAI.RealtimeMCPToolExecutionError
type enum obrigatório
tool_execution_error
message string obrigatório
http_error OpenAI.RealtimeMCPHTTPError
type enum obrigatório
http_error
code integer obrigatório
message string obrigatório
mcp_approval_request OpenAI.OutputItemMcpApprovalRequest

A request for human approval of a tool invocation.

type enum obrigatório

The type of the item. Always mcp_approval_request.

mcp_approval_request
id string obrigatório

The unique ID of the approval request.

server_label string obrigatório

The label of the MCP server making the request.

name string obrigatório

The name of the tool to run.

arguments string obrigatório

A JSON string of arguments for the tool.

mcp_approval_response OpenAI.OutputItemMcpApprovalResponseResource

A response to an MCP approval request.

type enum obrigatório

The type of the item. Always mcp_approval_response.

mcp_approval_response
id string obrigatório

The unique ID of the approval response

approval_request_id string obrigatório

The ID of the approval request being answered.

approve boolean obrigatório

Whether the request was approved.

reason string | null
custom_tool_call OpenAI.OutputItemCustomToolCallResource
type enum obrigatório

The type of the custom tool call. Always custom_tool_call.

custom_tool_call
id string

The unique ID of the custom tool call in the OpenAI platform.

call_id string obrigatório

An identifier used to map this custom tool call to a tool call output.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCaller
type enum obrigatório
direct
program OpenAI.ProgramToolCallCaller
type enum obrigatório
program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

namespace string

The namespace of the custom tool being called.

name string obrigatório

The name of the custom tool being called.

input string obrigatório

The input for the custom tool call generated by the model.

async boolean

Whether the custom tool call runs asynchronously.

status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

custom_tool_call_output OpenAI.OutputItemCustomToolCallOutputResource
type enum obrigatório

The type of the custom tool call output. Always custom_tool_call_output.

custom_tool_call_output
id string

The unique ID of the custom tool call output in the OpenAI platform.

call_id string obrigatório

The call ID, used to map this custom tool call output to a custom tool call.

caller direct | program | null

The execution context that produced this tool call.

Um dos seguintes:
direct OpenAI.DirectToolCallCallerParam
type enum obrigatório

The caller type. Always direct.

direct
program OpenAI.ProgramToolCallCallerParam
type enum obrigatório

The caller type. Always program.

program
caller_id string obrigatório

The call ID of the program item that produced this tool call.

output string | OpenAI.FunctionAndCustomToolCallOutput[] obrigatório

The output from the custom tool call generated by your code. Can be a string or an list of output content.

Um dos seguintes:
string
OpenAI.FunctionAndCustomToolCallOutput[]
status enum obrigatório
in_progresscompletedincomplete
created_by string

The identifier of the actor that created the item.

type enum obrigatório

The type of the event. Always response.reasoning_summary_part.done.

response.reasoning_summary_part.done
item_id string obrigatório

The ID of the item this summary part is associated with.

output_index integer obrigatório
summary_index integer obrigatório
status enum

The completion status of the summary part. Omitted when the part completed normally and set to incomplete when generation was interrupted.

incomplete
sequence_number integer obrigatório
part OpenAI.ResponseReasoningSummaryPartDoneEventPart obrigatório
type enum obrigatório
summary_text
text string obrigatório
type enum obrigatório

The type of the event. Always response.reasoning_summary_text.done.

response.reasoning_summary_text.done
item_id string obrigatório

The ID of the item this summary text is associated with.

output_index integer obrigatório
summary_index integer obrigatório
text string obrigatório

The full text of the completed reasoning summary.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.reasoning_text.done.

response.reasoning_text.done
item_id string obrigatório

The ID of the item this reasoning text is associated with.

output_index integer obrigatório
content_index integer obrigatório
text string obrigatório

The full text of the completed reasoning content.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.refusal.done.

response.refusal.done
item_id string obrigatório

The ID of the output item that the refusal text is finalized.

output_index integer obrigatório
content_index integer obrigatório
refusal string obrigatório

The refusal text that is finalized.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always response.output_text.done.

response.output_text.done
item_id string obrigatório

The ID of the output item that the text content is finalized.

output_index integer obrigatório
content_index integer obrigatório
text string obrigatório

The text content that is finalized.

sequence_number integer obrigatório
logprobs OpenAI.ResponseLogProb[] obrigatório

The log probabilities of the tokens in the delta.

type enum obrigatório

The type of the event. Always response.web_search_call.completed.

response.web_search_call.completed
output_index integer obrigatório
item_id string obrigatório

Unique ID for the output item associated with the web search call.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.image_generation_call.completed'.

response.image_generation_call.completed
output_index integer obrigatório
sequence_number integer obrigatório
item_id string obrigatório

The unique identifier of the image generation item being processed.

type enum obrigatório

The type of the event. Always 'response.mcp_call_arguments.done'.

response.mcp_call_arguments.done
output_index integer obrigatório
item_id string obrigatório

The unique identifier of the MCP tool call item being processed.

arguments string obrigatório

A JSON string containing the finalized arguments for the MCP tool call.

sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.mcp_call.completed'.

response.mcp_call.completed
item_id string obrigatório

The ID of the MCP tool call item that completed.

output_index integer obrigatório
sequence_number integer obrigatório
type enum obrigatório

The type of the event. Always 'response.mcp_list_tools.completed'.

response.mcp_list_tools.completed
item_id string obrigatório

The ID of the MCP tool call item that produced this output.

output_index integer obrigatório
sequence_number integer obrigatório
type enum obrigatório

The event type identifier.

response.custom_tool_call_input.done
sequence_number integer obrigatório
output_index integer obrigatório
item_id string obrigatório

Unique identifier for the API item associated with this event.

input string obrigatório

The complete input data for the custom tool call.

Client error

Corpo

Content-Type: application/json
error OpenAI.Error obrigatório
code string | null obrigatório
message string obrigatório
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Corpo

Content-Type: application/json
error OpenAI.Error obrigatório
code string | null obrigatório
message string obrigatório
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Qualquer uma das seguintes opções:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string obrigatório

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Pedir

curl https://api.openai.com/v1/responses/resp_123 \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer $OPENAI_API_KEY"
import OpenAI from "openai";
const client = new OpenAI();

const response = await client.responses.retrieve("resp_123");
console.log(response);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
for response in client.responses.retrieve(
    response_id="resp_677efb5139a88190b512bc3fef8e535d",
):
  print(response)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

const response = await client.responses.retrieve('resp_677efb5139a88190b512bc3fef8e535d');

console.log(response.id);
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/option"
    "github.com/openai/openai-go/responses"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("My API Key"),
    )
    response, err := client.Responses.Get(
        context.TODO(),
        "resp_677efb5139a88190b512bc3fef8e535d",
        responses.ResponseGetParams{},
    )
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", response.ID)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.responses.Response;
import com.openai.models.responses.ResponseRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        Response response = client.responses().retrieve("resp_677efb5139a88190b512bc3fef8e535d");
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

response = openai.responses.retrieve("resp_677efb5139a88190b512bc3fef8e535d")

puts(response)

Response

{
  "id": "resp_67cb71b351908190a308f3859487620d06981a8637e6bc44",
  "object": "response",
  "created_at": 1741386163,
  "status": "completed",
  "completed_at": 1741386164,
  "error": null,
  "incomplete_details": null,
  "instructions": null,
  "max_output_tokens": null,
  "model": "gpt-4o-2024-08-06",
  "output": [
    {
      "type": "message",
      "id": "msg_67cb71b3c2b0819084d481baaaf148f206981a8637e6bc44",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "Silent circuits hum,
Thoughts emerge in data streams—
Digital dawn breaks.",
          "annotations": []
        }
      ]
    }
  ],
  "parallel_tool_calls": true,
  "previous_response_id": null,
  "reasoning": {
    "effort": null,
    "summary": null
  },
  "store": true,
  "temperature": 1.0,
  "text": {
    "format": {
      "type": "text"
    }
  },
  "tool_choice": "auto",
  "tools": [],
  "top_p": 1.0,
  "truncation": "disabled",
  "usage": {
    "input_tokens": 32,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 18,
    "output_tokens_details": {
      "reasoning_tokens": 0
    },
    "total_tokens": 50
  },
  "user": null,
  "metadata": {}
}
pt-pt
Suas opções de privacidade
  • Exclusão de responsabilidade de IA
  • Versões anteriores
  • Blogue
  • Contribuir
  • Privacidade
  • Privacidade da Saúde do Consumidor
  • Termos de Utilização
  • Marcas Comerciais
  • © Microsoft 2026