Responses
Create a model response
Creates a model response. Provide text or image inputs to generate text or JSON outputs. Have the model call your own custom code or use built-in tools like web search or file search to use your own data as input for the model’s response.
Параметры заголовка
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.
x-ms-session-id
string
An opaque, application-owned conversation identifier. The value is not returned in the response and must not contain secrets or personally identifiable information.
Текст запроса
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
access_programs
OpenAI.AccessProgramsParam
Domain-specific access programs to use for this request.
cyber
enum
prompt_cache_options
OpenAI.ResponsePromptCacheOptionsParam
Options for prompt caching. Supported for gpt-5.6 and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with prompt_cache_breakpoint. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set mode to explicit to disable the implicit breakpoint. The ttl defaults to 30m, which is currently the only supported value. See the prompt caching guide for current details.
ttl
enum
mode
enum
prewarm
boolean
Prepares the prompt cache without generating output. Defaults to false. When set to true, overrides the generate field to false.
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.
truncation
enum
reasoning
OpenAI.Reasoning | null
Configuration options for reasoning models.
mode
string | enum
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
input
string | OpenAI.InputItem[]
Text, image, or file inputs to the model, used to generate a response. Learn more: - Text inputs and outputs - Image inputs - File inputs - Conversation state - Function calling
moderation
OpenAI.ModerationParam | null
Configuration for running moderation on the input and output of this response.
model
string
обязательно
The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'.
policy
OpenAI.ModerationPolicyParam | null
The policy to apply to moderated response input and output.
input
OpenAI.ModerationConfigParam | null
The moderation policy for the response input.
mode
enum
обязательно
output
OpenAI.ModerationConfigParam | null
The moderation policy for the response input.
mode
enum
обязательно
stream_options
OpenAI.ResponseStreamOptions | null
Options for streaming responses. Only set this when you set stream: true.
include_obfuscation
boolean
When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an obfuscation field on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are included by default, but add a small amount of overhead to the data stream. You can set include_obfuscation to false to optimize for bandwidth if you trust the network links between your application and the OpenAI API.
conversation
string | OpenAI.ConversationParam-2 | null
The conversation that this response belongs to. Items from this conversation are prepended to input_items for this response request. Input items and output items from this response are automatically added to this conversation after this response completes.
id
string
обязательно
The unique ID of the conversation.
context_management
OpenAI.ContextManagementParam[] | null
Context management configuration for this request.
agent_session_id
string
Optional session identifier for sandbox affinity. Currently only relevant for hosted agents. When provided, the request is routed to the same sandbox. When omitted, auto-derived from conversation_id/prev_response_id or a new UUID is generated.
agent_reference
AgentReference
type
enum
обязательно
name
string
обязательно
The name of the agent.
version
string
The version identifier of the agent.
structured_inputs
object
The structured inputs to the response that can participate in prompt template substitution or tool argument bindings.
user_security_context
AzureUserSecurityContext
User security context contains several parameters that describe the application itself, and the end user that interacts with the application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. Learn more about protecting AI applications using Microsoft Defender for Cloud.
application_name
string
The name of the application. Sensitive personal information should not be included in this field.
end_user_id
string
This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field.
end_user_tenant_id
string
The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multitenant.
source_ip
string
Captures the original client's IP address.
routing_config
RoutingConfiguration
Per-request configuration for Model Router inference calls. Supported on Model Router endpoints (deployed or instant if supported). Returns a 400 (Bad Request) error when the target is not a Model Router endpoint.
session_affinity
SessionAffinityConfiguration
Request settings that control Model Router session affinity.
mode
enum
Request modes supported by Model Router session affinity.
session_id
string
An opaque, application-owned conversation identifier. Use the same value for related requests. The value is not returned in the response and must not contain secrets or personally identifiable information.
Ответы
The request has succeeded.
Заголовки
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.
Текст
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always response.audio.delta.
delta
string
обязательно
A chunk of Base64 encoded response audio bytes.
type
enum
обязательно
The type of the event. Always response.audio.transcript.delta.
delta
string
обязательно
The partial transcript of the audio response.
type
enum
обязательно
The type of the event. Always response.code_interpreter_call_code.delta.
item_id
string
обязательно
The unique identifier of the code interpreter tool call item.
delta
string
обязательно
The partial code snippet being streamed by the code interpreter.
type
enum
обязательно
The type of the event. Always response.code_interpreter_call.in_progress.
item_id
string
обязательно
The unique identifier of the code interpreter tool call item.
type
enum
обязательно
The type of the event. Always response.code_interpreter_call.interpreting.
item_id
string
обязательно
The unique identifier of the code interpreter tool call item.
type
enum
обязательно
The type of the event. Always response.content_part.added.
item_id
string
обязательно
The ID of the output item that the content part was added to.
part
output_text | refusal | reasoning_text
обязательно
output_text
OpenAI.OutputContentOutputTextContent
A text output from the model.
type
enum
обязательно
The type of the output text. Always output_text.
text
string
обязательно
The text output from the model.
annotations
OpenAI.Annotation[]
The annotations of the text output.
refusal
OpenAI.OutputContentRefusalContent
A refusal from the model.
type
enum
обязательно
The type of the refusal. Always refusal.
refusal
string
обязательно
The refusal explanation from the model.
reasoning_text
OpenAI.OutputContentReasoningTextContent
Reasoning text from the model.
type
enum
обязательно
The type of the reasoning text. Always reasoning_text.
text
string
обязательно
The reasoning text from the model.
type
enum
обязательно
The type of the event. Always response.created.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always error.
message
string
обязательно
The error message.
type
enum
обязательно
The type of the event. Always response.file_search_call.in_progress.
item_id
string
обязательно
The ID of the output item that the file search call is initiated.
type
enum
обязательно
The type of the event. Always response.file_search_call.searching.
item_id
string
обязательно
The ID of the output item that the file search call is initiated.
type
enum
обязательно
The type of the event. Always response.function_call_arguments.delta.
item_id
string
обязательно
The ID of the output item that the function-call arguments delta is added to.
delta
string
обязательно
The function-call arguments delta that is added.
type
enum
обязательно
The type of the event. Always response.in_progress.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always response.failed.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always response.incomplete.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always response.output_item.added.
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
обязательно
structured_outputs
StructuredOutputsOutputItem
type
enum
обязательно
output
StructuredOutputsOutputItem
обязательно
The structured output captured during the response.
workflow_action
WorkflowActionOutputItem
type
enum
обязательно
kind
string
обязательно
The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent').
action_id
string
обязательно
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
обязательно
Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').
oauth_consent_request
OAuthConsentRequestOutputItem
Request from the service for the user to perform OAuth consent.
type
enum
обязательно
consent_link
string
обязательно
The link the user can use to perform OAuth consent.
server_label
string
обязательно
The server label for the OAuth consent request.
bing_grounding_call
BingGroundingToolCall
A Bing grounding tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
bing_grounding_call_output
BingGroundingToolCallOutput
The output of a Bing grounding tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
sharepoint_grounding_preview_call
SharepointGroundingToolCall
A SharePoint grounding tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
sharepoint_grounding_preview_call_output
SharepointGroundingToolCallOutput
The output of a SharePoint grounding tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
azure_ai_search_call
AzureAISearchToolCall
An Azure AI Search tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
azure_ai_search_call_output
AzureAISearchToolCallOutput
The output of an Azure AI Search tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
bing_custom_search_preview_call
BingCustomSearchToolCall
A Bing custom search tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
bing_custom_search_preview_call_output
BingCustomSearchToolCallOutput
The output of a Bing custom search tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
openapi_call
OpenApiToolCall
An OpenAPI tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the OpenAPI operation being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
openapi_call_output
OpenApiToolCallOutput
The output of an OpenAPI tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
browser_automation_preview_call
BrowserAutomationToolCall
A browser automation tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
browser_automation_preview_call_output
BrowserAutomationToolCallOutput
The output of a browser automation tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
fabric_dataagent_preview_call
FabricDataAgentToolCall
A Fabric data agent tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
fabric_dataagent_preview_call_output
FabricDataAgentToolCallOutput
The output of a Fabric data agent tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
azure_function_call
AzureFunctionToolCall
An Azure Function tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the Azure Function being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
azure_function_call_output
AzureFunctionToolCallOutput
The output of an Azure Function tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
a2a_preview_call
A2AToolCall
An A2A (Agent-to-Agent) tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the A2A agent card being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
a2a_preview_call_output
A2AToolCallOutput
The output of an A2A (Agent-to-Agent) tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
memory_search_call
MemorySearchToolCall
A memory search tool call.
type
enum
обязательно
status
enum
обязательно
The status of a tool call.
memories
MemoryItem[] | null
The results returned from the memory search.
memory_command_preview_call
MemoryCommandToolCall
A memory command tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool, including action (remember or forget) and content.
status
enum
обязательно
The status of a tool call.
memory_command_preview_call_output
MemoryCommandToolCallOutput
The output of a memory command tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
status
enum
обязательно
The status of a tool call.
output_message
OpenAI.OutputItemOutputMessage
An output message from the model.
id
string
обязательно
The unique ID of the output message.
type
enum
обязательно
The type of the output message. Always message.
role
enum
обязательно
The role of the output message. Always assistant.
content
OpenAI.OutputMessageContent[]
обязательно
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.
status
enum
обязательно
The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.
file_search_call
OpenAI.OutputItemFileSearchToolCall
The results of a file search tool call. See the file search guide for more information.
id
string
обязательно
The unique ID of the file search tool call.
type
enum
обязательно
The type of the file search tool call. Always file_search_call.
status
enum
обязательно
The status of the file search tool call. One of in_progress, searching, incomplete or failed,
queries
string[]
обязательно
The queries used to search for files.
function_call
OpenAI.OutputItemFunctionToolCall
A tool call to run a function. See the function calling guide for more information.
id
string
обязательно
The unique ID of the function tool call.
type
enum
обязательно
The type of the function tool call. Always function_call.
call_id
string
обязательно
The unique ID of the function tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
namespace
string
The namespace of the function to run.
name
string
обязательно
The name of the function to run.
arguments
string
обязательно
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.
async
boolean
Whether the function tool call runs asynchronously.
function_call_output
OpenAI.OutputItemFunctionToolCallOutput
The output of a function tool call.
id
string
обязательно
The unique ID of the function tool call output. Populated when this item is returned via API.
type
enum
обязательно
The type of the function tool call output. Always 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.
direct
OpenAI.DirectToolCallCallerParam
type
enum
обязательно
The caller type. Always direct.
program
OpenAI.ProgramToolCallCallerParam
type
enum
обязательно
The caller type. Always program.
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
output
string | OpenAI.FunctionAndCustomToolCallOutput[]
обязательно
The output from the function call generated by your code. Can be a string or an list of output content.
status
enum
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
web_search_call
OpenAI.OutputItemWebSearchToolCall
The results of a web search tool call. See the web search guide for more information.
id
string
обязательно
The unique ID of the web search tool call.
type
enum
обязательно
The type of the web search tool call. Always web_search_call.
status
enum
обязательно
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).
type
enum
обязательно
The action type.
query
string
The search query.
queries
string[]
The search queries.
sources
OpenAI.WebSearchActionSearchSources[]
The sources used in the search.
type
enum
обязательно
The action type.
url
string | null
The URL opened by the model.
type
enum
обязательно
The action type.
url
string | null
The URL of the page searched for the pattern, when available.
pattern
string
обязательно
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
обязательно
The type of the computer call. Always computer_call.
id
string
обязательно
The unique ID of the computer call.
call_id
string
обязательно
An identifier used when responding to the tool call with output.
action
click | double_click | drag | keypress | move | screenshot | scroll | type | wait
click
OpenAI.ClickParam
A click action.
type
enum
обязательно
Specifies the event type. For a click action, this property is always click.
button
enum
обязательно
double_click
OpenAI.DoubleClickAction
A double click action.
type
enum
обязательно
Specifies the event type. For a double click action, this property is always set to double_click.
drag
OpenAI.DragParam
A drag action.
type
enum
обязательно
Specifies the event type. For a drag action, this property is always set to drag.
path
OpenAI.CoordParam[]
обязательно
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 } ]
keypress
OpenAI.KeyPressAction
A collection of keypresses the model would like to perform.
type
enum
обязательно
Specifies the event type. For a keypress action, this property is always set to keypress.
keys
string[]
обязательно
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
обязательно
Specifies the event type. For a move action, this property is always set to move.
screenshot
OpenAI.ScreenshotParam
A screenshot action.
type
enum
обязательно
Specifies the event type. For a screenshot action, this property is always set to screenshot.
scroll
OpenAI.ScrollParam
A scroll action.
type
enum
обязательно
Specifies the event type. For a scroll action, this property is always set to scroll.
type
OpenAI.TypeParam
An action to type in text.
type
enum
обязательно
Specifies the event type. For a type action, this property is always set to type.
text
string
обязательно
The text to type.
wait
OpenAI.WaitParam
A wait action.
type
enum
обязательно
Specifies the event type. For a wait action, this property is always set to 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[]
обязательно
The pending safety checks for the computer call.
status
enum
обязательно
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
computer_call_output
OpenAI.OutputItemComputerToolCallOutput
The output of a computer tool call.
type
enum
обязательно
The type of the computer tool call output. Always computer_call_output.
id
string
обязательно
The ID of the computer tool call output.
call_id
string
обязательно
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
обязательно
A computer screenshot image used with the computer use tool.
type
enum
обязательно
Specifies the event type. For a computer screenshot, this property is always set to 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.
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
обязательно
The type of the object. Always reasoning.
id
string
обязательно
The unique identifier of the reasoning content.
summary
OpenAI.SummaryTextContent[]
обязательно
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.
program
OpenAI.OutputItemProgram
type
enum
обязательно
The type of the item. Always program.
id
string
обязательно
The unique ID of the program item.
call_id
string
обязательно
The stable call ID of the program item.
code
string
обязательно
The JavaScript source executed by programmatic tool calling.
fingerprint
string
обязательно
Opaque program replay fingerprint that must be round-tripped.
program_output
OpenAI.OutputItemProgramOutput
type
enum
обязательно
The type of the item. Always program_output.
id
string
обязательно
The unique ID of the program output item.
call_id
string
обязательно
The call ID of the program item.
result
string
обязательно
The result produced by the program item.
status
enum
обязательно
tool_search_call
OpenAI.OutputItemToolSearchCall
type
enum
обязательно
The type of the item. Always tool_search_call.
id
string
обязательно
The unique ID of the tool search call item.
execution
enum
обязательно
arguments
OpenAI.OutputItemToolSearchCall
обязательно
Arguments used for the tool search call.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
tool_search_output
OpenAI.OutputItemToolSearchOutput
type
enum
обязательно
The type of the item. Always tool_search_output.
id
string
обязательно
The unique ID of the tool search output item.
execution
enum
обязательно
tools
OpenAI.Tool[]
обязательно
The loaded tool definitions returned by tool search.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
additional_tools
OpenAI.OutputItemAdditionalTools
type
enum
обязательно
The type of the item. Always additional_tools.
id
string
обязательно
The unique ID of the additional tools item.
role
enum
обязательно
tools
OpenAI.Tool[]
обязательно
The additional tool definitions made available at this item.
compaction
OpenAI.OutputItemCompactionBody
A compaction item generated by the v1/responses/compact API.
type
enum
обязательно
The type of the item. Always compaction.
id
string
обязательно
The unique ID of the compaction item.
encrypted_content
string
обязательно
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
обязательно
The type of the image generation call. Always image_generation_call.
id
string
обязательно
The unique ID of the image generation call.
status
enum
обязательно
The status of the image generation call.
error
OpenAI.ImageGenToolCallError
type
string
обязательно
The error type.
message
string
обязательно
A description of the error.
moderation_details
OpenAI.ImageGenToolCallModerationDetails
moderation_stage
enum
обязательно
The stage where moderation blocked the image generation call.
categories
string[]
обязательно
Public moderation categories. New category values may be added over time.
size
string | enum | null
enum
quality
enum
action
enum
background
enum
output_format
enum
code_interpreter_call
OpenAI.OutputItemCodeInterpreterToolCall
A tool call to run code.
type
enum
обязательно
The type of the code interpreter tool call. Always code_interpreter_call.
id
string
обязательно
The unique ID of the code interpreter tool call.
status
enum
обязательно
The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.
container_id
string
обязательно
The ID of the container used to run the code.
local_shell_call
OpenAI.OutputItemLocalShellToolCall
A tool call to run a command on the local shell.
type
enum
обязательно
The type of the local shell call. Always local_shell_call.
id
string
обязательно
The unique ID of the local shell call.
call_id
string
обязательно
The unique ID of the local shell tool call generated by the model.
action
OpenAI.LocalShellExecAction
обязательно
Execute a shell command on the server.
type
enum
обязательно
The type of the local shell action. Always exec.
command
string[]
обязательно
The command to run.
env
object
обязательно
Environment variables to set for the command.
status
enum
обязательно
The status of the local shell call.
local_shell_call_output
OpenAI.OutputItemLocalShellToolCallOutput
The output of a local shell tool call.
type
enum
обязательно
The type of the local shell tool call output. Always local_shell_call_output.
id
string
обязательно
The unique ID of the local shell tool call generated by the model.
output
string
обязательно
A JSON string of the output of the local shell tool call.
status
enum
shell_call
OpenAI.OutputItemFunctionShellCall
A tool call that executes one or more shell commands in a managed environment.
type
enum
обязательно
The type of the item. Always shell_call.
id
string
обязательно
The unique ID of the shell tool call. Populated when this item is returned via API.
call_id
string
обязательно
The unique ID of the shell tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
action
OpenAI.FunctionShellAction
обязательно
Execute a shell command.
status
enum
обязательно
environment
local | container_reference | null
обязательно
local
OpenAI.LocalEnvironmentResource
Represents the use of a local environment to perform shell actions.
type
enum
обязательно
The environment type. Always local.
container_reference
OpenAI.ContainerReferenceResource
Represents a container created with /v1/containers.
type
enum
обязательно
The environment type. Always container_reference.
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
обязательно
The type of the shell call output. Always shell_call_output.
id
string
обязательно
The unique ID of the shell call output. Populated when this item is returned via API.
call_id
string
обязательно
The unique ID of the shell tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
output
OpenAI.FunctionShellCallOutputContent[]
обязательно
An array of shell call output contents
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
обязательно
The type of the item. Always apply_patch_call.
id
string
обязательно
The unique ID of the apply patch tool call. Populated when this item is returned via API.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
operation
create_file | delete_file | update_file
обязательно
One of the create_file, delete_file, or update_file operations applied via apply_patch.
create_file
OpenAI.ApplyPatchCreateFileOperation
Instruction describing how to create a file via the apply_patch tool.
type
enum
обязательно
Create a new file with the provided diff.
path
string
обязательно
Path of the file to create.
diff
string
обязательно
Diff to apply.
delete_file
OpenAI.ApplyPatchDeleteFileOperation
Instruction describing how to delete a file via the apply_patch tool.
type
enum
обязательно
Delete the specified file.
path
string
обязательно
Path of the file to delete.
update_file
OpenAI.ApplyPatchUpdateFileOperation
Instruction describing how to update a file via the apply_patch tool.
type
enum
обязательно
Update an existing file with the provided diff.
path
string
обязательно
Path of the file to update.
diff
string
обязательно
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
обязательно
The type of the item. Always apply_patch_call_output.
id
string
обязательно
The unique ID of the apply patch tool call output. Populated when this item is returned via API.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
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
обязательно
The type of the item. Always mcp_call.
id
string
обязательно
The unique ID of the tool call.
server_label
string
обязательно
The label of the MCP server running the tool.
name
string
обязательно
The name of the tool that was run.
arguments
string
обязательно
A JSON string of the arguments passed to the tool.
error
object
The error from the tool call, if any.
status
enum
mcp_list_tools
OpenAI.OutputItemMcpListTools
A list of tools available on an MCP server.
type
enum
обязательно
The type of the item. Always mcp_list_tools.
id
string
обязательно
The unique ID of the list.
server_label
string
обязательно
The label of the MCP server.
tools
OpenAI.MCPListToolsTool[]
обязательно
The tools available on the server.
error
protocol_error | tool_execution_error | http_error
protocol_error
OpenAI.RealtimeMCPProtocolError
type
enum
обязательно
tool_execution_error
OpenAI.RealtimeMCPToolExecutionError
type
enum
обязательно
http_error
OpenAI.RealtimeMCPHTTPError
type
enum
обязательно
mcp_approval_request
OpenAI.OutputItemMcpApprovalRequest
A request for human approval of a tool invocation.
type
enum
обязательно
The type of the item. Always mcp_approval_request.
id
string
обязательно
The unique ID of the approval request.
server_label
string
обязательно
The label of the MCP server making the request.
name
string
обязательно
The name of the tool to run.
arguments
string
обязательно
A JSON string of arguments for the tool.
mcp_approval_response
OpenAI.OutputItemMcpApprovalResponseResource
A response to an MCP approval request.
type
enum
обязательно
The type of the item. Always mcp_approval_response.
id
string
обязательно
The unique ID of the approval response
approval_request_id
string
обязательно
The ID of the approval request being answered.
approve
boolean
обязательно
Whether the request was approved.
custom_tool_call
OpenAI.OutputItemCustomToolCallResource
type
enum
обязательно
The type of the custom tool call. Always custom_tool_call.
id
string
The unique ID of the custom tool call in the OpenAI platform.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
namespace
string
The namespace of the custom tool being called.
name
string
обязательно
The name of the custom tool being called.
input
string
обязательно
The input for the custom tool call generated by the model.
async
boolean
Whether the custom tool call runs asynchronously.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
custom_tool_call_output
OpenAI.OutputItemCustomToolCallOutputResource
type
enum
обязательно
The type of the custom tool call output. Always custom_tool_call_output.
id
string
The unique ID of the custom tool call output in the OpenAI platform.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCallerParam
type
enum
обязательно
The caller type. Always direct.
program
OpenAI.ProgramToolCallCallerParam
type
enum
обязательно
The caller type. Always program.
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
output
string | OpenAI.FunctionAndCustomToolCallOutput[]
обязательно
The output from the custom tool call generated by your code. Can be a string or an list of output content.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
type
enum
обязательно
The type of the event. Always response.reasoning_summary_part.added.
item_id
string
обязательно
The ID of the item this summary part is associated with.
part
OpenAI.ResponseReasoningSummaryPartAddedEventPart
обязательно
type
enum
обязательно
type
enum
обязательно
The type of the event. Always response.reasoning_summary_text.delta.
item_id
string
обязательно
The ID of the item this summary text delta is associated with.
delta
string
обязательно
The text delta that was added to the summary.
type
enum
обязательно
The type of the event. Always response.reasoning_text.delta.
item_id
string
обязательно
The ID of the item this reasoning text delta is associated with.
delta
string
обязательно
The text delta that was added to the reasoning content.
type
enum
обязательно
The type of the event. Always response.refusal.delta.
item_id
string
обязательно
The ID of the output item that the refusal text is added to.
delta
string
обязательно
The refusal text that is added.
type
enum
обязательно
The type of the event. Always response.output_text.delta.
item_id
string
обязательно
The ID of the output item that the text delta was added to.
delta
string
обязательно
The text delta that was added.
logprobs
OpenAI.ResponseLogProb[]
обязательно
The log probabilities of the tokens in the delta.
type
enum
обязательно
The type of the event. Always response.web_search_call.in_progress.
item_id
string
обязательно
Unique ID for the output item associated with the web search call.
type
enum
обязательно
The type of the event. Always response.web_search_call.searching.
item_id
string
обязательно
Unique ID for the output item associated with the web search call.
type
enum
обязательно
The type of the event. Always 'response.image_generation_call.generating'.
item_id
string
обязательно
The unique identifier of the image generation item being processed.
type
enum
обязательно
The type of the event. Always 'response.image_generation_call.in_progress'.
item_id
string
обязательно
The unique identifier of the image generation item being processed.
type
enum
обязательно
The type of the event. Always 'response.image_generation_call.partial_image'.
item_id
string
обязательно
The unique identifier of the image generation item being processed.
partial_image_b64
string
обязательно
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
обязательно
The type of the event. Always 'response.mcp_call_arguments.delta'.
item_id
string
обязательно
The unique identifier of the MCP tool call item being processed.
delta
string
обязательно
A JSON string containing the partial update to the arguments for the MCP tool call.
type
enum
обязательно
The type of the event. Always 'response.mcp_call.failed'.
item_id
string
обязательно
The ID of the MCP tool call item that failed.
type
enum
обязательно
The type of the event. Always 'response.mcp_call.in_progress'.
item_id
string
обязательно
The unique identifier of the MCP tool call item being processed.
type
enum
обязательно
The type of the event. Always 'response.mcp_list_tools.failed'.
item_id
string
обязательно
The ID of the MCP tool call item that failed.
type
enum
обязательно
The type of the event. Always 'response.mcp_list_tools.in_progress'.
item_id
string
обязательно
The ID of the MCP tool call item that is being processed.
type
enum
обязательно
The type of the event. Always 'response.output_text.annotation.added'.
item_id
string
обязательно
The unique identifier of the item to which the annotation is being added.
annotation
file_citation | url_citation | container_file_citation | file_path
обязательно
An annotation that applies to a span of output text.
file_citation
OpenAI.FileCitationBody
A citation to a file.
type
enum
обязательно
The type of the file citation. Always file_citation.
file_id
string
обязательно
The ID of the file.
filename
string
обязательно
The filename of the file cited.
url_citation
OpenAI.UrlCitationBody
A citation for a web resource used to generate a model response.
type
enum
обязательно
The type of the URL citation. Always url_citation.
url
string
обязательно
The URL of the web resource.
title
string
обязательно
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
обязательно
The type of the container file citation. Always container_file_citation.
container_id
string
обязательно
The ID of the container file.
file_id
string
обязательно
The ID of the file.
filename
string
обязательно
The filename of the container file cited.
file_path
OpenAI.FilePath
A path to a file.
type
enum
обязательно
The type of the file path. Always file_path.
file_id
string
обязательно
The ID of the file.
type
enum
обязательно
The type of the event. Always 'response.queued'.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The event type identifier.
item_id
string
обязательно
Unique identifier for the API item associated with this event.
delta
string
обязательно
The incremental input data (delta) for the custom tool call.
type
enum
обязательно
The type of the event. Always response.audio.done.
type
enum
обязательно
The type of the event. Always response.audio.transcript.done.
type
enum
обязательно
The type of the event. Always response.code_interpreter_call_code.done.
item_id
string
обязательно
The unique identifier of the code interpreter tool call item.
code
string
обязательно
The final code snippet output by the code interpreter.
type
enum
обязательно
The type of the event. Always response.code_interpreter_call.completed.
item_id
string
обязательно
The unique identifier of the code interpreter tool call item.
type
enum
обязательно
The type of the event. Always response.completed.
response
OpenAI.Response
обязательно
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.
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.
prompt_cache_retention
enum
model
string
The model deployment to use for the creation of this response.
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.
json_schema
OpenAI.TextResponseFormatJsonSchema
JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
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
обязательно
The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.
text
OpenAI.TextResponseFormatConfigurationResponseFormatText
Default response format. Used to generate text responses.
type
enum
обязательно
The type of response format being defined. Always 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
обязательно
The type of response format being defined. Always 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.
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
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.
function
OpenAI.ToolChoiceFunction
Use this option to force the model to call a specific function.
type
enum
обязательно
For function calling, the type is always function.
name
string
обязательно
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
обязательно
For MCP tools, the type is always mcp.
server_label
string
обязательно
The label of the MCP server to use.
allowed_tools
OpenAI.ToolChoiceAllowed
Constrains the tools available to the model to a pre-defined set.
type
enum
обязательно
Allowed tool configuration type. Always allowed_tools.
mode
enum
обязательно
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.
tools
object[]
обязательно
A list of tool definitions that the model should be allowed to call. For the Responses API, the list of tool definitions might look like: 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
обязательно
For custom tool calling, the type is always custom.
name
string
обязательно
The name of the custom tool to call.
programmatic_tool_calling
OpenAI.SpecificProgrammaticToolCallingParam
type
enum
обязательно
The tool to call. Always programmatic_tool_calling.
apply_patch
OpenAI.SpecificApplyPatchParam
Forces the model to call the apply_patch tool when executing a tool call.
type
enum
обязательно
The tool to call. Always apply_patch.
shell
OpenAI.SpecificFunctionShellParam
Forces the model to call the shell tool when a tool call is required.
type
enum
обязательно
The tool to call. Always 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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
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
обязательно
prompt
OpenAI.Prompt
Reference to a prompt template and its variables. Learn more.
id
string
обязательно
The unique identifier of the prompt template to use.
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
type
enum
обязательно
The type of the input item. Always input_text.
text
string
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_image.
detail
enum
обязательно
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
обязательно
The breakpoint mode. Always explicit.
type
enum
обязательно
The type of the input item. Always input_file.
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
обязательно
The breakpoint mode. Always explicit.
file_url
string
The URL of the file to be sent to the model.
detail
enum
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.
truncation
enum
id
string
обязательно
Unique identifier for this Response.
object
enum
обязательно
The object type of this resource - always set to response.
status
enum
The status of the response generation. One of completed, failed, in_progress, cancelled, queued, or incomplete.
access_programs
OpenAI.AccessProgramsBody | null
обязательно
cyber
enum
обязательно
created_at
integer
обязательно
Unix timestamp (in seconds) of when this Response was created.
error
OpenAI.ResponseError | null
обязательно
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
обязательно
The error code for the response.
message
string
обязательно
A human-readable description of the error.
misalignment
OpenAI.MisalignmentErrorDetailsResource
error_type
string | enum
enum
detailed_explanation
string
The public explanation for this block.
steer
OpenAI._MisalignmentSteer
message
string
обязательно
The public continuation instruction.
incomplete_details
OpenAI.ResponseIncompleteDetails | null
обязательно
reason
enum
output
OpenAI.OutputItem[]
обязательно
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
enum
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.
enum
summary
enum
context
enum
generate_summary
enum
instructions
string | OpenAI.InputItem[] | 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_details
OpenAI.ResponseUsageInputTokensDetails
обязательно
output_tokens_details
OpenAI.ResponseUsageOutputTokensDetails
обязательно
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
обязательно
mode
enum
обязательно
prompt_cache_diagnostics
cache_miss | cache_hit | comparison_response_not_found | unavailable
Prompt cache diagnostics requested for this response.
cache_miss
OpenAI.PromptCacheMissDiagnosticsBody
type
enum
обязательно
reason
enum
обязательно
cache_hit
OpenAI.PromptCacheHitDiagnosticsBody
type
enum
обязательно
comparison_response_not_found
OpenAI.PromptCacheComparisonResponseNotFoundDiagnosticsBody
type
enum
обязательно
unavailable
OpenAI.PromptCacheUnavailableDiagnosticsBody
type
enum
обязательно
moderation
OpenAI.Moderation | null
Moderation results or errors for the response input and output.
input
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
output
error | moderation_result
обязательно
Moderation results or an error for a response moderation check.
error
OpenAI.ModerationErrorBody
An error produced while attempting moderation for the response input or output.
type
enum
обязательно
The object type, which was always error for moderation failures.
code
string
обязательно
The error code.
message
string
обязательно
The error message.
moderation_result
OpenAI.ModerationResultBody
A moderation result produced for the response input or output.
type
enum
обязательно
The object type, which was always moderation_result for successful moderation results.
model
string
обязательно
The moderation model that produced this result.
flagged
boolean
обязательно
A boolean indicating whether the content was flagged by any category.
categories
object
обязательно
A dictionary of moderation categories to booleans, True if the input is flagged under this category.
category_scores
object
обязательно
A dictionary of moderation categories to scores.
category_applied_input_types
object
обязательно
Which modalities of input are reflected by the score for each category.
parallel_tool_calls
boolean
обязательно
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
обязательно
The unique ID of the conversation that this response was associated with.
agent_reference
AgentReference | null
обязательно
The agent used for this response
type
enum
обязательно
name
string
обязательно
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
обязательно
Routing decision metadata from Model Router.
mode
string | enum
обязательно
The routing mode used by Model Router for the request.
enum
session_affinity
SessionAffinityDetails
Effective Model Router session affinity metadata for a request.
mode
string | enum
обязательно
Effective modes reported for Model Router session affinity.
enum
source
string | enum
Conversation identifier sources supported by Model Router session affinity.
enum
decision
string | enum
Final outcomes reported for Model Router session affinity.
enum
routing_trace
RoutingTraceEntry[]
обязательно
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
обязательно
The type of the event. Always response.content_part.done.
item_id
string
обязательно
The ID of the output item that the content part was added to.
part
output_text | refusal | reasoning_text
обязательно
output_text
OpenAI.OutputContentOutputTextContent
A text output from the model.
type
enum
обязательно
The type of the output text. Always output_text.
text
string
обязательно
The text output from the model.
annotations
OpenAI.Annotation[]
The annotations of the text output.
refusal
OpenAI.OutputContentRefusalContent
A refusal from the model.
type
enum
обязательно
The type of the refusal. Always refusal.
refusal
string
обязательно
The refusal explanation from the model.
reasoning_text
OpenAI.OutputContentReasoningTextContent
Reasoning text from the model.
type
enum
обязательно
The type of the reasoning text. Always reasoning_text.
text
string
обязательно
The reasoning text from the model.
type
enum
обязательно
The type of the event. Always response.file_search_call.completed.
item_id
string
обязательно
The ID of the output item that the file search call is initiated.
type
enum
обязательно
item_id
string
обязательно
The ID of the item.
arguments
string
обязательно
The function-call arguments.
type
enum
обязательно
The type of the event. Always response.output_item.done.
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
обязательно
structured_outputs
StructuredOutputsOutputItem
type
enum
обязательно
output
StructuredOutputsOutputItem
обязательно
The structured output captured during the response.
workflow_action
WorkflowActionOutputItem
type
enum
обязательно
kind
string
обязательно
The kind of CSDL action (e.g., 'SetVariable', 'InvokeAzureAgent').
action_id
string
обязательно
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
обязательно
Status of the action (e.g., 'in_progress', 'completed', 'failed', 'cancelled').
oauth_consent_request
OAuthConsentRequestOutputItem
Request from the service for the user to perform OAuth consent.
type
enum
обязательно
consent_link
string
обязательно
The link the user can use to perform OAuth consent.
server_label
string
обязательно
The server label for the OAuth consent request.
bing_grounding_call
BingGroundingToolCall
A Bing grounding tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
bing_grounding_call_output
BingGroundingToolCallOutput
The output of a Bing grounding tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
sharepoint_grounding_preview_call
SharepointGroundingToolCall
A SharePoint grounding tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
sharepoint_grounding_preview_call_output
SharepointGroundingToolCallOutput
The output of a SharePoint grounding tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
azure_ai_search_call
AzureAISearchToolCall
An Azure AI Search tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
azure_ai_search_call_output
AzureAISearchToolCallOutput
The output of an Azure AI Search tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
bing_custom_search_preview_call
BingCustomSearchToolCall
A Bing custom search tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
bing_custom_search_preview_call_output
BingCustomSearchToolCallOutput
The output of a Bing custom search tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
openapi_call
OpenApiToolCall
An OpenAPI tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the OpenAPI operation being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
openapi_call_output
OpenApiToolCallOutput
The output of an OpenAPI tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
browser_automation_preview_call
BrowserAutomationToolCall
A browser automation tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
browser_automation_preview_call_output
BrowserAutomationToolCallOutput
The output of a browser automation tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
fabric_dataagent_preview_call
FabricDataAgentToolCall
A Fabric data agent tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
fabric_dataagent_preview_call_output
FabricDataAgentToolCallOutput
The output of a Fabric data agent tool call.
type
enum
обязательно
call_id
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
azure_function_call
AzureFunctionToolCall
An Azure Function tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the Azure Function being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
azure_function_call_output
AzureFunctionToolCallOutput
The output of an Azure Function tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
a2a_preview_call
A2AToolCall
An A2A (Agent-to-Agent) tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
The name of the A2A agent card being called.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool.
status
enum
обязательно
The status of a tool call.
a2a_preview_call_output
A2AToolCallOutput
The output of an A2A (Agent-to-Agent) tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
name
string
обязательно
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.
status
enum
обязательно
The status of a tool call.
memory_search_call
MemorySearchToolCall
A memory search tool call.
type
enum
обязательно
status
enum
обязательно
The status of a tool call.
memories
MemoryItem[] | null
The results returned from the memory search.
memory_command_preview_call
MemoryCommandToolCall
A memory command tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
arguments
string
обязательно
A JSON string of the arguments to pass to the tool, including action (remember or forget) and content.
status
enum
обязательно
The status of a tool call.
memory_command_preview_call_output
MemoryCommandToolCallOutput
The output of a memory command tool call.
type
enum
обязательно
call_id
string
обязательно
The unique ID of the tool call generated by the model.
status
enum
обязательно
The status of a tool call.
output_message
OpenAI.OutputItemOutputMessage
An output message from the model.
id
string
обязательно
The unique ID of the output message.
type
enum
обязательно
The type of the output message. Always message.
role
enum
обязательно
The role of the output message. Always assistant.
content
OpenAI.OutputMessageContent[]
обязательно
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.
status
enum
обязательно
The status of the message input. One of in_progress, completed, or incomplete. Populated when input items are returned via API.
file_search_call
OpenAI.OutputItemFileSearchToolCall
The results of a file search tool call. See the file search guide for more information.
id
string
обязательно
The unique ID of the file search tool call.
type
enum
обязательно
The type of the file search tool call. Always file_search_call.
status
enum
обязательно
The status of the file search tool call. One of in_progress, searching, incomplete or failed,
queries
string[]
обязательно
The queries used to search for files.
function_call
OpenAI.OutputItemFunctionToolCall
A tool call to run a function. See the function calling guide for more information.
id
string
обязательно
The unique ID of the function tool call.
type
enum
обязательно
The type of the function tool call. Always function_call.
call_id
string
обязательно
The unique ID of the function tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
namespace
string
The namespace of the function to run.
name
string
обязательно
The name of the function to run.
arguments
string
обязательно
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.
async
boolean
Whether the function tool call runs asynchronously.
function_call_output
OpenAI.OutputItemFunctionToolCallOutput
The output of a function tool call.
id
string
обязательно
The unique ID of the function tool call output. Populated when this item is returned via API.
type
enum
обязательно
The type of the function tool call output. Always 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.
direct
OpenAI.DirectToolCallCallerParam
type
enum
обязательно
The caller type. Always direct.
program
OpenAI.ProgramToolCallCallerParam
type
enum
обязательно
The caller type. Always program.
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
output
string | OpenAI.FunctionAndCustomToolCallOutput[]
обязательно
The output from the function call generated by your code. Can be a string or an list of output content.
status
enum
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
web_search_call
OpenAI.OutputItemWebSearchToolCall
The results of a web search tool call. See the web search guide for more information.
id
string
обязательно
The unique ID of the web search tool call.
type
enum
обязательно
The type of the web search tool call. Always web_search_call.
status
enum
обязательно
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).
type
enum
обязательно
The action type.
query
string
The search query.
queries
string[]
The search queries.
sources
OpenAI.WebSearchActionSearchSources[]
The sources used in the search.
type
enum
обязательно
The action type.
url
string | null
The URL opened by the model.
type
enum
обязательно
The action type.
url
string | null
The URL of the page searched for the pattern, when available.
pattern
string
обязательно
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
обязательно
The type of the computer call. Always computer_call.
id
string
обязательно
The unique ID of the computer call.
call_id
string
обязательно
An identifier used when responding to the tool call with output.
action
click | double_click | drag | keypress | move | screenshot | scroll | type | wait
click
OpenAI.ClickParam
A click action.
type
enum
обязательно
Specifies the event type. For a click action, this property is always click.
button
enum
обязательно
double_click
OpenAI.DoubleClickAction
A double click action.
type
enum
обязательно
Specifies the event type. For a double click action, this property is always set to double_click.
drag
OpenAI.DragParam
A drag action.
type
enum
обязательно
Specifies the event type. For a drag action, this property is always set to drag.
path
OpenAI.CoordParam[]
обязательно
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 } ]
keypress
OpenAI.KeyPressAction
A collection of keypresses the model would like to perform.
type
enum
обязательно
Specifies the event type. For a keypress action, this property is always set to keypress.
keys
string[]
обязательно
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
обязательно
Specifies the event type. For a move action, this property is always set to move.
screenshot
OpenAI.ScreenshotParam
A screenshot action.
type
enum
обязательно
Specifies the event type. For a screenshot action, this property is always set to screenshot.
scroll
OpenAI.ScrollParam
A scroll action.
type
enum
обязательно
Specifies the event type. For a scroll action, this property is always set to scroll.
type
OpenAI.TypeParam
An action to type in text.
type
enum
обязательно
Specifies the event type. For a type action, this property is always set to type.
text
string
обязательно
The text to type.
wait
OpenAI.WaitParam
A wait action.
type
enum
обязательно
Specifies the event type. For a wait action, this property is always set to 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[]
обязательно
The pending safety checks for the computer call.
status
enum
обязательно
The status of the item. One of in_progress, completed, or incomplete. Populated when items are returned via API.
computer_call_output
OpenAI.OutputItemComputerToolCallOutput
The output of a computer tool call.
type
enum
обязательно
The type of the computer tool call output. Always computer_call_output.
id
string
обязательно
The ID of the computer tool call output.
call_id
string
обязательно
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
обязательно
A computer screenshot image used with the computer use tool.
type
enum
обязательно
Specifies the event type. For a computer screenshot, this property is always set to 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.
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
обязательно
The type of the object. Always reasoning.
id
string
обязательно
The unique identifier of the reasoning content.
summary
OpenAI.SummaryTextContent[]
обязательно
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.
program
OpenAI.OutputItemProgram
type
enum
обязательно
The type of the item. Always program.
id
string
обязательно
The unique ID of the program item.
call_id
string
обязательно
The stable call ID of the program item.
code
string
обязательно
The JavaScript source executed by programmatic tool calling.
fingerprint
string
обязательно
Opaque program replay fingerprint that must be round-tripped.
program_output
OpenAI.OutputItemProgramOutput
type
enum
обязательно
The type of the item. Always program_output.
id
string
обязательно
The unique ID of the program output item.
call_id
string
обязательно
The call ID of the program item.
result
string
обязательно
The result produced by the program item.
status
enum
обязательно
tool_search_call
OpenAI.OutputItemToolSearchCall
type
enum
обязательно
The type of the item. Always tool_search_call.
id
string
обязательно
The unique ID of the tool search call item.
execution
enum
обязательно
arguments
OpenAI.OutputItemToolSearchCall
обязательно
Arguments used for the tool search call.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
tool_search_output
OpenAI.OutputItemToolSearchOutput
type
enum
обязательно
The type of the item. Always tool_search_output.
id
string
обязательно
The unique ID of the tool search output item.
execution
enum
обязательно
tools
OpenAI.Tool[]
обязательно
The loaded tool definitions returned by tool search.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
additional_tools
OpenAI.OutputItemAdditionalTools
type
enum
обязательно
The type of the item. Always additional_tools.
id
string
обязательно
The unique ID of the additional tools item.
role
enum
обязательно
tools
OpenAI.Tool[]
обязательно
The additional tool definitions made available at this item.
compaction
OpenAI.OutputItemCompactionBody
A compaction item generated by the v1/responses/compact API.
type
enum
обязательно
The type of the item. Always compaction.
id
string
обязательно
The unique ID of the compaction item.
encrypted_content
string
обязательно
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
обязательно
The type of the image generation call. Always image_generation_call.
id
string
обязательно
The unique ID of the image generation call.
status
enum
обязательно
The status of the image generation call.
error
OpenAI.ImageGenToolCallError
type
string
обязательно
The error type.
message
string
обязательно
A description of the error.
moderation_details
OpenAI.ImageGenToolCallModerationDetails
moderation_stage
enum
обязательно
The stage where moderation blocked the image generation call.
categories
string[]
обязательно
Public moderation categories. New category values may be added over time.
size
string | enum | null
enum
quality
enum
action
enum
background
enum
output_format
enum
code_interpreter_call
OpenAI.OutputItemCodeInterpreterToolCall
A tool call to run code.
type
enum
обязательно
The type of the code interpreter tool call. Always code_interpreter_call.
id
string
обязательно
The unique ID of the code interpreter tool call.
status
enum
обязательно
The status of the code interpreter tool call. Valid values are in_progress, completed, incomplete, interpreting, and failed.
container_id
string
обязательно
The ID of the container used to run the code.
local_shell_call
OpenAI.OutputItemLocalShellToolCall
A tool call to run a command on the local shell.
type
enum
обязательно
The type of the local shell call. Always local_shell_call.
id
string
обязательно
The unique ID of the local shell call.
call_id
string
обязательно
The unique ID of the local shell tool call generated by the model.
action
OpenAI.LocalShellExecAction
обязательно
Execute a shell command on the server.
type
enum
обязательно
The type of the local shell action. Always exec.
command
string[]
обязательно
The command to run.
env
object
обязательно
Environment variables to set for the command.
status
enum
обязательно
The status of the local shell call.
local_shell_call_output
OpenAI.OutputItemLocalShellToolCallOutput
The output of a local shell tool call.
type
enum
обязательно
The type of the local shell tool call output. Always local_shell_call_output.
id
string
обязательно
The unique ID of the local shell tool call generated by the model.
output
string
обязательно
A JSON string of the output of the local shell tool call.
status
enum
shell_call
OpenAI.OutputItemFunctionShellCall
A tool call that executes one or more shell commands in a managed environment.
type
enum
обязательно
The type of the item. Always shell_call.
id
string
обязательно
The unique ID of the shell tool call. Populated when this item is returned via API.
call_id
string
обязательно
The unique ID of the shell tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
action
OpenAI.FunctionShellAction
обязательно
Execute a shell command.
status
enum
обязательно
environment
local | container_reference | null
обязательно
local
OpenAI.LocalEnvironmentResource
Represents the use of a local environment to perform shell actions.
type
enum
обязательно
The environment type. Always local.
container_reference
OpenAI.ContainerReferenceResource
Represents a container created with /v1/containers.
type
enum
обязательно
The environment type. Always container_reference.
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
обязательно
The type of the shell call output. Always shell_call_output.
id
string
обязательно
The unique ID of the shell call output. Populated when this item is returned via API.
call_id
string
обязательно
The unique ID of the shell tool call generated by the model.
caller
direct | program | null
The execution context that produced this tool call.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
output
OpenAI.FunctionShellCallOutputContent[]
обязательно
An array of shell call output contents
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
обязательно
The type of the item. Always apply_patch_call.
id
string
обязательно
The unique ID of the apply patch tool call. Populated when this item is returned via API.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
operation
create_file | delete_file | update_file
обязательно
One of the create_file, delete_file, or update_file operations applied via apply_patch.
create_file
OpenAI.ApplyPatchCreateFileOperation
Instruction describing how to create a file via the apply_patch tool.
type
enum
обязательно
Create a new file with the provided diff.
path
string
обязательно
Path of the file to create.
diff
string
обязательно
Diff to apply.
delete_file
OpenAI.ApplyPatchDeleteFileOperation
Instruction describing how to delete a file via the apply_patch tool.
type
enum
обязательно
Delete the specified file.
path
string
обязательно
Path of the file to delete.
update_file
OpenAI.ApplyPatchUpdateFileOperation
Instruction describing how to update a file via the apply_patch tool.
type
enum
обязательно
Update an existing file with the provided diff.
path
string
обязательно
Path of the file to update.
diff
string
обязательно
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
обязательно
The type of the item. Always apply_patch_call_output.
id
string
обязательно
The unique ID of the apply patch tool call output. Populated when this item is returned via API.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
status
enum
обязательно
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
обязательно
The type of the item. Always mcp_call.
id
string
обязательно
The unique ID of the tool call.
server_label
string
обязательно
The label of the MCP server running the tool.
name
string
обязательно
The name of the tool that was run.
arguments
string
обязательно
A JSON string of the arguments passed to the tool.
error
object
The error from the tool call, if any.
status
enum
mcp_list_tools
OpenAI.OutputItemMcpListTools
A list of tools available on an MCP server.
type
enum
обязательно
The type of the item. Always mcp_list_tools.
id
string
обязательно
The unique ID of the list.
server_label
string
обязательно
The label of the MCP server.
tools
OpenAI.MCPListToolsTool[]
обязательно
The tools available on the server.
error
protocol_error | tool_execution_error | http_error
protocol_error
OpenAI.RealtimeMCPProtocolError
type
enum
обязательно
tool_execution_error
OpenAI.RealtimeMCPToolExecutionError
type
enum
обязательно
http_error
OpenAI.RealtimeMCPHTTPError
type
enum
обязательно
mcp_approval_request
OpenAI.OutputItemMcpApprovalRequest
A request for human approval of a tool invocation.
type
enum
обязательно
The type of the item. Always mcp_approval_request.
id
string
обязательно
The unique ID of the approval request.
server_label
string
обязательно
The label of the MCP server making the request.
name
string
обязательно
The name of the tool to run.
arguments
string
обязательно
A JSON string of arguments for the tool.
mcp_approval_response
OpenAI.OutputItemMcpApprovalResponseResource
A response to an MCP approval request.
type
enum
обязательно
The type of the item. Always mcp_approval_response.
id
string
обязательно
The unique ID of the approval response
approval_request_id
string
обязательно
The ID of the approval request being answered.
approve
boolean
обязательно
Whether the request was approved.
custom_tool_call
OpenAI.OutputItemCustomToolCallResource
type
enum
обязательно
The type of the custom tool call. Always custom_tool_call.
id
string
The unique ID of the custom tool call in the OpenAI platform.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCaller
type
enum
обязательно
program
OpenAI.ProgramToolCallCaller
type
enum
обязательно
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
namespace
string
The namespace of the custom tool being called.
name
string
обязательно
The name of the custom tool being called.
input
string
обязательно
The input for the custom tool call generated by the model.
async
boolean
Whether the custom tool call runs asynchronously.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
custom_tool_call_output
OpenAI.OutputItemCustomToolCallOutputResource
type
enum
обязательно
The type of the custom tool call output. Always custom_tool_call_output.
id
string
The unique ID of the custom tool call output in the OpenAI platform.
call_id
string
обязательно
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.
direct
OpenAI.DirectToolCallCallerParam
type
enum
обязательно
The caller type. Always direct.
program
OpenAI.ProgramToolCallCallerParam
type
enum
обязательно
The caller type. Always program.
caller_id
string
обязательно
The call ID of the program item that produced this tool call.
output
string | OpenAI.FunctionAndCustomToolCallOutput[]
обязательно
The output from the custom tool call generated by your code. Can be a string or an list of output content.
status
enum
обязательно
created_by
string
The identifier of the actor that created the item.
type
enum
обязательно
The type of the event. Always response.reasoning_summary_part.done.
item_id
string
обязательно
The ID of the item this summary part is associated with.
status
enum
The completion status of the summary part. Omitted when the part completed normally and set to incomplete when generation was interrupted.
part
OpenAI.ResponseReasoningSummaryPartDoneEventPart
обязательно
type
enum
обязательно
type
enum
обязательно
The type of the event. Always response.reasoning_summary_text.done.
item_id
string
обязательно
The ID of the item this summary text is associated with.
text
string
обязательно
The full text of the completed reasoning summary.
type
enum
обязательно
The type of the event. Always response.reasoning_text.done.
item_id
string
обязательно
The ID of the item this reasoning text is associated with.
text
string
обязательно
The full text of the completed reasoning content.
type
enum
обязательно
The type of the event. Always response.refusal.done.
item_id
string
обязательно
The ID of the output item that the refusal text is finalized.
refusal
string
обязательно
The refusal text that is finalized.
type
enum
обязательно
The type of the event. Always response.output_text.done.
item_id
string
обязательно
The ID of the output item that the text content is finalized.
text
string
обязательно
The text content that is finalized.
logprobs
OpenAI.ResponseLogProb[]
обязательно
The log probabilities of the tokens in the delta.
type
enum
обязательно
The type of the event. Always response.web_search_call.completed.
item_id
string
обязательно
Unique ID for the output item associated with the web search call.
type
enum
обязательно
The type of the event. Always 'response.image_generation_call.completed'.
item_id
string
обязательно
The unique identifier of the image generation item being processed.
type
enum
обязательно
The type of the event. Always 'response.mcp_call_arguments.done'.
item_id
string
обязательно
The unique identifier of the MCP tool call item being processed.
arguments
string
обязательно
A JSON string containing the finalized arguments for the MCP tool call.
type
enum
обязательно
The type of the event. Always 'response.mcp_call.completed'.
item_id
string
обязательно
The ID of the MCP tool call item that completed.
type
enum
обязательно
The type of the event. Always 'response.mcp_list_tools.completed'.
item_id
string
обязательно
The ID of the MCP tool call item that produced this output.
type
enum
обязательно
The event type identifier.
item_id
string
обязательно
Unique identifier for the API item associated with this event.
input
string
обязательно
The complete input data for the custom tool call.
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"input": "Tell me a three sentence bedtime story about a unicorn."
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
input: "Tell me a three sentence bedtime story about a unicorn."
});
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.create():
print(response)
using System;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
OpenAIResponse response = client.CreateResponse("Tell me a three sentence bedtime story about a unicorn.");
Console.WriteLine(response.GetOutputText());
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ccd2bed1ec8190b14f964abc0542670bb6a6b452d3795b",
"object": "response",
"created_at": 1741476542,
"status": "completed",
"completed_at": 1741476543,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "gpt-5.4",
"output": [
{
"type": "message",
"id": "msg_67ccd2bf17f0819081ff3bb2cf6508e60bb6a6b452d3795b",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "In a peaceful grove beneath a silver moon, a unicorn named Lumina discovered a hidden pool that reflected the stars. As she dipped her horn into the water, the pool began to shimmer, revealing a pathway to a magical realm of endless night skies. Filled with wonder, Lumina whispered a wish for all who dream to find their own hidden magic, and as she glanced back, her hoofprints sparkled like stardust.",
"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": 36,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 87,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 123
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": [
{"type": "input_text", "text": "what is in this image?"},
{
"type": "input_image",
"image_url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"
}
]
}
]
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
input: [
{
role: "user",
content: [
{ type: "input_text", text: "what is in this image?" },
{
type: "input_image",
image_url:
"https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg",
},
],
},
],
});
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.create():
print(response)
using System;
using System.Collections.Generic;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
List<ResponseItem> inputItems =
[
ResponseItem.CreateUserMessageItem(
[
ResponseContentPart.CreateInputTextPart("What is in this image?"),
ResponseContentPart.CreateInputImagePart(new Uri("https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg"))
]
)
];
OpenAIResponse response = client.CreateResponse(inputItems);
Console.WriteLine(response.GetOutputText());
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ccd3a9da748190baa7f1570fe91ac604becb25c45c1d41",
"object": "response",
"created_at": 1741476777,
"status": "completed",
"completed_at": 1741476778,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "gpt-5.4",
"output": [
{
"type": "message",
"id": "msg_67ccd3acc8d48190a77525dc6de64b4104becb25c45c1d41",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The image depicts a scenic landscape with a wooden boardwalk or pathway leading through lush, green grass under a blue sky with some clouds. The setting suggests a peaceful natural area, possibly a park or nature reserve. There are trees and shrubs in the background.",
"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": 328,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 52,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 380
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"input": [
{
"role": "user",
"content": [
{"type": "input_text", "text": "what is in this file?"},
{
"type": "input_file",
"file_url": "https://www.berkshirehathaway.com/letters/2024ltr.pdf"
}
]
}
]
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
input: [
{
role: "user",
content: [
{ type: "input_text", text: "what is in this file?" },
{
type: "input_file",
file_url: "https://www.berkshirehathaway.com/letters/2024ltr.pdf",
},
],
},
],
});
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.create():
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_686eef60237881a2bd1180bb8b13de430e34c516d176ff86",
"object": "response",
"created_at": 1752100704,
"status": "completed",
"completed_at": 1752100705,
"background": false,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"max_tool_calls": null,
"model": "gpt-5.4",
"output": [
{
"id": "msg_686eef60d3e081a29283bdcbc4322fd90e34c516d176ff86",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"annotations": [],
"logprobs": [],
"text": "The file seems to contain excerpts from a letter to the shareholders of Berkshire Hathaway Inc., likely written by Warren Buffett. It covers several topics:
1. **Communication Philosophy**: Buffett emphasizes the importance of transparency and candidness in reporting mistakes and successes to shareholders.
2. **Mistakes and Learnings**: The letter acknowledges past mistakes in business assessments and management hires, highlighting the importance of correcting errors promptly.
3. **CEO Succession**: Mention of Greg Abel stepping in as the new CEO and continuing the tradition of honest communication.
4. **Pete Liegl Story**: A detailed account of acquiring Forest River and the relationship with its founder, highlighting trust and effective business decisions.
5. **2024 Performance**: Overview of business performance, particularly in insurance and investment activities, with a focus on GEICO's improvement.
6. **Tax Contributions**: Discussion of significant tax payments to the U.S. Treasury, credited to shareholders' reinvestments.
7. **Investment Strategy**: A breakdown of Berkshire\u2019s investments in both controlled subsidiaries and marketable equities, along with a focus on long-term holding strategies.
8. **American Capitalism**: Reflections on America\u2019s economic development and Berkshire\u2019s role within it.
9. **Property-Casualty Insurance**: Insights into the P/C insurance business model and its challenges and benefits.
10. **Japanese Investments**: Information about Berkshire\u2019s investments in Japanese companies and future plans.
11. **Annual Meeting**: Details about the upcoming annual gathering in Omaha, including schedule changes and new book releases.
12. **Personal Anecdotes**: Light-hearted stories about family and interactions, conveying Buffett's personable approach.
13. **Financial Performance Data**: Tables comparing Berkshire\u2019s annual performance to the S&P 500, showing impressive long-term gains.
Overall, the letter reinforces Berkshire Hathaway's commitment to transparency, investment in both its businesses and the wider economy, and emphasizes strong leadership and prudent financial management."
}
],
"role": "assistant"
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": null,
"summary": null
},
"service_tier": "default",
"store": true,
"temperature": 1.0,
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "auto",
"tools": [],
"top_logprobs": 0,
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 8438,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 398,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 8836
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"tools": [{ "type": "web_search_preview" }],
"input": "What was a positive news story from today?"
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
tools: [{ type: "web_search_preview" }],
input: "What was a positive news story from today?",
});
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.create():
print(response)
using System;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
string userInputText = "What was a positive news story from today?";
ResponseCreationOptions options = new()
{
Tools =
{
ResponseTool.CreateWebSearchTool()
},
};
OpenAIResponse response = client.CreateResponse(userInputText, options);
Console.WriteLine(response.GetOutputText());
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ccf18ef5fc8190b16dbee19bc54e5f087bb177ab789d5c",
"object": "response",
"created_at": 1741484430,
"status": "completed",
"completed_at": 1741484431,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "gpt-5.4",
"output": [
{
"type": "web_search_call",
"id": "ws_67ccf18f64008190a39b619f4c8455ef087bb177ab789d5c",
"status": "completed"
},
{
"type": "message",
"id": "msg_67ccf190ca3881909d433c50b1f6357e087bb177ab789d5c",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "As of today, March 9, 2025, one notable positive news story...",
"annotations": [
{
"type": "url_citation",
"start_index": 442,
"end_index": 557,
"url": "https://.../?utm_source=chatgpt.com",
"title": "..."
},
{
"type": "url_citation",
"start_index": 962,
"end_index": 1077,
"url": "https://.../?utm_source=chatgpt.com",
"title": "..."
},
{
"type": "url_citation",
"start_index": 1336,
"end_index": 1451,
"url": "https://.../?utm_source=chatgpt.com",
"title": "..."
}
]
}
]
}
],
"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": [
{
"type": "web_search_preview",
"domains": [],
"search_context_size": "medium",
"user_location": {
"type": "approximate",
"city": null,
"country": "US",
"region": null,
"timezone": null
}
}
],
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 328,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 356,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 684
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"tools": [{
"type": "file_search",
"vector_store_ids": ["vs_1234567890"],
"max_num_results": 20
}],
"input": "What are the attributes of an ancient brown dragon?"
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
tools: [{
type: "file_search",
vector_store_ids: ["vs_1234567890"],
max_num_results: 20
}],
input: "What are the attributes of an ancient brown dragon?",
});
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.create():
print(response)
using System;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
string userInputText = "What are the attributes of an ancient brown dragon?";
ResponseCreationOptions options = new()
{
Tools =
{
ResponseTool.CreateFileSearchTool(
vectorStoreIds: ["vs_1234567890"],
maxResultCount: 20
)
},
};
OpenAIResponse response = client.CreateResponse(userInputText, options);
Console.WriteLine(response.GetOutputText());
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ccf4c55fc48190b71bd0463ad3306d09504fb6872380d7",
"object": "response",
"created_at": 1741485253,
"status": "completed",
"completed_at": 1741485254,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "gpt-5.4",
"output": [
{
"type": "file_search_call",
"id": "fs_67ccf4c63cd08190887ef6464ba5681609504fb6872380d7",
"status": "completed",
"queries": [
"attributes of an ancient brown dragon"
],
"results": null
},
{
"type": "message",
"id": "msg_67ccf4c93e5c81909d595b369351a9d309504fb6872380d7",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The attributes of an ancient brown dragon include...",
"annotations": [
{
"type": "file_citation",
"index": 320,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 576,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 815,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 815,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 1030,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 1030,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 1156,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
},
{
"type": "file_citation",
"index": 1225,
"file_id": "file-4wDz5b167pAf72nx1h9eiN",
"filename": "dragons.pdf"
}
]
}
]
}
],
"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": [
{
"type": "file_search",
"filters": null,
"max_num_results": 20,
"ranking_options": {
"ranker": "auto",
"score_threshold": 0.0
},
"vector_store_ids": [
"vs_1234567890"
]
}
],
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 18307,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 348,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 18655
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"instructions": "You are a helpful assistant.",
"input": "Hello!",
"stream": true
}'
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.create():
print(response)
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "gpt-5.4",
instructions: "You are a helpful assistant.",
input: "Hello!",
stream: true,
});
for await (const event of response) {
console.log(event);
}
using System;
using System.ClientModel;
using System.Threading.Tasks;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
string userInputText = "Hello!";
ResponseCreationOptions options = new()
{
Instructions = "You are a helpful assistant.",
};
AsyncCollectionResult<StreamingResponseUpdate> responseUpdates = client.CreateResponseStreamingAsync(userInputText, options);
await foreach (StreamingResponseUpdate responseUpdate in responseUpdates)
{
if (responseUpdate is StreamingResponseOutputTextDeltaUpdate outputTextDeltaUpdate)
{
Console.Write(outputTextDeltaUpdate.Delta);
}
}
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
event: response.created
data: {"type":"response.created","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-5.4","output":[],"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":null,"user":null,"metadata":{}}}
event: response.in_progress
data: {"type":"response.in_progress","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"in_progress","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-5.4","output":[],"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":null,"user":null,"metadata":{}}}
event: response.output_item.added
data: {"type":"response.output_item.added","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"in_progress","role":"assistant","content":[]}}
event: response.content_part.added
data: {"type":"response.content_part.added","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"part":{"type":"output_text","text":"","annotations":[]}}
event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"delta":"Hi"}
...
event: response.output_text.done
data: {"type":"response.output_text.done","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"text":"Hi there! How can I assist you today?"}
event: response.content_part.done
data: {"type":"response.content_part.done","item_id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","output_index":0,"content_index":0,"part":{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}}
event: response.output_item.done
data: {"type":"response.output_item.done","output_index":0,"item":{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","annotations":[]}]}}
event: response.completed
data: {"type":"response.completed","response":{"id":"resp_67c9fdcecf488190bdd9a0409de3a1ec07b8b0ad4e5eb654","object":"response","created_at":1741290958,"status":"completed","error":null,"incomplete_details":null,"instructions":"You are a helpful assistant.","max_output_tokens":null,"model":"gpt-5.4","output":[{"id":"msg_67c9fdcf37fc8190ba82116e33fb28c507b8b0ad4e5eb654","type":"message","status":"completed","role":"assistant","content":[{"type":"output_text","text":"Hi there! How can I assist you today?","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":37,"output_tokens":11,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":48},"user":null,"metadata":{}}}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "gpt-5.4",
"input": "What is the weather like in Boston today?",
"tools": [
{
"type": "function",
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": ["celsius", "fahrenheit"]
}
},
"required": ["location", "unit"]
}
}
],
"tool_choice": "auto"
}'
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.create():
print(response)
import OpenAI from "openai";
const openai = new OpenAI();
const tools = [
{
type: "function",
name: "get_current_weather",
description: "Get the current weather in a given location",
parameters: {
type: "object",
properties: {
location: {
type: "string",
description: "The city and state, e.g. San Francisco, CA",
},
unit: { type: "string", enum: ["celsius", "fahrenheit"] },
},
required: ["location", "unit"],
},
},
];
const response = await openai.responses.create({
model: "gpt-5.4",
tools: tools,
input: "What is the weather like in Boston today?",
tool_choice: "auto",
});
console.log(response);
using System;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "gpt-5.4",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
ResponseTool getCurrentWeatherFunctionTool = ResponseTool.CreateFunctionTool(
functionName: "get_current_weather",
functionDescription: "Get the current weather in a given location",
functionParameters: BinaryData.FromString("""
{
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
},
"required": ["location", "unit"]
}
"""
)
);
string userInputText = "What is the weather like in Boston today?";
ResponseCreationOptions options = new()
{
Tools =
{
getCurrentWeatherFunctionTool
},
ToolChoice = ResponseToolChoice.CreateAutoChoice(),
};
OpenAIResponse response = client.CreateResponse(userInputText, options);
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ca09c5efe0819096d0511c92b8c890096610f474011cc0",
"object": "response",
"created_at": 1741294021,
"status": "completed",
"completed_at": 1741294022,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "gpt-5.4",
"output": [
{
"type": "function_call",
"id": "fc_67ca09c6bedc8190a7abfec07b1a1332096610f474011cc0",
"call_id": "call_unLAR8MvFNptuiZK6K6HCy5k",
"name": "get_current_weather",
"arguments": "{"location":"Boston, MA","unit":"celsius"}",
"status": "completed"
}
],
"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": [
{
"type": "function",
"description": "Get the current weather in a given location",
"name": "get_current_weather",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
]
}
},
"required": [
"location",
"unit"
]
},
"strict": true
}
],
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 291,
"output_tokens": 23,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 314
},
"user": null,
"metadata": {}
}
Запрос
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "o3-mini",
"input": "How much wood would a woodchuck chuck?",
"reasoning": {
"effort": "high"
}
}'
import OpenAI from "openai";
const openai = new OpenAI();
const response = await openai.responses.create({
model: "o3-mini",
input: "How much wood would a woodchuck chuck?",
reasoning: {
effort: "high"
}
});
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.create():
print(response)
using System;
using OpenAI.Responses;
OpenAIResponseClient client = new(
model: "o3-mini",
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")
);
string userInputText = "How much wood would a woodchuck chuck?";
ResponseCreationOptions options = new()
{
ReasoningOptions = new()
{
ReasoningEffortLevel = ResponseReasoningEffortLevel.High,
},
};
OpenAIResponse response = client.CreateResponse(userInputText, options);
Console.WriteLine(response.GetOutputText());
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.create();
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.New(context.TODO(), responses.ResponseNewParams{})
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.ResponseCreateParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
Response response = client.responses().create();
}
}
require "openai"
openai = OpenAI::Client.new(api_key: "My API Key")
response = openai.responses.create
puts(response)
Response
{
"id": "resp_67ccd7eca01881908ff0b5146584e408072912b2993db808",
"object": "response",
"created_at": 1741477868,
"status": "completed",
"completed_at": 1741477869,
"error": null,
"incomplete_details": null,
"instructions": null,
"max_output_tokens": null,
"model": "o1-2024-12-17",
"output": [
{
"type": "message",
"id": "msg_67ccd7f7b5848190a6f3e95d809f6b44072912b2993db808",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "The classic tongue twister...",
"annotations": []
}
]
}
],
"parallel_tool_calls": true,
"previous_response_id": null,
"reasoning": {
"effort": "high",
"summary": null
},
"store": true,
"temperature": 1.0,
"text": {
"format": {
"type": "text"
}
},
"tool_choice": "auto",
"tools": [],
"top_p": 1.0,
"truncation": "disabled",
"usage": {
"input_tokens": 81,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 1035,
"output_tokens_details": {
"reasoning_tokens": 832
},
"total_tokens": 1116
},
"user": null,
"metadata": {}
}