diff --git a/en/java/resources/responses/index.md b/en/java/resources/responses/index.md index b975c4e..20210c5 100644 --- a/en/java/resources/responses/index.md +++ b/en/java/resources/responses/index.md @@ -6,13 +6,7 @@ **post** `/responses` -Creates a model response. Provide [text](https://platform.openai.com/docs/guides/text) or -[image](https://platform.openai.com/docs/guides/images) inputs to generate [text](https://platform.openai.com/docs/guides/text) -or [JSON](https://platform.openai.com/docs/guides/structured-outputs) outputs. Have the model call -your own [custom code](https://platform.openai.com/docs/guides/function-calling) or use built-in -[tools](https://platform.openai.com/docs/guides/tools) like [web search](https://platform.openai.com/docs/guides/tools-web-search) -or [file search](https://platform.openai.com/docs/guides/tools-file-search) to use your own data -as input for the model's response. +Create a model response ### Parameters @@ -125,6 +119,16 @@ as input for the model's response. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -155,6 +159,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -167,7 +181,9 @@ as input for the model's response. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -189,6 +205,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -1120,6 +1146,26 @@ as input for the model's response. The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -1163,6 +1209,16 @@ as input for the model's response. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -1193,6 +1249,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -1205,7 +1271,9 @@ as input for the model's response. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -1227,6 +1295,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -1237,6 +1315,30 @@ as input for the model's response. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -1305,7 +1407,7 @@ as input for the model's response. - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -1313,6 +1415,14 @@ as input for the model's response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -1321,6 +1431,10 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -1386,11 +1500,7 @@ as input for the model's response. - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -1560,6 +1670,14 @@ as input for the model's response. - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -1772,6 +1890,22 @@ as input for the model's response. - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -1919,6 +2053,14 @@ as input for the model's response. - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -2059,6 +2201,14 @@ as input for the model's response. - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -2123,16 +2273,30 @@ as input for the model's response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -2233,6 +2397,14 @@ as input for the model's response. - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -2302,6 +2474,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -2630,6 +2804,30 @@ as input for the model's response. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -2702,6 +2900,30 @@ as input for the model's response. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -2794,6 +3016,30 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -2818,6 +3064,30 @@ as input for the model's response. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -3000,6 +3270,30 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -3026,6 +3320,26 @@ as input for the model's response. The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -3050,6 +3364,58 @@ as input for the model's response. - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional instructions` A system (or developer) message inserted into the model's context. @@ -3090,6 +3456,30 @@ as input for the model's response. The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'. + - `Optional policy` + + The policy to apply to moderated response input and output. + + - `Optional input` + + The moderation policy for the response input. + + - `Mode mode` + + - `SCORE("score")` + + - `BLOCK("block")` + + - `Optional output` + + The moderation policy for the response output. + + - `Mode mode` + + - `SCORE("score")` + + - `BLOCK("block")` + - `Optional parallelToolCalls` Whether to allow the model to run tool calls in parallel. @@ -3109,9 +3499,32 @@ as input for the model's response. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + 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](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Optional mode` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Optional ttl` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -3330,6 +3743,14 @@ as input for the model's response. - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -3395,6 +3816,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -3485,6 +3908,8 @@ as input for the model's response. - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -3574,6 +3999,16 @@ as input for the model's response. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -3604,6 +4039,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -3616,7 +4061,9 @@ as input for the model's response. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -3638,6 +4085,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -4569,6 +5026,26 @@ as input for the model's response. The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -4612,6 +5089,16 @@ as input for the model's response. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -4642,6 +5129,16 @@ as input for the model's response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -4654,7 +5151,9 @@ as input for the model's response. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -4676,6 +5175,16 @@ as input for the model's response. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -4686,6 +5195,30 @@ as input for the model's response. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -4754,7 +5287,7 @@ as input for the model's response. - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -4762,6 +5295,14 @@ as input for the model's response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -4770,6 +5311,10 @@ as input for the model's response. A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -4835,11 +5380,7 @@ as input for the model's response. - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -5009,6 +5550,14 @@ as input for the model's response. - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -5221,6 +5770,22 @@ as input for the model's response. - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -5368,6 +5933,14 @@ as input for the model's response. - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -5508,6 +6081,14 @@ as input for the model's response. - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -5572,16 +6153,30 @@ as input for the model's response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -5682,6 +6277,14 @@ as input for the model's response. - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -5751,6 +6354,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -6079,6 +6684,30 @@ as input for the model's response. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -6151,6 +6780,30 @@ as input for the model's response. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -6243,6 +6896,30 @@ as input for the model's response. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -6267,6 +6944,30 @@ as input for the model's response. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -6449,6 +7150,30 @@ as input for the model's response. The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -6475,6 +7200,26 @@ as input for the model's response. The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -6499,6 +7244,58 @@ as input for the model's response. - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -6519,6 +7316,12 @@ as input for the model's response. - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -6784,6 +7587,30 @@ as input for the model's response. - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -6859,6 +7686,58 @@ as input for the model's response. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -6958,6 +7837,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -7051,6 +7932,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -7289,6 +8172,26 @@ as input for the model's response. - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -7367,6 +8270,26 @@ as input for the model's response. - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -7451,6 +8374,26 @@ as input for the model's response. - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -7481,6 +8424,26 @@ as input for the model's response. - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -7806,6 +8769,14 @@ as input for the model's response. - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -7871,6 +8842,8 @@ as input for the model's response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -8093,9 +9066,32 @@ as input for the model's response. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -8128,16 +9124,13 @@ as input for the model's response. - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -8151,6 +9144,8 @@ as input for the model's response. - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -8165,6 +9160,16 @@ as input for the model's response. - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -8349,6 +9354,10 @@ as input for the model's response. A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -8468,8 +9477,14 @@ public final class Main { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -8524,11 +9539,16 @@ public final class Main { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -8545,6 +9565,7 @@ public final class Main { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -8563,7 +9584,7 @@ public final class Main { **get** `/responses/{response_id}` -Retrieves a model response with the given ID. +Get a model response ### Parameters @@ -8632,6 +9653,8 @@ Retrieves a model response with the given ID. - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -8721,6 +9744,16 @@ Retrieves a model response with the given ID. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -8751,6 +9784,16 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -8763,7 +9806,9 @@ Retrieves a model response with the given ID. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -8785,6 +9830,16 @@ Retrieves a model response with the given ID. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -9716,6 +10771,26 @@ Retrieves a model response with the given ID. The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -9759,6 +10834,16 @@ Retrieves a model response with the given ID. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -9789,6 +10874,16 @@ Retrieves a model response with the given ID. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -9801,7 +10896,9 @@ Retrieves a model response with the given ID. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -9823,6 +10920,16 @@ Retrieves a model response with the given ID. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -9833,6 +10940,30 @@ Retrieves a model response with the given ID. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -9901,7 +11032,7 @@ Retrieves a model response with the given ID. - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -9909,6 +11040,14 @@ Retrieves a model response with the given ID. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -9917,6 +11056,10 @@ Retrieves a model response with the given ID. A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -9982,11 +11125,7 @@ Retrieves a model response with the given ID. - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -10156,6 +11295,14 @@ Retrieves a model response with the given ID. - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -10368,6 +11515,22 @@ Retrieves a model response with the given ID. - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -10515,6 +11678,14 @@ Retrieves a model response with the given ID. - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -10655,6 +11826,14 @@ Retrieves a model response with the given ID. - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -10719,16 +11898,30 @@ Retrieves a model response with the given ID. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -10829,6 +12022,14 @@ Retrieves a model response with the given ID. - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -10898,6 +12099,8 @@ Retrieves a model response with the given ID. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -11226,6 +12429,30 @@ Retrieves a model response with the given ID. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -11298,6 +12525,30 @@ Retrieves a model response with the given ID. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -11390,6 +12641,30 @@ Retrieves a model response with the given ID. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -11414,6 +12689,30 @@ Retrieves a model response with the given ID. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -11596,6 +12895,30 @@ Retrieves a model response with the given ID. The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -11622,6 +12945,26 @@ Retrieves a model response with the given ID. The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -11646,6 +12989,58 @@ Retrieves a model response with the given ID. - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -11666,6 +13061,12 @@ Retrieves a model response with the given ID. - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -11931,6 +13332,30 @@ Retrieves a model response with the given ID. - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -12006,6 +13431,58 @@ Retrieves a model response with the given ID. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -12105,6 +13582,8 @@ Retrieves a model response with the given ID. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -12198,6 +13677,8 @@ Retrieves a model response with the given ID. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -12436,6 +13917,26 @@ Retrieves a model response with the given ID. - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -12514,6 +14015,26 @@ Retrieves a model response with the given ID. - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -12598,6 +14119,26 @@ Retrieves a model response with the given ID. - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -12628,6 +14169,26 @@ Retrieves a model response with the given ID. - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -12953,6 +14514,14 @@ Retrieves a model response with the given ID. - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -13018,6 +14587,8 @@ Retrieves a model response with the given ID. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -13240,9 +14811,32 @@ Retrieves a model response with the given ID. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -13275,16 +14869,13 @@ Retrieves a model response with the given ID. - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -13298,6 +14889,8 @@ Retrieves a model response with the given ID. - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -13312,6 +14905,16 @@ Retrieves a model response with the given ID. - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -13496,6 +15099,10 @@ Retrieves a model response with the given ID. A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -13615,8 +15222,14 @@ public final class Main { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -13671,11 +15284,16 @@ public final class Main { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -13692,6 +15310,7 @@ public final class Main { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -13710,7 +15329,7 @@ public final class Main { **delete** `/responses/{response_id}` -Deletes a model response with the given ID. +Delete a model response ### Parameters @@ -13744,9 +15363,7 @@ public final class Main { **post** `/responses/{response_id}/cancel` -Cancels a model response with the given ID. Only responses created with -the `background` parameter set to `true` can be cancelled. -[Learn more](https://platform.openai.com/docs/guides/background). +Cancel a response ### Parameters @@ -13780,6 +15397,8 @@ the `background` parameter set to `true` can be cancelled. - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -13869,6 +15488,16 @@ the `background` parameter set to `true` can be cancelled. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -13899,6 +15528,16 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -13911,7 +15550,9 @@ the `background` parameter set to `true` can be cancelled. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -13933,6 +15574,16 @@ the `background` parameter set to `true` can be cancelled. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -14864,6 +16515,26 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -14907,6 +16578,16 @@ the `background` parameter set to `true` can be cancelled. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -14937,6 +16618,16 @@ the `background` parameter set to `true` can be cancelled. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -14949,7 +16640,9 @@ the `background` parameter set to `true` can be cancelled. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -14971,6 +16664,16 @@ the `background` parameter set to `true` can be cancelled. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -14981,6 +16684,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -15049,7 +16776,7 @@ the `background` parameter set to `true` can be cancelled. - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -15057,6 +16784,14 @@ the `background` parameter set to `true` can be cancelled. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -15065,6 +16800,10 @@ the `background` parameter set to `true` can be cancelled. A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -15130,11 +16869,7 @@ the `background` parameter set to `true` can be cancelled. - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -15304,6 +17039,14 @@ the `background` parameter set to `true` can be cancelled. - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -15516,6 +17259,22 @@ the `background` parameter set to `true` can be cancelled. - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -15663,6 +17422,14 @@ the `background` parameter set to `true` can be cancelled. - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -15803,6 +17570,14 @@ the `background` parameter set to `true` can be cancelled. - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -15867,16 +17642,30 @@ the `background` parameter set to `true` can be cancelled. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -15977,6 +17766,14 @@ the `background` parameter set to `true` can be cancelled. - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -16046,6 +17843,8 @@ the `background` parameter set to `true` can be cancelled. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -16374,6 +18173,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -16446,6 +18269,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -16538,6 +18385,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -16562,6 +18433,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -16744,6 +18639,30 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -16770,6 +18689,26 @@ the `background` parameter set to `true` can be cancelled. The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -16794,6 +18733,58 @@ the `background` parameter set to `true` can be cancelled. - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -16814,6 +18805,12 @@ the `background` parameter set to `true` can be cancelled. - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -17079,6 +19076,30 @@ the `background` parameter set to `true` can be cancelled. - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -17154,6 +19175,58 @@ the `background` parameter set to `true` can be cancelled. for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -17253,6 +19326,8 @@ the `background` parameter set to `true` can be cancelled. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -17346,6 +19421,8 @@ the `background` parameter set to `true` can be cancelled. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -17584,6 +19661,26 @@ the `background` parameter set to `true` can be cancelled. - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -17662,6 +19759,26 @@ the `background` parameter set to `true` can be cancelled. - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -17746,6 +19863,26 @@ the `background` parameter set to `true` can be cancelled. - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -17776,6 +19913,26 @@ the `background` parameter set to `true` can be cancelled. - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -18101,6 +20258,14 @@ the `background` parameter set to `true` can be cancelled. - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -18166,6 +20331,8 @@ the `background` parameter set to `true` can be cancelled. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -18388,9 +20555,32 @@ the `background` parameter set to `true` can be cancelled. Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -18423,16 +20613,13 @@ the `background` parameter set to `true` can be cancelled. - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -18446,6 +20633,8 @@ the `background` parameter set to `true` can be cancelled. - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -18460,6 +20649,16 @@ the `background` parameter set to `true` can be cancelled. - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -18644,6 +20843,10 @@ the `background` parameter set to `true` can be cancelled. A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -18763,8 +20966,14 @@ public final class Main { }, "strict": true, "type": "function", + "allowed_callers": [ + "direct" + ], "defer_loading": true, - "description": "description" + "description": "description", + "output_schema": { + "foo": "bar" + } } ], "top_p": 1, @@ -18819,11 +21028,16 @@ public final class Main { "version": "version" }, "prompt_cache_key": "prompt-cache-key-1234", + "prompt_cache_options": { + "mode": "implicit", + "ttl": "30m" + }, "prompt_cache_retention": "in_memory", "reasoning": { "context": "auto", "effort": "none", "generate_summary": "auto", + "mode": "standard", "summary": "auto" }, "safety_identifier": "safety-identifier-1234", @@ -18840,6 +21054,7 @@ public final class Main { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -18858,9 +21073,7 @@ public final class Main { **post** `/responses/compact` -Compact a conversation. Returns a compacted response object. - -Learn when and how to compact long-running conversations in the [conversation state guide](https://platform.openai.com/docs/guides/conversation-state#managing-the-context-window). For ZDR-compatible compaction details, see [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). +Compact a response ### Parameters @@ -18870,6 +21083,12 @@ Learn when and how to compact long-running conversations in the [conversation st Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guide](https://platform.openai.com/docs/models) to browse and compare available models. + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -19093,6 +21312,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -19123,6 +21352,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -19135,7 +21374,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -19157,6 +21398,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -20088,6 +22339,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -20131,6 +22402,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -20161,6 +22442,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -20173,7 +22464,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -20195,6 +22488,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -20205,6 +22508,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -20273,7 +22600,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -20281,6 +22608,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -20289,6 +22624,10 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -20354,11 +22693,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -20528,6 +22863,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -20740,6 +23083,22 @@ Learn when and how to compact long-running conversations in the [conversation st - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -20887,6 +23246,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -21027,6 +23394,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -21091,16 +23466,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -21201,6 +23590,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -21270,6 +23667,8 @@ Learn when and how to compact long-running conversations in the [conversation st - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -21598,6 +23997,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -21670,6 +24093,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -21762,6 +24209,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -21786,6 +24257,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -21968,6 +24463,30 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -21994,6 +24513,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -22018,6 +24557,58 @@ Learn when and how to compact long-running conversations in the [conversation st - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional instructions` A system (or developer) message inserted into the model's context. @@ -22031,6 +24622,24 @@ Learn when and how to compact long-running conversations in the [conversation st A key to use when reading from or writing to the prompt cache. + - `Optional promptCacheOptions` + + 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](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Optional mode` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Optional ttl` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `_30M("30m")` + - `Optional promptCacheRetention` How long to retain a prompt cache entry created by this request. @@ -22357,6 +24966,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -22405,6 +25034,16 @@ Learn when and how to compact long-running conversations in the [conversation st - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -22435,6 +25074,16 @@ Learn when and how to compact long-running conversations in the [conversation st The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -22447,7 +25096,9 @@ Learn when and how to compact long-running conversations in the [conversation st - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -22469,6 +25120,16 @@ Learn when and how to compact long-running conversations in the [conversation st The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -22486,6 +25147,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -23131,6 +25816,58 @@ Learn when and how to compact long-running conversations in the [conversation st - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -23219,7 +25956,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -23227,6 +25964,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -23235,6 +25980,10 @@ Learn when and how to compact long-running conversations in the [conversation st A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -23300,11 +26049,7 @@ Learn when and how to compact long-running conversations in the [conversation st - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -23474,6 +26219,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -23686,6 +26439,22 @@ Learn when and how to compact long-running conversations in the [conversation st - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -23833,6 +26602,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -23973,6 +26750,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -24037,16 +26822,30 @@ Learn when and how to compact long-running conversations in the [conversation st - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -24147,6 +26946,14 @@ Learn when and how to compact long-running conversations in the [conversation st - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -24212,6 +27019,8 @@ Learn when and how to compact long-running conversations in the [conversation st - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -24515,6 +27324,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -24593,6 +27422,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -24677,6 +27526,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -24707,6 +27576,26 @@ Learn when and how to compact long-running conversations in the [conversation st - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -24880,6 +27769,26 @@ Learn when and how to compact long-running conversations in the [conversation st The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -24919,6 +27828,10 @@ Learn when and how to compact long-running conversations in the [conversation st A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -24957,7 +27870,7 @@ public final class Main { OpenAIClient client = OpenAIOkHttpClient.fromEnv(); ResponseCompactParams params = ResponseCompactParams.builder() - .model(ResponseCompactParams.Model.GPT_5_4) + .model(ResponseCompactParams.Model.GPT_5_6_SOL) .build(); CompactedResponse compactedResponse = client.responses().compact(params); } @@ -25015,6 +27928,7 @@ public final class Main { "usage": { "input_tokens": 0, "input_tokens_details": { + "cache_write_tokens": 0, "cached_tokens": 0 }, "output_tokens": 0, @@ -25040,6 +27954,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + ### Compacted Response - `class CompactedResponse:` @@ -25346,6 +28268,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -25394,6 +28336,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -25424,6 +28376,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -25436,7 +28398,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -25458,6 +28422,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -25475,6 +28449,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -26120,6 +29118,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -26208,7 +29258,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -26216,6 +29266,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -26224,6 +29282,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -26289,11 +29351,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -26463,6 +29521,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -26675,6 +29741,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -26822,6 +29904,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -26962,6 +30052,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -27026,16 +30124,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -27136,6 +30248,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -27201,6 +30321,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -27504,6 +30626,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -27582,6 +30724,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -27666,6 +30828,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -27696,6 +30878,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -27869,6 +31071,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -27908,6 +31130,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -28362,6 +31588,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -28435,6 +31669,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -28465,6 +31709,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -28477,7 +31731,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -28499,6 +31755,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -28595,11 +31861,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -28667,6 +31929,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -28841,7 +32111,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -28849,6 +32119,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -28857,6 +32135,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + ### Inline Skill - `class InlineSkill:` @@ -28985,16 +32267,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -29009,6 +32305,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -29081,6 +32385,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -29170,6 +32476,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -29200,6 +32516,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -29212,7 +32538,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -29234,6 +32562,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -30165,6 +33503,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -30208,6 +33566,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -30238,6 +33606,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -30250,7 +33628,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -30272,6 +33652,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -30282,6 +33672,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -30350,7 +33764,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -30358,6 +33772,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -30366,6 +33788,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -30431,11 +33857,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -30605,6 +34027,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -30817,6 +34247,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -30964,6 +34410,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -31104,6 +34558,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -31168,16 +34630,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -31278,6 +34754,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -31347,6 +34831,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -31675,6 +35161,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -31747,6 +35257,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -31839,6 +35373,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -31863,6 +35421,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -32045,6 +35627,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -32071,6 +35677,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -32095,6 +35721,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -32115,6 +35793,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -32380,6 +36064,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -32455,6 +36163,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -32554,6 +36314,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -32647,6 +36409,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -32885,6 +36649,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -32963,6 +36747,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -33047,6 +36851,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -33077,6 +36901,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -33402,6 +37246,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -33467,6 +37319,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -33689,9 +37543,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -33724,16 +37601,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -33747,6 +37621,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -33761,6 +37637,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -33945,6 +37831,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -34054,6 +37944,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -34086,6 +37996,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -34441,6 +38371,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -34530,6 +38462,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -34560,6 +38502,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -34572,7 +38524,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -34594,6 +38548,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -35525,6 +39489,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -35568,6 +39552,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -35598,6 +39592,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -35610,7 +39614,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -35632,6 +39638,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -35642,6 +39658,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -35710,7 +39750,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -35718,6 +39758,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -35726,6 +39774,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -35791,11 +39843,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -35965,6 +40013,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -36177,6 +40233,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -36324,6 +40396,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -36464,6 +40544,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -36528,16 +40616,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -36638,6 +40740,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -36707,6 +40817,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -37035,6 +41147,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -37107,6 +41243,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -37199,6 +41359,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -37223,6 +41407,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -37405,6 +41613,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -37431,6 +41663,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -37455,6 +41707,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -37475,6 +41779,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -37740,6 +42050,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -37815,6 +42149,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -37914,6 +42300,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -38007,6 +42395,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -38245,6 +42635,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -38323,6 +42733,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -38407,6 +42837,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -38437,6 +42887,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -38762,6 +43232,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -38827,6 +43305,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -39049,9 +43529,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -39084,16 +43587,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -39107,6 +43607,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -39121,6 +43623,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -39305,6 +43817,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -39885,6 +44401,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -39915,6 +44441,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -39927,7 +44463,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -39949,6 +44487,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseOutputText:` A text output from the model. @@ -40527,6 +45075,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -40616,6 +45166,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -40646,6 +45206,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -40658,7 +45228,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -40680,6 +45252,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -41611,6 +46193,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -41654,6 +46256,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -41684,6 +46296,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -41696,7 +46318,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -41718,6 +46342,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -41728,6 +46362,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -41796,7 +46454,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -41804,6 +46462,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -41812,6 +46478,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -41877,11 +46547,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -42051,6 +46717,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -42263,6 +46937,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -42410,6 +47100,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -42550,6 +47248,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -42614,16 +47320,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -42724,6 +47444,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -42793,6 +47521,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -43121,6 +47851,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -43193,6 +47947,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -43285,6 +48063,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -43309,6 +48111,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -43491,6 +48317,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -43517,6 +48367,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -43541,6 +48411,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -43561,6 +48483,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -43826,6 +48754,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -43901,6 +48853,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -44000,6 +49004,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -44093,6 +49099,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -44331,6 +49339,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -44409,6 +49437,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -44493,6 +49541,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -44523,6 +49591,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -44848,6 +49936,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -44913,6 +50009,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -45135,9 +50233,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -45170,16 +50291,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -45193,6 +50311,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -45207,6 +50327,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -45391,6 +50521,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -45456,6 +50590,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -45574,6 +50728,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -45604,6 +50768,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -45616,7 +50790,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -45638,6 +50814,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "custom_tool_call_output"constant` The type of the custom tool call output. Always `custom_tool_call_output`. @@ -45648,6 +50834,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + ### Response Custom Tool Call Output Item - `class ResponseCustomToolCallOutputItem:` @@ -45689,6 +50899,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -45783,6 +50995,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -45872,6 +51086,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -45902,6 +51126,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -45914,7 +51148,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -45936,6 +51172,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -46867,6 +52113,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -46910,6 +52176,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -46940,6 +52216,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -46952,7 +52238,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -46974,6 +52262,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -46984,6 +52282,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -47052,7 +52374,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -47060,6 +52382,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -47068,6 +52398,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -47133,11 +52467,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -47307,6 +52637,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -47519,6 +52857,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -47666,6 +53020,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -47806,6 +53168,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -47870,16 +53240,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -47980,6 +53364,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -48049,6 +53441,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -48377,6 +53771,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -48449,6 +53867,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -48541,6 +53983,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -48565,6 +54031,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -48747,6 +54237,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -48773,6 +54287,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -48797,6 +54331,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -48817,6 +54403,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -49082,6 +54674,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -49157,6 +54773,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -49256,6 +54924,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -49349,6 +55019,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -49587,6 +55259,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -49665,6 +55357,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -49749,6 +55461,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -49779,6 +55511,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -50104,6 +55856,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -50169,6 +55929,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -50391,9 +56153,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -50426,16 +56211,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -50449,6 +56231,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -50463,6 +56247,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -50647,6 +56441,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -51015,6 +56813,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -51045,6 +56853,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -51057,7 +56875,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -51079,6 +56899,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Function Shell Call Output Content - `class ResponseFunctionShellCallOutputContent:` @@ -51189,6 +57019,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -51269,6 +57119,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -51302,6 +57172,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -51378,6 +57268,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -51408,6 +57308,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -51420,7 +57330,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -51442,6 +57354,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -51459,6 +57381,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -51697,6 +57643,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -51786,6 +57734,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -51816,6 +57774,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -51828,7 +57796,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -51850,6 +57820,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -52781,6 +58761,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -52824,6 +58824,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -52854,6 +58864,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -52866,7 +58886,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -52888,6 +58910,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -52898,6 +58930,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -52966,7 +59022,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -52974,6 +59030,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -52982,6 +59046,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -53047,11 +59115,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -53221,6 +59285,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -53433,6 +59505,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -53580,6 +59668,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -53720,6 +59816,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -53784,16 +59888,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -53894,6 +60012,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -53963,6 +60089,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -54291,6 +60419,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -54363,6 +60515,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -54455,6 +60631,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -54479,6 +60679,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -54661,6 +60885,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -54687,6 +60935,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -54711,6 +60979,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -54731,6 +61051,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -54996,6 +61322,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -55071,6 +61421,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -55170,6 +61572,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -55263,6 +61667,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -55501,6 +61907,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -55579,6 +62005,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -55663,6 +62109,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -55693,6 +62159,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -56018,6 +62504,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -56083,6 +62577,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -56305,9 +62801,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -56340,16 +62859,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -56363,6 +62879,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -56377,6 +62895,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -56561,6 +63089,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -56661,6 +63193,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -56750,6 +63284,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -56780,6 +63324,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -56792,7 +63346,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -56814,6 +63370,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -57745,6 +64311,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -57788,6 +64374,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -57818,6 +64414,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -57830,7 +64436,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -57852,6 +64460,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -57862,6 +64480,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -57930,7 +64572,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -57938,6 +64580,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -57946,6 +64596,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -58011,11 +64665,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -58185,6 +64835,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -58397,6 +65055,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -58544,6 +65218,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -58684,6 +65366,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -58748,16 +65438,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -58858,6 +65562,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -58927,6 +65639,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -59255,6 +65969,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -59327,6 +66065,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -59419,6 +66181,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -59443,6 +66229,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -59625,6 +66435,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -59651,6 +66485,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -59675,6 +66529,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -59695,6 +66601,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -59960,6 +66872,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -60035,6 +66971,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -60134,6 +67122,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -60227,6 +67217,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -60465,6 +67457,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -60543,6 +67555,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -60627,6 +67659,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -60657,6 +67709,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -60982,6 +68054,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -61047,6 +68127,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -61269,9 +68351,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -61304,16 +68409,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -61327,6 +68429,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -61341,6 +68445,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -61525,6 +68639,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -61609,6 +68727,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -61639,6 +68767,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -61651,7 +68789,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -61673,6 +68813,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input File - `class ResponseInputFile:` @@ -61687,7 +68837,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -61709,6 +68861,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input File Content - `class ResponseInputFileContent:` @@ -61723,7 +68885,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -61745,6 +68909,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input Image - `class ResponseInputImage:` @@ -61777,6 +68951,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input Image Content - `class ResponseInputImageContent:` @@ -61809,6 +68993,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input Item - `class ResponseInputItem: A class that can be one of several variants.union` @@ -61850,6 +69044,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -61880,6 +69084,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -61892,7 +69106,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -61914,6 +69130,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -62845,6 +70071,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -62888,6 +70134,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -62918,6 +70174,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -62930,7 +70196,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -62952,6 +70220,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -62962,6 +70240,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -63030,7 +70332,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -63038,6 +70340,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -63046,6 +70356,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -63111,11 +70425,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -63285,6 +70595,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -63497,6 +70815,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -63644,6 +70978,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -63784,6 +71126,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -63848,16 +71198,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -63958,6 +71322,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -64027,6 +71399,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -64355,6 +71729,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -64427,6 +71825,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -64519,6 +71941,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -64543,6 +71989,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -64725,6 +72195,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -64751,6 +72245,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -64775,6 +72289,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + ### Response Input Message Item - `class ResponseInputMessageItem:` @@ -64802,6 +72368,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -64832,6 +72408,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -64844,7 +72430,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -64866,6 +72454,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `system`, or `developer`. @@ -64909,6 +72507,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Input Text Content - `class ResponseInputTextContent:` @@ -64925,6 +72533,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + ### Response Item - `class ResponseItem: A class that can be one of several variants.union` @@ -64956,6 +72574,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -64986,6 +72614,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -64998,7 +72636,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -65020,6 +72660,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `system`, or `developer`. @@ -65956,6 +73606,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -66048,7 +73722,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -66056,6 +73730,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -66064,6 +73746,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -66129,11 +73815,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -66303,6 +73985,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -66515,6 +74205,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -66662,6 +74368,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -66802,6 +74516,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -66866,16 +74588,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -66976,6 +74712,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -67041,6 +74785,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -67136,6 +74882,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseCompactionItem:` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -67405,6 +75203,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -67483,6 +75301,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -67567,6 +75405,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -67597,6 +75455,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -68312,6 +76190,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -68360,6 +76258,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -68390,6 +76298,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -68402,7 +76320,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -68424,6 +76344,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -68441,6 +76371,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -69086,6 +77040,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -69174,7 +77180,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -69182,6 +77188,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -69190,6 +77204,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -69255,11 +77273,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -69429,6 +77443,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -69641,6 +77663,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -69788,6 +77826,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -69928,6 +77974,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -69992,16 +78046,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -70102,6 +78170,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -70167,6 +78243,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -70470,6 +78548,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -70548,6 +78646,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -70632,6 +78750,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -70662,6 +78800,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -70835,6 +78993,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -71156,6 +79334,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -71204,6 +79402,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -71234,6 +79442,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -71246,7 +79464,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -71268,6 +79488,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -71285,6 +79515,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -71930,6 +80184,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -72018,7 +80324,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -72026,6 +80332,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -72034,6 +80348,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -72099,11 +80417,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -72273,6 +80587,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -72485,6 +80807,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -72632,6 +80970,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -72772,6 +81118,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -72836,16 +81190,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -72946,6 +81314,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -73011,6 +81387,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -73314,6 +81692,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -73392,6 +81790,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -73476,6 +81894,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -73506,6 +81944,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -73679,6 +82137,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -74014,6 +82492,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -74062,6 +82560,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -74092,6 +82600,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -74104,7 +82622,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -74126,6 +82646,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Status status` The status of the item. One of `in_progress`, `completed`, or @@ -74143,6 +82673,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -74788,6 +83342,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -74876,7 +83482,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -74884,6 +83490,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -74892,6 +83506,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -74957,11 +83575,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -75131,6 +83745,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -75343,6 +83965,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -75490,6 +84128,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -75630,6 +84276,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -75694,16 +84348,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -75804,6 +84472,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -75869,6 +84545,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -76172,6 +84850,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -76250,6 +84948,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -76334,6 +85052,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -76364,6 +85102,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -76537,6 +85295,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -76986,6 +85764,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -77016,6 +85804,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -77028,7 +85826,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -77050,6 +85850,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Optional version` Optional version of the prompt template. @@ -77086,6 +85896,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -77175,6 +85987,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -77205,6 +86027,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -77217,7 +86049,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -77239,6 +86073,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -78170,6 +87014,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -78213,6 +87077,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -78243,6 +87117,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -78255,7 +87139,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -78277,6 +87163,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -78287,6 +87183,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -78355,7 +87275,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -78363,6 +87283,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -78371,6 +87299,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -78436,11 +87368,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -78610,6 +87538,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -78822,6 +87758,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -78969,6 +87921,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -79109,6 +88069,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -79173,16 +88141,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -79283,6 +88265,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -79352,6 +88342,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -79680,6 +88672,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -79752,6 +88768,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -79844,6 +88884,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -79868,6 +88932,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -80050,6 +89138,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -80076,6 +89188,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -80100,6 +89232,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -80120,6 +89304,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -80385,6 +89575,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -80460,6 +89674,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -80559,6 +89825,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -80652,6 +89920,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -80890,6 +90160,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -80968,6 +90258,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -81052,6 +90362,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -81082,6 +90412,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -81407,6 +90757,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -81472,6 +90830,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -81694,9 +91054,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -81729,16 +91112,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -81752,6 +91132,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -81766,6 +91148,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -81950,6 +91342,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -82134,6 +91530,13 @@ public final class Main { - `RESPONSE_REASONING_SUMMARY_PART_DONE("response.reasoning_summary_part.done")` + - `Optional status` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `INCOMPLETE("incomplete")` + ### Response Reasoning Summary Text Delta Event - `class ResponseReasoningSummaryTextDeltaEvent:` @@ -82563,6 +91966,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -82652,6 +92057,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -82682,6 +92097,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -82694,7 +92119,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -82716,6 +92143,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -83647,6 +93084,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -83690,6 +93147,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -83720,6 +93187,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -83732,7 +93209,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -83754,6 +93233,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -83764,6 +93253,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -83832,7 +93345,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -83840,6 +93353,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -83848,6 +93369,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -83913,11 +93438,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -84087,6 +93608,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -84299,6 +93828,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -84446,6 +93991,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -84586,6 +94139,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -84650,16 +94211,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -84760,6 +94335,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -84829,6 +94412,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -85157,6 +94742,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -85229,6 +94838,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -85321,6 +94954,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -85345,6 +95002,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -85527,6 +95208,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -85553,6 +95258,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -85577,6 +95302,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -85597,6 +95374,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -85862,6 +95645,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -85937,6 +95744,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -86036,6 +95895,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -86129,6 +95990,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -86367,6 +96230,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -86445,6 +96328,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -86529,6 +96432,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -86559,6 +96482,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -86884,6 +96827,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -86949,6 +96900,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -87171,9 +97124,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -87206,16 +97182,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -87229,6 +97202,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -87243,6 +97218,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -87427,6 +97412,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -87829,6 +97818,10 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `ProgramOutput` + - `class ResponseToolSearchCall:` - `class ResponseToolSearchOutputItem:` @@ -87997,6 +97990,13 @@ public final class Main { - `RESPONSE_REASONING_SUMMARY_PART_DONE("response.reasoning_summary_part.done")` + - `Optional status` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `INCOMPLETE("incomplete")` + - `class ResponseReasoningSummaryTextDeltaEvent:` Emitted when a delta is added to a reasoning summary text. @@ -89034,7 +99034,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -89042,6 +99042,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -89050,6 +99058,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -89115,11 +99127,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -89289,6 +99297,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -89501,6 +99517,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -89648,6 +99680,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -89788,6 +99828,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -89852,16 +99900,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -89962,6 +100024,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -89994,7 +100064,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -90002,6 +100072,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -90010,6 +100088,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -90075,11 +100157,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -90249,6 +100327,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -90461,6 +100547,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -90608,6 +100710,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -90748,6 +100858,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -90812,16 +100930,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -90922,6 +101054,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -90969,6 +101109,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -91179,6 +101323,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -91209,6 +101363,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -91221,7 +101385,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -91243,6 +101409,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -92174,6 +102350,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -92217,6 +102413,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -92247,6 +102453,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -92259,7 +102475,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -92281,6 +102499,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -92291,6 +102519,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -92359,7 +102611,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -92367,6 +102619,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -92375,6 +102635,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -92440,11 +102704,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -92614,6 +102874,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -92826,6 +103094,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -92973,6 +103257,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -93113,6 +103405,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -93177,16 +103477,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -93287,6 +103601,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -93356,6 +103678,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -93684,6 +104008,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -93756,6 +104104,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -93848,6 +104220,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -93872,6 +104268,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -94054,6 +104474,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -94080,6 +104524,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -94104,6 +104568,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional instructions` A system (or developer) message inserted into the model's context. @@ -94140,6 +104656,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -94334,6 +104856,30 @@ public final class Main { The moderation model to use for moderated completions, e.g. 'omni-moderation-latest'. + - `Optional policy` + + The policy to apply to moderated response input and output. + + - `Optional input` + + The moderation policy for the response input. + + - `Mode mode` + + - `SCORE("score")` + + - `BLOCK("block")` + + - `Optional output` + + The moderation policy for the response output. + + - `Mode mode` + + - `SCORE("score")` + + - `BLOCK("block")` + - `Optional parallelToolCalls` Whether to allow the model to run tool calls in parallel. @@ -94381,9 +104927,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + 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](https://platform.openai.com/docs/guides/prompt-caching) for current details. + + - `Optional mode` + + Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With `explicit`, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Optional ttl` + + The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -94416,16 +104985,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -94439,6 +105005,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -94453,6 +105021,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -94759,6 +105337,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -94824,6 +105410,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -95106,6 +105694,8 @@ public final class Main { - `INVALID_PROMPT("invalid_prompt")` + - `BIO_POLICY("bio_policy")` + - `VECTOR_STORE_TIMEOUT("vector_store_timeout")` - `INVALID_IMAGE("invalid_image")` @@ -95195,6 +105785,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -95225,6 +105825,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -95237,7 +105847,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -95259,6 +105871,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -96190,6 +106812,26 @@ public final class Main { The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -96233,6 +106875,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -96263,6 +106915,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -96275,7 +106937,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -96297,6 +106961,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -96307,6 +106981,30 @@ public final class Main { The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -96375,7 +107073,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -96383,6 +107081,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -96391,6 +107097,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -96456,11 +107166,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -96630,6 +107336,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -96842,6 +107556,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -96989,6 +107719,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -97129,6 +107867,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -97193,16 +107939,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -97303,6 +108063,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -97372,6 +108140,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -97700,6 +108470,30 @@ public final class Main { The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -97772,6 +108566,30 @@ public final class Main { The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -97864,6 +108682,30 @@ public final class Main { The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -97888,6 +108730,30 @@ public final class Main { The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -98070,6 +108936,30 @@ public final class Main { The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -98096,6 +108986,26 @@ public final class Main { The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -98120,6 +109030,58 @@ public final class Main { - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional metadata` Set of 16 key-value pairs that can be attached to an object. This can be @@ -98140,6 +109102,12 @@ public final class Main { - `enum ChatModel:` + - `GPT_5_6_SOL("gpt-5.6-sol")` + + - `GPT_5_6_TERRA("gpt-5.6-terra")` + + - `GPT_5_6_LUNA("gpt-5.6-luna")` + - `GPT_5_4("gpt-5.4")` - `GPT_5_4_MINI("gpt-5.4-mini")` @@ -98405,6 +109373,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -98480,6 +109472,58 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseToolSearchCall:` - `String id` @@ -98579,6 +109623,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -98672,6 +109718,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -98910,6 +109958,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -98988,6 +110056,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -99072,6 +110160,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -99102,6 +110210,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -99427,6 +110555,14 @@ public final class Main { - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -99492,6 +110628,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -99714,9 +110852,32 @@ public final class Main { Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://platform.openai.com/docs/guides/prompt-caching). + - `Optional promptCacheOptions` + + The prompt-caching options that were applied to the response. Supported for `gpt-5.6` and later models. + + - `Mode mode` + + Whether implicit prompt-cache breakpoints were enabled. + + - `IMPLICIT("implicit")` + + - `EXPLICIT("explicit")` + + - `Ttl ttl` + + The minimum lifetime applied to each cache breakpoint. + + - `_30M("30m")` + - `Optional promptCacheRetention` + Deprecated. Use `prompt_cache_options.ttl` instead. + The retention policy for the prompt cache. Set to `24h` to enable extended prompt caching, which keeps cached prefixes active for longer, up to a maximum of 24 hours. [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention). + This field expresses a maximum retention policy, while + `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two + fields are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future models, only `24h` is supported. For older models that support both `in_memory` and `24h`, the default depends on your organization's data retention policy: @@ -99749,16 +110910,13 @@ public final class Main { - `Optional effort` - Constrains effort on reasoning for - [reasoning models](https://platform.openai.com/docs/guides/reasoning). - Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing - reasoning effort can result in faster responses and fewer tokens used - on reasoning in a response. - - - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1. - - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`. - - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort. - - `xhigh` is supported for all models after `gpt-5.1-codex-max`. + 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](https://platform.openai.com/docs/guides/reasoning) + for model-specific support. - `NONE("none")` @@ -99772,6 +110930,8 @@ public final class Main { - `XHIGH("xhigh")` + - `MAX("max")` + - `Optional generateSummary` **Deprecated:** use `summary` instead. @@ -99786,6 +110946,16 @@ public final class Main { - `DETAILED("detailed")` + - `Optional mode` + + Controls the reasoning execution mode for the request. + + When returned on a response, this is the effective execution mode. + + - `STANDARD("standard")` + + - `PRO("pro")` + - `Optional summary` A summary of the reasoning performed by the model. This can be @@ -99970,6 +111140,10 @@ public final class Main { A detailed breakdown of the input tokens. + - `long cacheWriteTokens` + + The number of input tokens that were written to the cache. + - `long cachedTokens` The number of tokens that were retrieved from the cache. @@ -100372,6 +111546,10 @@ public final class Main { for subsequent turns of a conversation if you are manually [managing context](https://platform.openai.com/docs/guides/conversation-state). + - `Program` + + - `ProgramOutput` + - `class ResponseToolSearchCall:` - `class ResponseToolSearchOutputItem:` @@ -100540,6 +111718,13 @@ public final class Main { - `RESPONSE_REASONING_SUMMARY_PART_DONE("response.reasoning_summary_part.done")` + - `Optional status` + + The completion status of the summary part. Omitted when the part completed + normally and set to `incomplete` when generation was interrupted. + + - `INCOMPLETE("incomplete")` + - `class ResponseReasoningSummaryTextDeltaEvent:` Emitted when a delta is added to a reasoning summary text. @@ -101316,7 +112501,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -101324,6 +112509,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -101332,6 +112525,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -101397,11 +112594,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -101571,6 +112764,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -101783,6 +112984,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -101930,6 +113147,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -102070,6 +113295,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -102134,16 +113367,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -102244,6 +113491,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + ### Tool Choice Allowed - `class ToolChoiceAllowed:` @@ -102570,7 +113825,7 @@ public final class Main { **get** `/responses/{response_id}/input_items` -Returns a list of input items for a given response. +List input items ### Parameters @@ -102650,6 +113905,16 @@ Returns a list of input items for a given response. - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -102680,6 +113945,16 @@ Returns a list of input items for a given response. The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -102692,7 +113967,9 @@ Returns a list of input items for a given response. - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -102714,6 +113991,16 @@ Returns a list of input items for a given response. The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `system`, or `developer`. @@ -103650,6 +114937,30 @@ Returns a list of input items for a given response. - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -103742,7 +115053,7 @@ Returns a list of input items for a given response. - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -103750,6 +115061,14 @@ Returns a list of input items for a given response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -103758,6 +115077,10 @@ Returns a list of input items for a given response. A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -103823,11 +115146,7 @@ Returns a list of input items for a given response. - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -103997,6 +115316,14 @@ Returns a list of input items for a given response. - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -104209,6 +115536,22 @@ Returns a list of input items for a given response. - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -104356,6 +115699,14 @@ Returns a list of input items for a given response. - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -104496,6 +115847,14 @@ Returns a list of input items for a given response. - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -104560,16 +115919,30 @@ Returns a list of input items for a given response. - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -104670,6 +116043,14 @@ Returns a list of input items for a given response. - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -104735,6 +116116,8 @@ Returns a list of input items for a given response. - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -104830,6 +116213,58 @@ Returns a list of input items for a given response. - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseCompactionItem:` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -105099,6 +116534,26 @@ Returns a list of input items for a given response. - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -105177,6 +116632,26 @@ Returns a list of input items for a given response. - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -105261,6 +116736,26 @@ Returns a list of input items for a given response. - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -105291,6 +116786,26 @@ Returns a list of input items for a given response. - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -105515,7 +117030,10 @@ public final class Main { "content": [ { "text": "text", - "type": "input_text" + "type": "input_text", + "prompt_cache_breakpoint": { + "mode": "explicit" + } } ], "role": "user", @@ -105567,6 +117085,16 @@ public final class Main { - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -105597,6 +117125,16 @@ public final class Main { The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -105609,7 +117147,9 @@ public final class Main { - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -105631,6 +117171,16 @@ public final class Main { The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `system`, or `developer`. @@ -106567,6 +118117,30 @@ public final class Main { - `FUNCTION_CALL_OUTPUT("function_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -106659,7 +118233,7 @@ public final class Main { - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -106667,6 +118241,14 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -106675,6 +118257,10 @@ public final class Main { A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -106740,11 +118326,7 @@ public final class Main { - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -106914,6 +118496,14 @@ public final class Main { - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -107126,6 +118716,22 @@ public final class Main { - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -107273,6 +118879,14 @@ public final class Main { - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -107413,6 +119027,14 @@ public final class Main { - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -107477,16 +119099,30 @@ public final class Main { - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -107587,6 +119223,14 @@ public final class Main { - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The type of the item. Always `tool_search_output`. @@ -107652,6 +119296,8 @@ public final class Main { - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -107747,6 +119393,58 @@ public final class Main { - `INCOMPLETE("incomplete")` + - `Program` + + - `String id` + + The unique ID of the program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The type of the item. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of the program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output item. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The type of the item. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `class ResponseCompactionItem:` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). @@ -108016,6 +119714,26 @@ public final class Main { - `SHELL_CALL("shell_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -108094,6 +119812,26 @@ public final class Main { - `SHELL_CALL_OUTPUT("shell_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The identifier of the actor that created the item. @@ -108178,6 +119916,26 @@ public final class Main { - `APPLY_PATCH_CALL("apply_patch_call")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call. @@ -108208,6 +119966,26 @@ public final class Main { - `APPLY_PATCH_CALL_OUTPUT("apply_patch_call_output")` + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional createdBy` The ID of the entity that created this tool call output. @@ -108427,9 +120205,7 @@ public final class Main { **post** `/responses/input_tokens` -Returns input token counts of the request. - -Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. +Get input token counts ### Parameters @@ -108489,6 +120265,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImage:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). @@ -108519,6 +120305,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFile:` A file input to the model. @@ -108531,7 +120327,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -108553,6 +120351,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `Role role` The role of the message input. One of `user`, `assistant`, `system`, or @@ -109484,6 +121292,26 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the function tool call. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the function to run. @@ -109527,6 +121355,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `INPUT_TEXT("input_text")` + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputImageContent:` An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) @@ -109557,6 +121395,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `class ResponseInputFileContent:` A file input to the model. @@ -109569,7 +121417,9 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Optional detail` - The detail level of the file to be sent to the model. Use `low` for the default rendering behavior, or `high` to render the file at higher quality. Defaults to `low`. + The detail level of the file to be sent to the model. Use `auto` to let the system select the detail level; for GPT-5.6 and later models, `auto` uses high-quality rendering, which may increase input token usage. Use `low` for lower-cost rendering, or `high` to render the file at higher quality. Defaults to `auto`. + + - `AUTO("auto")` - `LOW("low")` @@ -109591,6 +121441,16 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The name of the file to be sent to the model. + - `Optional promptCacheBreakpoint` + + 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. + + - `JsonValue; mode "explicit"constant` + + The breakpoint mode. Always `explicit`. + + - `EXPLICIT("explicit")` + - `JsonValue; type "function_call_output"constant` The type of the function tool call output. Always `function_call_output`. @@ -109601,6 +121461,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the function tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional status` The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. @@ -109669,7 +121553,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `Optional strict` - Whether to enforce strict parameter validation. Default `true`. + Whether strict parameter validation is enforced for this function tool. - `JsonValue; type "function"constant` @@ -109677,6 +121561,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function is deferred and loaded via tool search. @@ -109685,6 +121577,10 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok A description of the function. Used by the model to determine whether or not to call the function. + - `Optional outputSchema` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + - `class FileSearchTool:` A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search). @@ -109750,11 +121646,7 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `boolean` - - `List` - - - `String` - - - `double` + - `List` - `class CompoundFilter:` @@ -109924,6 +121816,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `MCP("mcp")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional allowedTools` List of allowed tool names or a filter object. @@ -110136,6 +122036,22 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `CODE_INTERPRETER("code_interpreter")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The type of the tool. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `ImageGeneration` - `JsonValue; type "image_generation"constant` @@ -110283,6 +122199,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `SHELL("shell")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional environment` - `class ContainerAuto:` @@ -110423,6 +122347,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `CUSTOM("custom")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this tool should be deferred and discovered via tool search. @@ -110487,16 +122419,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `FUNCTION("function")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `Optional deferLoading` Whether this function should be deferred and discovered via tool search. - `Optional description` + - `Optional outputSchema` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + - `Optional parameters` - `Optional strict` + Whether to enforce strict parameter validation. If omitted, Responses attempts to use strict validation when the schema is compatible, and falls back to non-strict validation otherwise. + - `class CustomTool:` A custom tool that processes input using a specified format. Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools) @@ -110597,6 +122543,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `APPLY_PATCH("apply_patch")` + - `Optional> allowedCallers` + + The tool invocation context(s). + + - `DIRECT("direct")` + + - `PROGRAMMATIC("programmatic")` + - `JsonValue; type "tool_search_output"constant` The item type. Always `tool_search_output`. @@ -110666,6 +122620,8 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;` @@ -110994,6 +122950,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the shell tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional environment` The environment to execute the shell commands in. @@ -111066,6 +123046,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the shell tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional maxOutputLength` The maximum number of UTF-8 characters captured for this shell call's combined output. @@ -111158,6 +123162,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `ApplyPatchCallOutput` - `String callId` @@ -111182,6 +123210,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the apply patch tool call output. Populated when this item is returned via API. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `Optional output` Optional human-readable log text from the apply patch tool (e.g., patch results or errors). @@ -111364,6 +123416,30 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the custom tool call output in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + The caller type. Always `direct`. + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + The caller type. Always `program`. + + - `PROGRAM("program")` + - `class ResponseCustomToolCall:` A call to a custom tool created by the model. @@ -111390,6 +123466,26 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok The unique ID of the custom tool call in the OpenAI platform. + - `Optional caller` + + The execution context that produced this tool call. + + - `JsonValue;` + + - `JsonValue; type "direct"constant` + + - `DIRECT("direct")` + + - `class Program:` + + - `String callerId` + + The call ID of the program item that produced this tool call. + + - `JsonValue; type "program"constant` + + - `PROGRAM("program")` + - `Optional namespace` The namespace of the custom tool being called. @@ -111414,6 +123510,58 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `ITEM_REFERENCE("item_reference")` + - `Program` + + - `String id` + + The unique ID of this program item. + + - `String callId` + + The stable call ID of the program item. + + - `String code` + + The JavaScript source executed by programmatic tool calling. + + - `String fingerprint` + + Opaque program replay fingerprint that must be round-tripped. + + - `JsonValue; type "program"constant` + + The item type. Always `program`. + + - `PROGRAM("program")` + + - `ProgramOutput` + + - `String id` + + The unique ID of this program output item. + + - `String callId` + + The call ID of the program item. + + - `String result` + + The result produced by the program item. + + - `Status status` + + The terminal status of the program output. + + - `COMPLETED("completed")` + + - `INCOMPLETE("incomplete")` + + - `JsonValue; type "program_output"constant` + + The item type. Always `program_output`. + + - `PROGRAM_OUTPUT("program_output")` + - `Optional instructions` A system (or developer) message inserted into the model's context. @@ -111676,6 +123824,14 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `CUSTOM("custom")` + - `JsonValue;` + + - `JsonValue; type "programmatic_tool_calling"constant` + + The tool to call. Always `programmatic_tool_calling`. + + - `PROGRAMMATIC_TOOL_CALLING("programmatic_tool_calling")` + - `class ToolChoiceApplyPatch:` Forces the model to call the apply_patch tool when executing a tool call. @@ -111725,6 +123881,8 @@ Returns an object with `object` set to `response.input_tokens` and an `input_tok - `CodeInterpreter` + - `JsonValue;` + - `ImageGeneration` - `JsonValue;`