diff --git a/en/go/resources/beta/subresources/responses/index.md b/en/go/resources/beta/subresources/responses/index.md index 367d2ac9..06a178c5 100644 --- a/en/go/resources/beta/subresources/responses/index.md +++ b/en/go/resources/beta/subresources/responses/index.md @@ -6,7 +6,13 @@ **post** `/responses?beta=true` -Create a model response +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. ### Parameters @@ -242,6 +248,8 @@ Create a model response - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -489,6 +497,8 @@ Create a model response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -1669,7 +1679,11 @@ Create a model response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -1726,7 +1740,11 @@ Create a model response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -4874,6 +4892,8 @@ Create a model response - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -5121,6 +5141,8 @@ Create a model response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -6301,7 +6323,11 @@ Create a model response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -6358,7 +6384,11 @@ Create a model response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -11048,14 +11078,13 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { client := openai.NewClient( option.WithAPIKey("My API Key"), ) - betaResponse, err := client.Beta.Responses.New(context.TODO(), responses.BetaResponseNewParams{ + betaResponse, err := client.Beta.Responses.New(context.TODO(), openai.BetaResponseNewParams{ }) if err != nil { @@ -11246,7 +11275,7 @@ func main() { **get** `/responses/{response_id}?beta=true` -Get a model response +Retrieves a model response with the given ID. ### Parameters @@ -11537,6 +11566,8 @@ Get a model response - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -11784,6 +11815,8 @@ Get a model response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -12964,7 +12997,11 @@ Get a model response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -13021,7 +13058,11 @@ Get a model response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -17711,7 +17752,6 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { @@ -17721,7 +17761,7 @@ func main() { betaResponse, err := client.Beta.Responses.Get( context.TODO(), "resp_677efb5139a88190b512bc3fef8e535d", - responses.BetaResponseGetParams{ + openai.BetaResponseGetParams{ }, ) @@ -17913,7 +17953,7 @@ func main() { **delete** `/responses/{response_id}?beta=true` -Delete a model response +Deletes a model response with the given ID. ### Parameters @@ -17937,7 +17977,6 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { @@ -17947,7 +17986,7 @@ func main() { err := client.Beta.Responses.Delete( context.TODO(), "resp_677efb5139a88190b512bc3fef8e535d", - responses.BetaResponseDeleteParams{ + openai.BetaResponseDeleteParams{ }, ) @@ -17963,7 +18002,9 @@ func main() { **post** `/responses/{response_id}/cancel?beta=true` -Cancel a response +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). ### Parameters @@ -18217,6 +18258,8 @@ Cancel a response - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -18464,6 +18507,8 @@ Cancel a response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -19644,7 +19689,11 @@ Cancel a response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -19701,7 +19750,11 @@ Cancel a response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -24391,7 +24444,6 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { @@ -24401,7 +24453,7 @@ func main() { betaResponse, err := client.Beta.Responses.Cancel( context.TODO(), "resp_677efb5139a88190b512bc3fef8e535d", - responses.BetaResponseCancelParams{ + openai.BetaResponseCancelParams{ }, ) @@ -24593,7 +24645,9 @@ func main() { **post** `/responses/compact?beta=true` -Compact a response +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). ### Parameters @@ -24960,6 +25014,8 @@ Compact a response - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -25207,6 +25263,8 @@ Compact a response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -26387,7 +26445,11 @@ Compact a response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -26444,7 +26506,11 @@ Compact a response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -28858,6 +28924,8 @@ Compact a response - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -30231,7 +30299,11 @@ Compact a response - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -30288,7 +30360,11 @@ Compact a response - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -32265,15 +32341,14 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { client := openai.NewClient( option.WithAPIKey("My API Key"), ) - betaCompactedResponse, err := client.Beta.Responses.Compact(context.TODO(), responses.BetaResponseCompactParams{ - Model: responses.BetaResponseCompactParamsModelGPT5_6Sol, + betaCompactedResponse, err := client.Beta.Responses.Compact(context.TODO(), openai.BetaResponseCompactParams{ + Model: openai.BetaResponseCompactParamsModelGPT5_6Sol, }) if err != nil { panic(err.Error()) @@ -32587,6 +32662,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -33960,7 +34037,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -34017,7 +34098,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -36837,6 +36922,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -36910,7 +36997,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -36967,7 +37058,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -37695,6 +37790,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -37942,6 +38039,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -39122,7 +39221,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -39179,7 +39282,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -44693,6 +44800,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -44940,6 +45049,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -46120,7 +46231,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -46177,7 +46292,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -52204,6 +52323,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -52451,6 +52572,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -53631,7 +53754,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -53688,7 +53815,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -59074,6 +59205,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -59321,6 +59454,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -60501,7 +60636,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -60558,7 +60697,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -66872,6 +67015,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -67119,6 +67264,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -68299,7 +68446,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -68356,7 +68507,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -73330,6 +73485,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -73577,6 +73734,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -74757,7 +74916,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -74814,7 +74977,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -79511,12 +79678,43 @@ func main() { The canonical name of the agent that produced this item. -### Beta Response Input +### Beta Response Inject Created Event -- `type BetaResponseInput []BetaResponseInputItemUnion` +- `type BetaResponseInjectCreatedEvent struct{…}` - A list of one or many input items to the model, containing - different content types. + Emitted when all injected input items were validated and committed to the + active response. + + - `ResponseID string` + + The ID of the response that accepted the input. + + - `SequenceNumber int64` + + The sequence number for this event. + + - `Type ResponseInjectCreated` + + The event discriminator. Always `response.inject.created`. + + - `const ResponseInjectCreatedResponseInjectCreated ResponseInjectCreated = "response.inject.created"` + + - `StreamID string` + + The multiplexed WebSocket stream that emitted the event. This field is + present only when WebSocket multiplexing is enabled separately. + +### Beta Response Inject Event + +- `type BetaResponseInjectEvent struct{…}` + + Injects input items into an active response over a WebSocket connection. + The items are validated and committed atomically. Currently, the server + accepts client-owned tool outputs that resume a waiting agent. + + - `Input []BetaResponseInputItemUnion` + + Input items to inject into the active response. - `type BetaEasyInputMessage struct{…}` @@ -79669,6 +79867,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -79916,6 +80116,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -81096,7 +81298,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -81153,7 +81359,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -83293,338 +83503,43 @@ func main() { The canonical name of the agent that produced this item. -### Beta Response Input Audio - -- `type BetaResponseInputAudio struct{…}` - - An audio input to the model. - - - `InputAudio BetaResponseInputAudioInputAudio` - - - `Data string` - - Base64-encoded audio data. - - - `Format string` - - The format of the audio data. Currently supported formats are `mp3` and - `wav`. - - - `const BetaResponseInputAudioInputAudioFormatMP3 BetaResponseInputAudioInputAudioFormat = "mp3"` - - - `const BetaResponseInputAudioInputAudioFormatWAV BetaResponseInputAudioInputAudioFormat = "wav"` - - - `Type InputAudio` - - The type of the input item. Always `input_audio`. - - - `const InputAudioInputAudio InputAudio = "input_audio"` - -### Beta Response Input Content - -- `type BetaResponseInputContentUnion interface{…}` - - A text input to the model. - - - `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` - - The content of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - -### Beta Response Input File - -- `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` - - The content of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - -### Beta Response Input File Content - -- `type BetaResponseInputFileContent struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileContentDetail` - - 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`. - - - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"` - - - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"` - - - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"` - - - `FileData string` - - The base64-encoded data of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - -### Beta Response Input Image - -- `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - -### Beta Response Input Image Content - -- `type BetaResponseInputImageContent struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `Detail BetaResponseInputImageContentDetail` + - `ResponseID string` - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + The ID of the active response that should receive the input. - - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"` + - `Type ResponseInject` - - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"` + The event discriminator. Always `response.inject`. - - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"` + - `const ResponseInjectResponseInject ResponseInject = "response.inject"` - - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"` +### Beta Response Inject Failed Event - - `FileID string` +- `type BetaResponseInjectFailedEvent struct{…}` - The ID of the file to be sent to the model. + Emitted when injected input could not be committed to a response. The event + returns the uncommitted raw input so the client can retry it in another + response when appropriate. - - `ImageURL string` + - `Error BetaResponseInjectFailedEventError` - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + Information about why the input was not committed. - - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint` + - `Code string` - 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. + A machine-readable error code. - - `Mode Explicit` + - `const BetaResponseInjectFailedEventErrorCodeResponseAlreadyCompleted BetaResponseInjectFailedEventErrorCode = "response_already_completed"` - The breakpoint mode. Always `explicit`. + - `const BetaResponseInjectFailedEventErrorCodeResponseNotFound BetaResponseInjectFailedEventErrorCode = "response_not_found"` - - `const ExplicitExplicit Explicit = "explicit"` + - `Message string` -### Beta Response Input Item + A human-readable description of the error. -- `type BetaResponseInputItemUnion interface{…}` + - `Input []BetaResponseInputItemUnion` - A message input to the model with a role indicating instruction following - hierarchy. Instructions given with the `developer` or `system` role take - precedence over instructions given with the `user` role. Messages with the - `assistant` role are presumed to have been generated by the model in previous - interactions. + The raw input items that were not committed. - `type BetaEasyInputMessage struct{…}` @@ -83777,6 +83692,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -84024,6 +83941,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -85204,7 +85123,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -85261,7 +85184,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -87401,132 +87328,48 @@ func main() { The canonical name of the agent that produced this item. -### Beta Response Input Message Content List - -- `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` - - A list of one or many input items to the model, containing different content - types. - - - `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` + - `ResponseID string` - The content of the file to be sent to the model. + The ID of the response that rejected the input. - - `FileID string` + - `SequenceNumber int64` - The ID of the file to be sent to the model. + The sequence number for this event. - - `FileURL string` + - `Type ResponseInjectFailed` - The URL of the file to be sent to the model. + The event discriminator. Always `response.inject.failed`. - - `Filename string` + - `const ResponseInjectFailedResponseInjectFailed ResponseInjectFailed = "response.inject.failed"` - The name of the file to be sent to the model. + - `StreamID string` - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + The multiplexed WebSocket stream that emitted the event. This field is + present only when WebSocket multiplexing is enabled separately. - 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. +### Beta Response Input - - `Mode Explicit` +- `type BetaResponseInput []BetaResponseInputItemUnion` - The breakpoint mode. Always `explicit`. + A list of one or many input items to the model, containing + different content types. - - `const ExplicitExplicit Explicit = "explicit"` + - `type BetaEasyInputMessage struct{…}` -### Beta Response Input Message Item + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. Messages with the + `assistant` role are presumed to have been generated by the model in previous + interactions. -- `type BetaResponseInputMessageItem struct{…}` + - `Content BetaEasyInputMessageContentUnion` - - `ID string` + Text, image, or audio input to the model, used to generate a response. + Can also contain previous assistant responses. - The unique ID of the message input. + - `string` - - `Content BetaResponseInputMessageContentList` + - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` A list of one or many input items to the model, containing different content types. @@ -87641,237 +87484,57 @@ func main() { - `const ExplicitExplicit Explicit = "explicit"` - - `Role BetaResponseInputMessageItemRole` - - The role of the message input. One of `user`, `system`, or `developer`. - - - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"` - - - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"` - - - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"` - - - `Type Message` - - The type of the message input. Always set to `message`. - - - `const MessageMessage Message = "message"` - - - `Agent BetaResponseInputMessageItemAgent` - - The agent that produced this item. - - - `AgentName string` - - The canonical name of the agent that produced this item. - - - `Status BetaResponseInputMessageItemStatus` - - The status of item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"` - - - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"` - - - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"` - -### Beta Response Input Text - -- `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - -### Beta Response Input Text Content - -- `type BetaResponseInputTextContent struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. + - `Role BetaEasyInputMessageRole` - - `Type InputText` + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. - The type of the input item. Always `input_text`. + - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"` - - `const InputTextInputText InputText = "input_text"` + - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"` - - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint` + - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"` - 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. + - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"` - - `Mode Explicit` + - `Phase BetaEasyInputMessagePhase` - The breakpoint mode. Always `explicit`. + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. - - `const ExplicitExplicit Explicit = "explicit"` + - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` -### Beta Response Item + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` -- `type BetaResponseItemUnion interface{…}` + - `Type BetaEasyInputMessageType` - Content item used to generate a response. + The type of the message input. Always `message`. - - `type BetaResponseInputMessageItem struct{…}` + - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"` - - `ID string` + - `type BetaResponseInputItemMessage struct{…}` - The unique ID of the message input. + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. - `Content BetaResponseInputMessageContentList` A list of one or many input items to the model, containing different content types. - - `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` - - The content of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `Role BetaResponseInputMessageItemRole` + - `Role string` The role of the message input. One of `user`, `system`, or `developer`. - - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"` - - - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"` - - - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"` - - - `Type Message` + - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"` - The type of the message input. Always set to `message`. + - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"` - - `const MessageMessage Message = "message"` + - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"` - - `Agent BetaResponseInputMessageItemAgent` + - `Agent BetaResponseInputItemMessageAgent` The agent that produced this item. @@ -87879,16 +87542,22 @@ func main() { The canonical name of the agent that produced this item. - - `Status BetaResponseInputMessageItemStatus` + - `Status string` The status of item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"` + - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"` - - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"` + - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"` - - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"` + - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"` + + - `Type string` + + The type of the message input. Always set to `message`. + + - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"` - `type BetaResponseOutputMessage struct{…}` @@ -88085,6 +87754,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -88451,11 +88122,9 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseComputerToolCallOutputItem struct{…}` - - - `ID string` + - `type BetaResponseInputItemComputerCallOutput struct{…}` - The unique ID of the computer call tool output. + The output of a computer tool call. - `CallID string` @@ -88480,29 +88149,19 @@ func main() { The URL of the screenshot image. - - `Status BetaResponseComputerToolCallOutputItemStatus` - - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. - - - `const BetaResponseComputerToolCallOutputItemStatusCompleted BetaResponseComputerToolCallOutputItemStatus = "completed"` - - - `const BetaResponseComputerToolCallOutputItemStatusIncomplete BetaResponseComputerToolCallOutputItemStatus = "incomplete"` - - - `const BetaResponseComputerToolCallOutputItemStatusFailed BetaResponseComputerToolCallOutputItemStatus = "failed"` - - - `const BetaResponseComputerToolCallOutputItemStatusInProgress BetaResponseComputerToolCallOutputItemStatus = "in_progress"` - - `Type ComputerCallOutput` The type of the computer tool call output. Always `computer_call_output`. - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"` - - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck` + - `ID string` - The safety checks reported by the API that have been acknowledged by the - developer. + The ID of the computer tool call output. + + - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck` + + The safety checks reported by the API that have been acknowledged by the developer. - `ID string` @@ -88516,7 +88175,7 @@ func main() { Details about the pending safety check. - - `Agent BetaResponseComputerToolCallOutputItemAgent` + - `Agent BetaResponseInputItemComputerCallOutputAgent` The agent that produced this item. @@ -88524,9 +88183,15 @@ func main() { The canonical name of the agent that produced this item. - - `CreatedBy string` + - `Status string` - The identifier of the actor that created the item. + The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"` + + - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"` + + - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"` - `type BetaResponseFunctionWebSearch struct{…}` @@ -88632,229 +88297,277 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseFunctionToolCallItem struct{…}` + - `type BetaResponseFunctionToolCall struct{…}` A tool call to run a function. See the [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + - `Arguments string` + + A JSON string of the arguments to pass to the function. + + - `CallID string` + + The unique ID of the function tool call generated by the model. + + - `Name string` + + The name of the function to run. + + - `Type FunctionCall` + + The type of the function tool call. Always `function_call`. + + - `const FunctionCallFunctionCall FunctionCall = "function_call"` + - `ID string` The unique ID of the function tool call. - - `Status string` + - `Agent BetaResponseFunctionToolCallAgent` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + The agent that produced this item. - - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"` + - `AgentName string` - - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"` + The canonical name of the agent that produced this item. - - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"` + - `Caller BetaResponseFunctionToolCallCallerUnion` - - `CreatedBy string` + The execution context that produced this tool call. - The identifier of the actor that created the item. + - `type BetaResponseFunctionToolCallCallerDirect struct{…}` - - `type BetaResponseFunctionToolCallOutputItem struct{…}` + - `Type Direct` - - `ID string` + - `const DirectDirect Direct = "direct"` - The unique ID of the function call tool output. + - `type BetaResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `Namespace string` + + The namespace of the function to run. + + - `Status BetaResponseFunctionToolCallStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"` + + - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"` + + - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"` + + - `type BetaResponseInputItemFunctionCallOutput struct{…}` + + The output of a function tool call. - `CallID string` The unique ID of the function tool call generated by the model. - - `Output BetaResponseFunctionToolCallOutputItemOutputUnion` + - `Output BetaResponseInputItemFunctionCallOutputOutputUnion` - The output from the function call generated by your code. - Can be a string or an list of output content. + Text, image, or file output of the function tool call. - `string` - - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion` + - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion` - Text, image, or file output of the function call. + An array of content outputs (text, image, file) for the function tool call. - - `type BetaResponseInputText struct{…}` + - `type BetaResponseInputTextContent struct{…}` A text input to the model. - - `type BetaResponseInputImage struct{…}` + - `Text string` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + The text input to the model. - - `type BetaResponseInputFile struct{…}` + - `Type InputText` - A file input to the model. + The type of the input item. Always `input_text`. - - `Status BetaResponseFunctionToolCallOutputItemStatus` + - `const InputTextInputText InputText = "input_text"` - The status of the item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. + - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint` - - `const BetaResponseFunctionToolCallOutputItemStatusInProgress BetaResponseFunctionToolCallOutputItemStatus = "in_progress"` + 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. - - `const BetaResponseFunctionToolCallOutputItemStatusCompleted BetaResponseFunctionToolCallOutputItemStatus = "completed"` + - `Mode Explicit` - - `const BetaResponseFunctionToolCallOutputItemStatusIncomplete BetaResponseFunctionToolCallOutputItemStatus = "incomplete"` + The breakpoint mode. Always `explicit`. - - `Type FunctionCallOutput` + - `const ExplicitExplicit Explicit = "explicit"` - The type of the function tool call output. Always `function_call_output`. + - `type BetaResponseInputImageContent struct{…}` - - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) - - `Agent BetaResponseFunctionToolCallOutputItemAgent` + - `Type InputImage` - The agent that produced this item. + The type of the input item. Always `input_image`. - - `AgentName string` + - `const InputImageInputImage InputImage = "input_image"` - The canonical name of the agent that produced this item. + - `Detail BetaResponseInputImageContentDetail` - - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion` + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - The execution context that produced this tool call. + - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"` - - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}` + - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"` - - `Type Direct` + - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"` - The caller type. Always `direct`. + - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"` - - `const DirectDirect Direct = "direct"` + - `FileID string` - - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}` + The ID of the file to be sent to the model. - - `CallerID string` + - `ImageURL string` - The call ID of the program item that produced this tool call. + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - `Type Program` + - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint` - The caller type. Always `program`. + 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. - - `const ProgramProgram Program = "program"` + - `Mode Explicit` - - `CreatedBy string` + The breakpoint mode. Always `explicit`. - The identifier of the actor that created the item. + - `const ExplicitExplicit Explicit = "explicit"` - - `type BetaResponseItemAgentMessage struct{…}` + - `type BetaResponseInputFileContent struct{…}` - - `ID string` + A file input to the model. - The unique ID of the agent message. + - `Type InputFile` - - `Author string` + The type of the input item. Always `input_file`. - The sending agent identity. + - `const InputFileInputFile InputFile = "input_file"` - - `Content []BetaResponseItemAgentMessageContentUnion` + - `Detail BetaResponseInputFileContentDetail` - Encrypted content sent between agents. + 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`. - - `type BetaResponseInputText struct{…}` + - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"` - A text input to the model. + - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"` - - `type BetaResponseOutputText struct{…}` + - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"` - A text output from the model. + - `FileData string` - - `type BetaResponseItemAgentMessageContentText struct{…}` + The base64-encoded data of the file to be sent to the model. - A text content. + - `FileID string` - - `Text string` + The ID of the file to be sent to the model. - - `Type Text` + - `FileURL string` - - `const TextText Text = "text"` + The URL of the file to be sent to the model. - - `type BetaResponseItemAgentMessageContentSummaryText struct{…}` + - `Filename string` - A summary text from the model. + The name of the file to be sent to the model. - - `Text string` + - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint` - A summary of the reasoning output from the model so far. + 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. - - `Type SummaryText` + - `Mode Explicit` - The type of the object. Always `summary_text`. + The breakpoint mode. Always `explicit`. - - `const SummaryTextSummaryText SummaryText = "summary_text"` + - `const ExplicitExplicit Explicit = "explicit"` - - `type BetaResponseItemAgentMessageContentReasoningText struct{…}` + - `Type FunctionCallOutput` - Reasoning text from the model. + The type of the function tool call output. Always `function_call_output`. - - `Text string` + - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` - The reasoning text from the model. + - `ID string` - - `Type ReasoningText` + The unique ID of the function tool call output. Populated when this item is returned via API. - The type of the reasoning text. Always `reasoning_text`. + - `Agent BetaResponseInputItemFunctionCallOutputAgent` - - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"` + The agent that produced this item. - - `type BetaResponseOutputRefusal struct{…}` + - `AgentName string` - A refusal from the model. + The canonical name of the agent that produced this item. - - `type BetaResponseInputImage struct{…}` + - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion` - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + The execution context that produced this tool call. - - `type BetaResponseItemAgentMessageContentComputerScreenshot struct{…}` + - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}` - A screenshot of a computer. + - `Type Direct` - - `Detail string` + The caller type. Always `direct`. - The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + - `const DirectDirect Direct = "direct"` - - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailLow BetaResponseItemAgentMessageContentComputerScreenshotDetail = "low"` + - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}` - - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseItemAgentMessageContentComputerScreenshotDetail = "high"` + - `CallerID string` - - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseItemAgentMessageContentComputerScreenshotDetail = "auto"` + The call ID of the program item that produced this tool call. - - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseItemAgentMessageContentComputerScreenshotDetail = "original"` + - `Type Program` - - `FileID string` + The caller type. Always `program`. - The identifier of an uploaded file that contains the screenshot. + - `const ProgramProgram Program = "program"` - - `ImageURL string` + - `Status string` - The URL of the screenshot image. + The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. - - `Type ComputerScreenshot` + - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"` - Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"` - - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"` + - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"` - - `PromptCacheBreakpoint BetaResponseItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint` + - `type BetaResponseInputItemAgentMessage struct{…}` - 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. + A message routed between agents. - - `Mode Explicit` + - `Author string` - The breakpoint mode. Always `explicit`. + The sending agent identity. - - `const ExplicitExplicit Explicit = "explicit"` + - `Content []BetaResponseInputItemAgentMessageContentUnion` - - `type BetaResponseInputFile struct{…}` + Plaintext, image, or encrypted content sent between agents. - A file input to the model. + - `type BetaResponseInputTextContent struct{…}` - - `type BetaResponseItemAgentMessageContentEncryptedContent struct{…}` + A text input to the model. + + - `type BetaResponseInputImageContent struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + + - `type BetaResponseInputItemAgentMessageContentEncryptedContent struct{…}` Opaque encrypted content that Responses API decrypts inside trusted model execution. @@ -88874,11 +88587,15 @@ func main() { - `Type AgentMessage` - The type of the item. Always `agent_message`. + The item type. Always `agent_message`. - `const AgentMessageAgentMessage AgentMessage = "agent_message"` - - `Agent BetaResponseItemAgentMessageAgent` + - `ID string` + + The unique ID of this agent message item. + + - `Agent BetaResponseInputItemAgentMessageAgent` The agent that produced this item. @@ -88886,31 +88603,27 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseItemMultiAgentCall struct{…}` - - - `ID string` - - The unique ID of the multi-agent call item. + - `type BetaResponseInputItemMultiAgentCall struct{…}` - `Action string` - The multi-agent action to execute. + The multi-agent action that was executed. - - `const BetaResponseItemMultiAgentCallActionSpawnAgent BetaResponseItemMultiAgentCallAction = "spawn_agent"` + - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"` - - `const BetaResponseItemMultiAgentCallActionInterruptAgent BetaResponseItemMultiAgentCallAction = "interrupt_agent"` + - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"` - - `const BetaResponseItemMultiAgentCallActionListAgents BetaResponseItemMultiAgentCallAction = "list_agents"` + - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"` - - `const BetaResponseItemMultiAgentCallActionSendMessage BetaResponseItemMultiAgentCallAction = "send_message"` + - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"` - - `const BetaResponseItemMultiAgentCallActionFollowupTask BetaResponseItemMultiAgentCallAction = "followup_task"` + - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"` - - `const BetaResponseItemMultiAgentCallActionWaitAgent BetaResponseItemMultiAgentCallAction = "wait_agent"` + - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"` - `Arguments string` - The JSON string of arguments generated for the action. + The action arguments as a JSON string. - `CallID string` @@ -88918,11 +88631,15 @@ func main() { - `Type MultiAgentCall` - The type of the multi-agent call. Always `multi_agent_call`. + The item type. Always `multi_agent_call`. - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"` - - `Agent BetaResponseItemMultiAgentCallAgent` + - `ID string` + + The unique ID of this multi-agent call. + + - `Agent BetaResponseInputItemMultiAgentCallAgent` The agent that produced this item. @@ -88930,103 +88647,129 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseItemMultiAgentCallOutput struct{…}` - - - `ID string` - - The unique ID of the multi-agent call output item. + - `type BetaResponseInputItemMultiAgentCallOutput struct{…}` - `Action string` The multi-agent action that produced this result. - - `const BetaResponseItemMultiAgentCallOutputActionSpawnAgent BetaResponseItemMultiAgentCallOutputAction = "spawn_agent"` + - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"` - - `const BetaResponseItemMultiAgentCallOutputActionInterruptAgent BetaResponseItemMultiAgentCallOutputAction = "interrupt_agent"` + - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"` - - `const BetaResponseItemMultiAgentCallOutputActionListAgents BetaResponseItemMultiAgentCallOutputAction = "list_agents"` + - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"` - - `const BetaResponseItemMultiAgentCallOutputActionSendMessage BetaResponseItemMultiAgentCallOutputAction = "send_message"` + - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"` - - `const BetaResponseItemMultiAgentCallOutputActionFollowupTask BetaResponseItemMultiAgentCallOutputAction = "followup_task"` + - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"` - - `const BetaResponseItemMultiAgentCallOutputActionWaitAgent BetaResponseItemMultiAgentCallOutputAction = "wait_agent"` + - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"` - `CallID string` The unique ID of the multi-agent call. - - `Output []BetaResponseOutputText` + - `Output []BetaResponseInputItemMultiAgentCallOutputOutput` Text output returned by the multi-agent action. - - `Annotations []BetaResponseOutputTextAnnotationUnion` - - The annotations of the text output. - - `Text string` - The text output from the model. + The text content. - `Type OutputText` - The type of the output text. Always `output_text`. + The content type. Always `output_text`. - - `Logprobs []BetaResponseOutputTextLogprob` + - `const OutputTextOutputText OutputText = "output_text"` - - `Type MultiAgentCallOutput` + - `Annotations BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsUnion` - The type of the multi-agent result. Always `multi_agent_call_output`. + Citations associated with the text content. - - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"` + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArrayItem` - - `Agent BetaResponseItemMultiAgentCallOutputAgent` + - `FileID string` - The agent that produced this item. + The ID of the file. - - `AgentName string` + - `Filename string` - The canonical name of the agent that produced this item. + The filename of the file cited. - - `type BetaResponseToolSearchCall struct{…}` + - `Index int64` - - `ID string` + The index of the file in the list of files. - The unique ID of the tool search call item. + - `Type FileCitation` - - `Arguments any` + The citation type. Always `file_citation`. - Arguments used for the tool search call. + - `const FileCitationFileCitation FileCitation = "file_citation"` - - `CallID string` + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray2 []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray2Item` - The unique ID of the tool search call generated by the model. + - `EndIndex int64` - - `Execution BetaResponseToolSearchCallExecution` + The index of the last character of the citation in the message. - Whether tool search was executed by the server or by the client. + - `StartIndex int64` - - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"` + The index of the first character of the citation in the message. - - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"` + - `Title string` - - `Status BetaResponseToolSearchCallStatus` + The title of the cited resource. - The status of the tool search call item that was recorded. + - `Type URLCitation` - - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"` + The citation type. Always `url_citation`. - - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"` + - `const URLCitationURLCitation URLCitation = "url_citation"` - - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"` + - `URL string` - - `Type ToolSearchCall` + The URL of the cited resource. - The type of the item. Always `tool_search_call`. + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray3 []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray3Item` - - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"` + - `ContainerID string` - - `Agent BetaResponseToolSearchCallAgent` + The ID of the container. + + - `EndIndex int64` + + The index of the last character of the citation in the message. + + - `FileID string` + + The ID of the container file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the citation in the message. + + - `Type ContainerFileCitation` + + The citation type. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `Type MultiAgentCallOutput` + + The item type. Always `multi_agent_call_output`. + + - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"` + + - `ID string` + + The unique ID of this multi-agent call output. + + - `Agent BetaResponseInputItemMultiAgentCallOutputAgent` The agent that produced this item. @@ -89034,41 +88777,57 @@ func main() { The canonical name of the agent that produced this item. - - `CreatedBy string` + - `type BetaResponseInputItemToolSearchCall struct{…}` - The identifier of the actor that created the item. + - `Arguments any` - - `type BetaResponseToolSearchOutputItem struct{…}` + The arguments supplied to the tool search call. + + - `Type ToolSearchCall` + + The item type. Always `tool_search_call`. + + - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"` - `ID string` - The unique ID of the tool search output item. + The unique ID of this tool search call. + + - `Agent BetaResponseInputItemToolSearchCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. - `CallID string` The unique ID of the tool search call generated by the model. - - `Execution BetaResponseToolSearchOutputItemExecution` + - `Execution string` Whether tool search was executed by the server or by the client. - - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"` + - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"` - - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"` + - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"` - - `Status BetaResponseToolSearchOutputItemStatus` + - `Status string` - The status of the tool search output item that was recorded. + The status of the tool search call. - - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"` + - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"` - - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"` + - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"` - - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"` + - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"` + + - `type BetaResponseToolSearchOutputItemParamResp struct{…}` - `Tools []BetaToolUnion` - The loaded tool definitions returned by tool search. + The loaded tool definitions returned by the tool search output. - `type BetaFunctionTool struct{…}` @@ -89177,7 +88936,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -89234,7 +88997,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -90150,11 +89917,15 @@ func main() { - `Type ToolSearchOutput` - The type of the item. Always `tool_search_output`. + The item type. Always `tool_search_output`. - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"` - - `Agent BetaResponseToolSearchOutputItemAgent` + - `ID string` + + The unique ID of this tool search output. + + - `Agent BetaResponseToolSearchOutputItemParamAgentResp` The agent that produced this item. @@ -90162,39 +89933,39 @@ func main() { The canonical name of the agent that produced this item. - - `CreatedBy string` + - `CallID string` - The identifier of the actor that created the item. + The unique ID of the tool search call generated by the model. - - `type BetaResponseItemAdditionalTools struct{…}` + - `Execution BetaResponseToolSearchOutputItemParamExecution` - - `ID string` + Whether tool search was executed by the server or by the client. - The unique ID of the additional tools item. + - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"` - - `Role string` + - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"` - The role that provided the additional tools. + - `Status BetaResponseToolSearchOutputItemParamStatus` - - `const BetaResponseItemAdditionalToolsRoleUnknown BetaResponseItemAdditionalToolsRole = "unknown"` + The status of the tool search output. - - `const BetaResponseItemAdditionalToolsRoleUser BetaResponseItemAdditionalToolsRole = "user"` + - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"` - - `const BetaResponseItemAdditionalToolsRoleAssistant BetaResponseItemAdditionalToolsRole = "assistant"` + - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"` - - `const BetaResponseItemAdditionalToolsRoleSystem BetaResponseItemAdditionalToolsRole = "system"` + - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"` - - `const BetaResponseItemAdditionalToolsRoleCritic BetaResponseItemAdditionalToolsRole = "critic"` + - `type BetaResponseInputItemAdditionalTools struct{…}` - - `const BetaResponseItemAdditionalToolsRoleDiscriminator BetaResponseItemAdditionalToolsRole = "discriminator"` + - `Role Developer` - - `const BetaResponseItemAdditionalToolsRoleDeveloper BetaResponseItemAdditionalToolsRole = "developer"` + The role that provided the additional tools. Only `developer` is supported. - - `const BetaResponseItemAdditionalToolsRoleTool BetaResponseItemAdditionalToolsRole = "tool"` + - `const DeveloperDeveloper Developer = "developer"` - `Tools []BetaToolUnion` - The additional tool definitions made available at this item. + A list of additional tools made available at this item. - `type BetaFunctionTool struct{…}` @@ -90262,11 +90033,15 @@ func main() { - `Type AdditionalTools` - The type of the item. Always `additional_tools`. + The item type. Always `additional_tools`. - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"` - - `Agent BetaResponseItemAdditionalToolsAgent` + - `ID string` + + The unique ID of this additional tools item. + + - `Agent BetaResponseInputItemAdditionalToolsAgent` The agent that produced this item. @@ -90343,85 +90118,13 @@ func main() { - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"` - - `type BetaResponseItemProgram struct{…}` - - - `ID string` - - The unique ID of the program item. - - - `CallID string` - - The stable call ID of the program item. - - - `Code string` - - The JavaScript source executed by programmatic tool calling. - - - `Fingerprint string` - - Opaque program replay fingerprint that must be round-tripped. - - - `Type Program` - - The type of the item. Always `program`. - - - `const ProgramProgram Program = "program"` - - - `Agent BetaResponseItemProgramAgent` - - The agent that produced this item. - - - `AgentName string` - - The canonical name of the agent that produced this item. - - - `type BetaResponseItemProgramOutput struct{…}` - - - `ID string` - - The unique ID of the program output item. - - - `CallID string` - - The call ID of the program item. - - - `Result string` - - The result produced by the program item. - - - `Status string` - - The terminal status of the program output item. - - - `const BetaResponseItemProgramOutputStatusCompleted BetaResponseItemProgramOutputStatus = "completed"` - - - `const BetaResponseItemProgramOutputStatusIncomplete BetaResponseItemProgramOutputStatus = "incomplete"` - - - `Type ProgramOutput` - - The type of the item. Always `program_output`. - - - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` - - - `Agent BetaResponseItemProgramOutputAgent` - - The agent that produced this item. - - - `AgentName string` - - The canonical name of the agent that produced this item. - - - `type BetaResponseCompactionItem struct{…}` + - `type BetaResponseCompactionItemParamResp struct{…}` A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). - - `ID string` - - The unique ID of the compaction item. - - `EncryptedContent string` - The encrypted content that was produced by compaction. + The encrypted content of the compaction summary. - `Type Compaction` @@ -90429,7 +90132,11 @@ func main() { - `const CompactionCompaction Compaction = "compaction"` - - `Agent BetaResponseCompactionItemAgent` + - `ID string` + + The ID of the compaction item. + + - `Agent BetaResponseCompactionItemParamAgentResp` The agent that produced this item. @@ -90437,11 +90144,7 @@ func main() { The canonical name of the agent that produced this item. - - `CreatedBy string` - - The identifier of the actor that created the item. - - - `type BetaResponseItemImageGenerationCall struct{…}` + - `type BetaResponseInputItemImageGenerationCall struct{…}` An image generation request made by the model. @@ -90457,13 +90160,13 @@ func main() { The status of the image generation call. - - `const BetaResponseItemImageGenerationCallStatusInProgress BetaResponseItemImageGenerationCallStatus = "in_progress"` + - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"` - - `const BetaResponseItemImageGenerationCallStatusCompleted BetaResponseItemImageGenerationCallStatus = "completed"` + - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"` - - `const BetaResponseItemImageGenerationCallStatusGenerating BetaResponseItemImageGenerationCallStatus = "generating"` + - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"` - - `const BetaResponseItemImageGenerationCallStatusFailed BetaResponseItemImageGenerationCallStatus = "failed"` + - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"` - `Type ImageGenerationCall` @@ -90471,7 +90174,7 @@ func main() { - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"` - - `Agent BetaResponseItemImageGenerationCallAgent` + - `Agent BetaResponseInputItemImageGenerationCallAgent` The agent that produced this item. @@ -90556,7 +90259,7 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseItemLocalShellCall struct{…}` + - `type BetaResponseInputItemLocalShellCall struct{…}` A tool call to run a command on the local shell. @@ -90564,7 +90267,7 @@ func main() { The unique ID of the local shell call. - - `Action BetaResponseItemLocalShellCallAction` + - `Action BetaResponseInputItemLocalShellCallAction` Execute a shell command on the server. @@ -90602,11 +90305,11 @@ func main() { The status of the local shell call. - - `const BetaResponseItemLocalShellCallStatusInProgress BetaResponseItemLocalShellCallStatus = "in_progress"` + - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"` - - `const BetaResponseItemLocalShellCallStatusCompleted BetaResponseItemLocalShellCallStatus = "completed"` + - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"` - - `const BetaResponseItemLocalShellCallStatusIncomplete BetaResponseItemLocalShellCallStatus = "incomplete"` + - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"` - `Type LocalShellCall` @@ -90614,7 +90317,7 @@ func main() { - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"` - - `Agent BetaResponseItemLocalShellCallAgent` + - `Agent BetaResponseInputItemLocalShellCallAgent` The agent that produced this item. @@ -90622,7 +90325,7 @@ func main() { The canonical name of the agent that produced this item. - - `type BetaResponseItemLocalShellCallOutput struct{…}` + - `type BetaResponseInputItemLocalShellCallOutput struct{…}` The output of a local shell tool call. @@ -90640,7 +90343,7 @@ func main() { - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"` - - `Agent BetaResponseItemLocalShellCallOutputAgent` + - `Agent BetaResponseInputItemLocalShellCallOutputAgent` The agent that produced this item. @@ -90652,81 +90355,47 @@ func main() { The status of the item. One of `in_progress`, `completed`, or `incomplete`. - - `const BetaResponseItemLocalShellCallOutputStatusInProgress BetaResponseItemLocalShellCallOutputStatus = "in_progress"` - - - `const BetaResponseItemLocalShellCallOutputStatusCompleted BetaResponseItemLocalShellCallOutputStatus = "completed"` - - - `const BetaResponseItemLocalShellCallOutputStatusIncomplete BetaResponseItemLocalShellCallOutputStatus = "incomplete"` + - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"` - - `type BetaResponseFunctionShellToolCall struct{…}` + - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"` - A tool call that executes one or more shell commands in a managed environment. + - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"` - - `ID string` + - `type BetaResponseInputItemShellCall struct{…}` - The unique ID of the shell tool call. Populated when this item is returned via API. + A tool representing a request to execute one or more shell commands. - - `Action BetaResponseFunctionShellToolCallAction` + - `Action BetaResponseInputItemShellCallAction` The shell commands and limits that describe how to run the tool call. - `Commands []string` + Ordered shell commands for the execution environment to run. + - `MaxOutputLength int64` - Optional maximum number of characters to return from each command. + Maximum number of UTF-8 characters to capture from combined stdout and stderr output. - `TimeoutMs int64` - Optional timeout in milliseconds for the commands. + Maximum wall-clock time in milliseconds to allow the shell commands to run. - `CallID string` The unique ID of the shell tool call generated by the model. - - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion` - - Represents the use of a local environment to perform shell actions. - - - `type BetaResponseLocalEnvironment struct{…}` - - Represents the use of a local environment to perform shell actions. - - - `Type Local` - - The environment type. Always `local`. - - - `const LocalLocal Local = "local"` - - - `type BetaResponseContainerReference struct{…}` - - Represents a container created with /v1/containers. - - - `ContainerID string` - - - `Type ContainerReference` - - The environment type. Always `container_reference`. - - - `const ContainerReferenceContainerReference ContainerReference = "container_reference"` - - - `Status BetaResponseFunctionShellToolCallStatus` - - The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"` - - - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"` - - - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"` - - `Type ShellCall` The type of the item. Always `shell_call`. - `const ShellCallShellCall ShellCall = "shell_call"` - - `Agent BetaResponseFunctionShellToolCallAgent` + - `ID string` + + The unique ID of the shell tool call. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemShellCallAgent` The agent that produced this item. @@ -90734,17 +90403,19 @@ func main() { The canonical name of the agent that produced this item. - - `Caller BetaResponseFunctionShellToolCallCallerUnion` + - `Caller BetaResponseInputItemShellCallCallerUnion` The execution context that produced this tool call. - - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}` + - `type BetaResponseInputItemShellCallCallerDirect struct{…}` - `Type Direct` + The caller type. Always `direct`. + - `const DirectDirect Direct = "direct"` - - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}` + - `type BetaResponseInputItemShellCallCallerProgram struct{…}` - `CallerID string` @@ -90752,37 +90423,45 @@ func main() { - `Type Program` + The caller type. Always `program`. + - `const ProgramProgram Program = "program"` - - `CreatedBy string` + - `Environment BetaResponseInputItemShellCallEnvironmentUnion` - The ID of the entity that created this tool call. + The environment to execute the shell commands in. - - `type BetaResponseFunctionShellToolCallOutput struct{…}` + - `type BetaLocalEnvironment struct{…}` - The output of a shell tool call that was emitted. + - `type BetaContainerReference struct{…}` - - `ID string` + - `Status string` - The unique ID of the shell call output. Populated when this item is returned via API. + The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. - - `CallID string` + - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"` - The unique ID of the shell tool call generated by the model. + - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"` - - `MaxOutputLength int64` + - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"` - The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. + - `type BetaResponseInputItemShellCallOutput struct{…}` - - `Output []BetaResponseFunctionShellToolCallOutputOutput` + The streamed output items emitted by a shell tool call. - An array of shell call output contents + - `CallID string` - - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion` + The unique ID of the shell tool call generated by the model. - Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. + - `Output []BetaResponseFunctionShellCallOutputContent` - - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}` + Captured chunks of stdout and stderr output, along with their associated outcomes. + + - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion` + + The exit or timeout outcome associated with this shell call. + + - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}` Indicates that the shell call exceeded its configured time limit. @@ -90792,13 +90471,13 @@ func main() { - `const TimeoutTimeout Timeout = "timeout"` - - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}` + - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}` Indicates that the shell commands finished and returned an exit code. - `ExitCode int64` - Exit code from the shell process. + The exit code returned by the shell process. - `Type Exit` @@ -90808,33 +90487,23 @@ func main() { - `Stderr string` - The standard error output that was captured. + Captured stderr output for the shell call. - `Stdout string` - The standard output that was captured. - - - `CreatedBy string` - - The identifier of the actor that created the item. - - - `Status BetaResponseFunctionShellToolCallOutputStatus` - - The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. - - - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"` - - - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"` - - - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"` + Captured stdout output for the shell call. - `Type ShellCallOutput` - The type of the shell call output. Always `shell_call_output`. + The type of the item. Always `shell_call_output`. - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` - - `Agent BetaResponseFunctionShellToolCallOutputAgent` + - `ID string` + + The unique ID of the shell tool call output. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemShellCallOutputAgent` The agent that produced this item. @@ -90842,17 +90511,19 @@ func main() { The canonical name of the agent that produced this item. - - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion` + - `Caller BetaResponseInputItemShellCallOutputCallerUnion` The execution context that produced this tool call. - - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}` + - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}` - `Type Direct` + The caller type. Always `direct`. + - `const DirectDirect Direct = "direct"` - - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}` + - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}` - `CallerID string` @@ -90860,85 +90531,93 @@ func main() { - `Type Program` + The caller type. Always `program`. + - `const ProgramProgram Program = "program"` - - `CreatedBy string` + - `MaxOutputLength int64` - The identifier of the actor that created the item. + The maximum number of UTF-8 characters captured for this shell call's combined output. - - `type BetaResponseApplyPatchToolCall struct{…}` + - `Status string` - A tool call that applies file diffs by creating, deleting, or updating files. + The status of the shell call output. - - `ID string` + - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"` - The unique ID of the apply patch tool call. Populated when this item is returned via API. + - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"` + + - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"` + + - `type BetaResponseInputItemApplyPatchCall struct{…}` + + A tool call representing a request to create, delete, or update files using diff patches. - `CallID string` The unique ID of the apply patch tool call generated by the model. - - `Operation BetaResponseApplyPatchToolCallOperationUnion` + - `Operation BetaResponseInputItemApplyPatchCallOperationUnion` - One of the create_file, delete_file, or update_file operations applied via apply_patch. + The specific create, delete, or update instruction for the apply_patch tool call. - - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}` + - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}` - Instruction describing how to create a file via the apply_patch tool. + Instruction for creating a new file via the apply_patch tool. - `Diff string` - Diff to apply. + Unified diff content to apply when creating the file. - `Path string` - Path of the file to create. + Path of the file to create relative to the workspace root. - `Type CreateFile` - Create a new file with the provided diff. + The operation type. Always `create_file`. - `const CreateFileCreateFile CreateFile = "create_file"` - - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}` + - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}` - Instruction describing how to delete a file via the apply_patch tool. + Instruction for deleting an existing file via the apply_patch tool. - `Path string` - Path of the file to delete. + Path of the file to delete relative to the workspace root. - `Type DeleteFile` - Delete the specified file. + The operation type. Always `delete_file`. - `const DeleteFileDeleteFile DeleteFile = "delete_file"` - - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}` + - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}` - Instruction describing how to update a file via the apply_patch tool. + Instruction for updating an existing file via the apply_patch tool. - `Diff string` - Diff to apply. + Unified diff content to apply to the existing file. - `Path string` - Path of the file to update. + Path of the file to update relative to the workspace root. - `Type UpdateFile` - Update an existing file with the provided diff. + The operation type. Always `update_file`. - `const UpdateFileUpdateFile UpdateFile = "update_file"` - - `Status BetaResponseApplyPatchToolCallStatus` + - `Status string` The status of the apply patch tool call. One of `in_progress` or `completed`. - - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"` + - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"` - - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"` + - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"` - `Type ApplyPatchCall` @@ -90946,7 +90625,11 @@ func main() { - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` - - `Agent BetaResponseApplyPatchToolCallAgent` + - `ID string` + + The unique ID of the apply patch tool call. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemApplyPatchCallAgent` The agent that produced this item. @@ -90954,17 +90637,19 @@ func main() { The canonical name of the agent that produced this item. - - `Caller BetaResponseApplyPatchToolCallCallerUnion` + - `Caller BetaResponseInputItemApplyPatchCallCallerUnion` The execution context that produced this tool call. - - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}` + - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}` - `Type Direct` + The caller type. Always `direct`. + - `const DirectDirect Direct = "direct"` - - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}` + - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}` - `CallerID string` @@ -90972,31 +90657,25 @@ func main() { - `Type Program` - - `const ProgramProgram Program = "program"` - - - `CreatedBy string` - - The ID of the entity that created this tool call. - - - `type BetaResponseApplyPatchToolCallOutput struct{…}` + The caller type. Always `program`. - The output emitted by an apply patch tool call. + - `const ProgramProgram Program = "program"` - - `ID string` + - `type BetaResponseInputItemApplyPatchCallOutput struct{…}` - The unique ID of the apply patch tool call output. Populated when this item is returned via API. + The streamed output emitted by an apply patch tool call. - `CallID string` The unique ID of the apply patch tool call generated by the model. - - `Status BetaResponseApplyPatchToolCallOutputStatus` + - `Status string` The status of the apply patch tool call output. One of `completed` or `failed`. - - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"` + - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"` - - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"` + - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"` - `Type ApplyPatchCallOutput` @@ -91004,7 +90683,11 @@ func main() { - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` - - `Agent BetaResponseApplyPatchToolCallOutputAgent` + - `ID string` + + The unique ID of the apply patch tool call output. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemApplyPatchCallOutputAgent` The agent that produced this item. @@ -91012,17 +90695,19 @@ func main() { The canonical name of the agent that produced this item. - - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion` + - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion` The execution context that produced this tool call. - - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}` + - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` - `Type Direct` + The caller type. Always `direct`. + - `const DirectDirect Direct = "direct"` - - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}` + - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` - `CallerID string` @@ -91030,17 +90715,15 @@ func main() { - `Type Program` - - `const ProgramProgram Program = "program"` - - - `CreatedBy string` + The caller type. Always `program`. - The ID of the entity that created this tool call output. + - `const ProgramProgram Program = "program"` - `Output string` - Optional textual output returned by the apply patch tool. + Optional human-readable log text from the apply patch tool (e.g., patch results or errors). - - `type BetaResponseItemMcpListTools struct{…}` + - `type BetaResponseInputItemMcpListTools struct{…}` A list of tools available on an MCP server. @@ -91052,7 +90735,8194 @@ func main() { The label of the MCP server. - - `Tools []BetaResponseItemMcpListToolsTool` + - `Tools []BetaResponseInputItemMcpListToolsTool` + + The tools available on the server. + + - `InputSchema any` + + The JSON schema describing the tool's input. + + - `Name string` + + The name of the tool. + + - `Annotations any` + + Additional annotations about the tool. + + - `Description string` + + The description of the tool. + + - `Type McpListTools` + + The type of the item. Always `mcp_list_tools`. + + - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"` + + - `Agent BetaResponseInputItemMcpListToolsAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Error string` + + Error message if the server could not list tools. + + - `type BetaResponseInputItemMcpApprovalRequest struct{…}` + + A request for human approval of a tool invocation. + + - `ID string` + + The unique ID of the approval request. + + - `Arguments string` + + A JSON string of arguments for the tool. + + - `Name string` + + The name of the tool to run. + + - `ServerLabel string` + + The label of the MCP server making the request. + + - `Type McpApprovalRequest` + + The type of the item. Always `mcp_approval_request`. + + - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"` + + - `Agent BetaResponseInputItemMcpApprovalRequestAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemMcpApprovalResponse struct{…}` + + A response to an MCP approval request. + + - `ApprovalRequestID string` + + The ID of the approval request being answered. + + - `Approve bool` + + Whether the request was approved. + + - `Type McpApprovalResponse` + + The type of the item. Always `mcp_approval_response`. + + - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"` + + - `ID string` + + The unique ID of the approval response + + - `Agent BetaResponseInputItemMcpApprovalResponseAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Reason string` + + Optional reason for the decision. + + - `type BetaResponseInputItemMcpCall struct{…}` + + An invocation of a tool on an MCP server. + + - `ID string` + + The unique ID of the tool call. + + - `Arguments string` + + A JSON string of the arguments passed to the tool. + + - `Name string` + + The name of the tool that was run. + + - `ServerLabel string` + + The label of the MCP server running the tool. + + - `Type McpCall` + + The type of the item. Always `mcp_call`. + + - `const McpCallMcpCall McpCall = "mcp_call"` + + - `Agent BetaResponseInputItemMcpCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `ApprovalRequestID string` + + Unique identifier for the MCP tool call approval request. + Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. + + - `Error string` + + The error from the tool call, if any. + + - `Output string` + + The output from the tool call. + + - `Status string` + + The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. + + - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"` + + - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"` + + - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"` + + - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"` + + - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"` + + - `type BetaResponseCustomToolCallOutput struct{…}` + + The output of a custom tool call from your code, being sent back to the model. + + - `CallID string` + + The call ID, used to map this custom tool call output to a custom tool call. + + - `Output BetaResponseCustomToolCallOutputOutputUnion` + + The output from the custom tool call generated by your code. + Can be a string or an list of output content. + + - `string` + + - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion` + + Text, image, or file output of the custom tool call. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type CustomToolCallOutput` + + The type of the custom tool call output. Always `custom_tool_call_output`. + + - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"` + + - `ID string` + + The unique ID of the custom tool call output in the OpenAI platform. + + - `Agent BetaResponseCustomToolCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type BetaResponseCustomToolCall struct{…}` + + A call to a custom tool created by the model. + + - `CallID string` + + An identifier used to map this custom tool call to a tool call output. + + - `Input string` + + The input for the custom tool call generated by the model. + + - `Name string` + + The name of the custom tool being called. + + - `Type CustomToolCall` + + The type of the custom tool call. Always `custom_tool_call`. + + - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"` + + - `ID string` + + The unique ID of the custom tool call in the OpenAI platform. + + - `Agent BetaResponseCustomToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `Namespace string` + + The namespace of the custom tool being called. + + - `type BetaResponseInputItemCompactionTrigger struct{…}` + + Compacts the current context. Must be the final input item. + + - `Type CompactionTrigger` + + The type of the item. Always `compaction_trigger`. + + - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"` + + - `Agent BetaResponseInputItemCompactionTriggerAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemItemReference struct{…}` + + An internal identifier for an item to reference. + + - `ID string` + + The ID of the item to reference. + + - `Agent BetaResponseInputItemItemReferenceAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Type string` + + The type of item to reference. Always `item_reference`. + + - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"` + + - `type BetaResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Agent BetaResponseInputItemProgramAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"` + + - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + + - `Agent BetaResponseInputItemProgramOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + +### Beta Response Input Audio + +- `type BetaResponseInputAudio struct{…}` + + An audio input to the model. + + - `InputAudio BetaResponseInputAudioInputAudio` + + - `Data string` + + Base64-encoded audio data. + + - `Format string` + + The format of the audio data. Currently supported formats are `mp3` and + `wav`. + + - `const BetaResponseInputAudioInputAudioFormatMP3 BetaResponseInputAudioInputAudioFormat = "mp3"` + + - `const BetaResponseInputAudioInputAudioFormatWAV BetaResponseInputAudioInputAudioFormat = "wav"` + + - `Type InputAudio` + + The type of the input item. Always `input_audio`. + + - `const InputAudioInputAudio InputAudio = "input_audio"` + +### Beta Response Input Content + +- `type BetaResponseInputContentUnion interface{…}` + + A text input to the model. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input File + +- `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input File Content + +- `type BetaResponseInputFileContent struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileContentDetail` + + 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`. + + - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"` + + - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"` + + - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"` + + - `FileData string` + + The base64-encoded data of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input Image + +- `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input Image Content + +- `type BetaResponseInputImageContent struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `Detail BetaResponseInputImageContentDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"` + + - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"` + + - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"` + + - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input Item + +- `type BetaResponseInputItemUnion interface{…}` + + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. Messages with the + `assistant` role are presumed to have been generated by the model in previous + interactions. + + - `type BetaEasyInputMessage struct{…}` + + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. Messages with the + `assistant` role are presumed to have been generated by the model in previous + interactions. + + - `Content BetaEasyInputMessageContentUnion` + + Text, image, or audio input to the model, used to generate a response. + Can also contain previous assistant responses. + + - `string` + + - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` + + A list of one or many input items to the model, containing different content + types. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Role BetaEasyInputMessageRole` + + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. + + - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"` + + - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"` + + - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"` + + - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"` + + - `Phase BetaEasyInputMessagePhase` + + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + + - `Type BetaEasyInputMessageType` + + The type of the message input. Always `message`. + + - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"` + + - `type BetaResponseInputItemMessage struct{…}` + + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. + + - `Content BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `Role string` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"` + + - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"` + + - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"` + + - `Agent BetaResponseInputItemMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status string` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"` + + - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"` + + - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"` + + - `Type string` + + The type of the message input. Always set to `message`. + + - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"` + + - `type BetaResponseOutputMessage struct{…}` + + An output message from the model. + + - `ID string` + + The unique ID of the output message. + + - `Content []BetaResponseOutputMessageContentUnion` + + The content of the output message. + + - `type BetaResponseOutputText struct{…}` + + A text output from the model. + + - `Annotations []BetaResponseOutputTextAnnotationUnion` + + The annotations of the text output. + + - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` + + A citation to a file. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the file cited. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FileCitation` + + The type of the file citation. Always `file_citation`. + + - `const FileCitationFileCitation FileCitation = "file_citation"` + + - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` + + A citation for a web resource used to generate a model response. + + - `EndIndex int64` + + The index of the last character of the URL citation in the message. + + - `StartIndex int64` + + The index of the first character of the URL citation in the message. + + - `Title string` + + The title of the web resource. + + - `Type URLCitation` + + The type of the URL citation. Always `url_citation`. + + - `const URLCitationURLCitation URLCitation = "url_citation"` + + - `URL string` + + The URL of the web resource. + + - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` + + A citation for a container file used to generate a model response. + + - `ContainerID string` + + The ID of the container file. + + - `EndIndex int64` + + The index of the last character of the container file citation in the message. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the container file citation in the message. + + - `Type ContainerFileCitation` + + The type of the container file citation. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `type BetaResponseOutputTextAnnotationFilePath struct{…}` + + A path to a file. + + - `FileID string` + + The ID of the file. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FilePath` + + The type of the file path. Always `file_path`. + + - `const FilePathFilePath FilePath = "file_path"` + + - `Text string` + + The text output from the model. + + - `Type OutputText` + + The type of the output text. Always `output_text`. + + - `const OutputTextOutputText OutputText = "output_text"` + + - `Logprobs []BetaResponseOutputTextLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `type BetaResponseOutputRefusal struct{…}` + + A refusal from the model. + + - `Refusal string` + + The refusal explanation from the model. + + - `Type Refusal` + + The type of the refusal. Always `refusal`. + + - `const RefusalRefusal Refusal = "refusal"` + + - `Role Assistant` + + The role of the output message. Always `assistant`. + + - `const AssistantAssistant Assistant = "assistant"` + + - `Status BetaResponseOutputMessageStatus` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"` + + - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"` + + - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"` + + - `Type Message` + + The type of the output message. Always `message`. + + - `const MessageMessage Message = "message"` + + - `Agent BetaResponseOutputMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Phase BetaResponseOutputMessagePhase` + + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + + - `type BetaResponseFileSearchToolCall struct{…}` + + The results of a file search tool call. See the + [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + + - `ID string` + + The unique ID of the file search tool call. + + - `Queries []string` + + The queries used to search for files. + + - `Status BetaResponseFileSearchToolCallStatus` + + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, + + - `const BetaResponseFileSearchToolCallStatusInProgress BetaResponseFileSearchToolCallStatus = "in_progress"` + + - `const BetaResponseFileSearchToolCallStatusSearching BetaResponseFileSearchToolCallStatus = "searching"` + + - `const BetaResponseFileSearchToolCallStatusCompleted BetaResponseFileSearchToolCallStatus = "completed"` + + - `const BetaResponseFileSearchToolCallStatusIncomplete BetaResponseFileSearchToolCallStatus = "incomplete"` + + - `const BetaResponseFileSearchToolCallStatusFailed BetaResponseFileSearchToolCallStatus = "failed"` + + - `Type FileSearchCall` + + The type of the file search tool call. Always `file_search_call`. + + - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"` + + - `Agent BetaResponseFileSearchToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Results []BetaResponseFileSearchToolCallResult` + + The results of the file search tool call. + + - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]` + + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. Keys are strings + with a maximum length of 64 characters. Values are strings with a maximum + length of 512 characters, booleans, or numbers. + + - `string` + + - `float64` + + - `bool` + + - `FileID string` + + The unique ID of the file. + + - `Filename string` + + The name of the file. + + - `Score float64` + + The relevance score of the file - a value between 0 and 1. + + - `Text string` + + The text that was retrieved from the file. + + - `type BetaResponseComputerToolCall struct{…}` + + A tool call to a computer use tool. See the + [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + + - `ID string` + + The unique ID of the computer call. + + - `CallID string` + + An identifier used when responding to the tool call with output. + + - `PendingSafetyChecks []BetaResponseComputerToolCallPendingSafetyCheck` + + The pending safety checks for the computer call. + + - `ID string` + + The ID of the pending safety check. + + - `Code string` + + The type of the pending safety check. + + - `Message string` + + Details about the pending safety check. + + - `Status BetaResponseComputerToolCallStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"` + + - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"` + + - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"` + + - `Type BetaResponseComputerToolCallType` + + The type of the computer call. Always `computer_call`. + + - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"` + + - `Action BetaComputerActionUnion` + + A click action. + + - `type BetaComputerActionClick struct{…}` + + A click action. + + - `Button string` + + Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + + - `const BetaComputerActionClickButtonLeft BetaComputerActionClickButton = "left"` + + - `const BetaComputerActionClickButtonRight BetaComputerActionClickButton = "right"` + + - `const BetaComputerActionClickButtonWheel BetaComputerActionClickButton = "wheel"` + + - `const BetaComputerActionClickButtonBack BetaComputerActionClickButton = "back"` + + - `const BetaComputerActionClickButtonForward BetaComputerActionClickButton = "forward"` + + - `Type Click` + + Specifies the event type. For a click action, this property is always `click`. + + - `const ClickClick Click = "click"` + + - `X int64` + + The x-coordinate where the click occurred. + + - `Y int64` + + The y-coordinate where the click occurred. + + - `Keys []string` + + The keys being held while clicking. + + - `type BetaComputerActionDoubleClick struct{…}` + + A double click action. + + - `Keys []string` + + The keys being held while double-clicking. + + - `Type DoubleClick` + + Specifies the event type. For a double click action, this property is always set to `double_click`. + + - `const DoubleClickDoubleClick DoubleClick = "double_click"` + + - `X int64` + + The x-coordinate where the double click occurred. + + - `Y int64` + + The y-coordinate where the double click occurred. + + - `type BetaComputerActionDrag struct{…}` + + A drag action. + + - `Path []BetaComputerActionDragPath` + + An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + + ``` + [ + { x: 100, y: 200 }, + { x: 200, y: 300 } + ] + ``` + + - `X int64` + + The x-coordinate. + + - `Y int64` + + The y-coordinate. + + - `Type Drag` + + Specifies the event type. For a drag action, this property is always set to `drag`. + + - `const DragDrag Drag = "drag"` + + - `Keys []string` + + The keys being held while dragging the mouse. + + - `type BetaComputerActionKeypress struct{…}` + + A collection of keypresses the model would like to perform. + + - `Keys []string` + + The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + + - `Type Keypress` + + Specifies the event type. For a keypress action, this property is always set to `keypress`. + + - `const KeypressKeypress Keypress = "keypress"` + + - `type BetaComputerActionMove struct{…}` + + A mouse move action. + + - `Type Move` + + Specifies the event type. For a move action, this property is always set to `move`. + + - `const MoveMove Move = "move"` + + - `X int64` + + The x-coordinate to move to. + + - `Y int64` + + The y-coordinate to move to. + + - `Keys []string` + + The keys being held while moving the mouse. + + - `type BetaComputerActionScreenshot struct{…}` + + A screenshot action. + + - `Type Screenshot` + + Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + + - `const ScreenshotScreenshot Screenshot = "screenshot"` + + - `type BetaComputerActionScroll struct{…}` + + A scroll action. + + - `ScrollX int64` + + The horizontal scroll distance. + + - `ScrollY int64` + + The vertical scroll distance. + + - `Type Scroll` + + Specifies the event type. For a scroll action, this property is always set to `scroll`. + + - `const ScrollScroll Scroll = "scroll"` + + - `X int64` + + The x-coordinate where the scroll occurred. + + - `Y int64` + + The y-coordinate where the scroll occurred. + + - `Keys []string` + + The keys being held while scrolling. + + - `type BetaComputerActionType struct{…}` + + An action to type in text. + + - `Text string` + + The text to type. + + - `Type Type` + + Specifies the event type. For a type action, this property is always set to `type`. + + - `const TypeType Type = "type"` + + - `type BetaComputerActionWait struct{…}` + + A wait action. + + - `Type Wait` + + Specifies the event type. For a wait action, this property is always set to `wait`. + + - `const WaitWait Wait = "wait"` + + - `Actions BetaComputerActionList` + + Flattened batched actions for `computer_use`. Each action includes an + `type` discriminator and action-specific fields. + + - `type BetaComputerActionClick struct{…}` + + A click action. + + - `type BetaComputerActionDoubleClick struct{…}` + + A double click action. + + - `type BetaComputerActionDrag struct{…}` + + A drag action. + + - `type BetaComputerActionKeypress struct{…}` + + A collection of keypresses the model would like to perform. + + - `type BetaComputerActionMove struct{…}` + + A mouse move action. + + - `type BetaComputerActionScreenshot struct{…}` + + A screenshot action. + + - `type BetaComputerActionScroll struct{…}` + + A scroll action. + + - `type BetaComputerActionType struct{…}` + + An action to type in text. + + - `type BetaComputerActionWait struct{…}` + + A wait action. + + - `Agent BetaResponseComputerToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemComputerCallOutput struct{…}` + + The output of a computer tool call. + + - `CallID string` + + The ID of the computer tool call that produced the output. + + - `Output BetaResponseComputerToolCallOutputScreenshot` + + A computer screenshot image used with the computer use tool. + + - `Type ComputerScreenshot` + + Specifies the event type. For a computer screenshot, this property is + always set to `computer_screenshot`. + + - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"` + + - `FileID string` + + The identifier of an uploaded file that contains the screenshot. + + - `ImageURL string` + + The URL of the screenshot image. + + - `Type ComputerCallOutput` + + The type of the computer tool call output. Always `computer_call_output`. + + - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"` + + - `ID string` + + The ID of the computer tool call output. + + - `AcknowledgedSafetyChecks []BetaResponseInputItemComputerCallOutputAcknowledgedSafetyCheck` + + The safety checks reported by the API that have been acknowledged by the developer. + + - `ID string` + + The ID of the pending safety check. + + - `Code string` + + The type of the pending safety check. + + - `Message string` + + Details about the pending safety check. + + - `Agent BetaResponseInputItemComputerCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status string` + + The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseInputItemComputerCallOutputStatusInProgress BetaResponseInputItemComputerCallOutputStatus = "in_progress"` + + - `const BetaResponseInputItemComputerCallOutputStatusCompleted BetaResponseInputItemComputerCallOutputStatus = "completed"` + + - `const BetaResponseInputItemComputerCallOutputStatusIncomplete BetaResponseInputItemComputerCallOutputStatus = "incomplete"` + + - `type BetaResponseFunctionWebSearch struct{…}` + + The results of a web search tool call. See the + [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + + - `ID string` + + The unique ID of the web search tool call. + + - `Action BetaResponseFunctionWebSearchActionUnion` + + An object describing the specific action taken in this web search call. + Includes details on how the model used the web (search, open_page, find_in_page). + + - `type BetaResponseFunctionWebSearchActionSearch struct{…}` + + Action type "search" - Performs a web search query. + + - `Type Search` + + The action type. + + - `const SearchSearch Search = "search"` + + - `Queries []string` + + The search queries. + + - `Query string` + + The search query. + + - `Sources []BetaResponseFunctionWebSearchActionSearchSource` + + The sources used in the search. + + - `Type URL` + + The type of source. Always `url`. + + - `const URLURL URL = "url"` + + - `URL string` + + The URL of the source. + + - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}` + + Action type "open_page" - Opens a specific URL from search results. + + - `Type OpenPage` + + The action type. + + - `const OpenPageOpenPage OpenPage = "open_page"` + + - `URL string` + + The URL opened by the model. + + - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}` + + Action type "find_in_page": Searches for a pattern within a loaded page. + + - `Pattern string` + + The pattern or text to search for within the page. + + - `Type FindInPage` + + The action type. + + - `const FindInPageFindInPage FindInPage = "find_in_page"` + + - `URL string` + + The URL of the page searched for the pattern. + + - `Status BetaResponseFunctionWebSearchStatus` + + The status of the web search tool call. + + - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"` + + - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"` + + - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"` + + - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"` + + - `Type WebSearchCall` + + The type of the web search tool call. Always `web_search_call`. + + - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"` + + - `Agent BetaResponseFunctionWebSearchAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseFunctionToolCall struct{…}` + + A tool call to run a function. See the + [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + + - `Arguments string` + + A JSON string of the arguments to pass to the function. + + - `CallID string` + + The unique ID of the function tool call generated by the model. + + - `Name string` + + The name of the function to run. + + - `Type FunctionCall` + + The type of the function tool call. Always `function_call`. + + - `const FunctionCallFunctionCall FunctionCall = "function_call"` + + - `ID string` + + The unique ID of the function tool call. + + - `Agent BetaResponseFunctionToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseFunctionToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseFunctionToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseFunctionToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `Namespace string` + + The namespace of the function to run. + + - `Status BetaResponseFunctionToolCallStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseFunctionToolCallStatusInProgress BetaResponseFunctionToolCallStatus = "in_progress"` + + - `const BetaResponseFunctionToolCallStatusCompleted BetaResponseFunctionToolCallStatus = "completed"` + + - `const BetaResponseFunctionToolCallStatusIncomplete BetaResponseFunctionToolCallStatus = "incomplete"` + + - `type BetaResponseInputItemFunctionCallOutput struct{…}` + + The output of a function tool call. + + - `CallID string` + + The unique ID of the function tool call generated by the model. + + - `Output BetaResponseInputItemFunctionCallOutputOutputUnion` + + Text, image, or file output of the function tool call. + + - `string` + + - `type BetaResponseFunctionCallOutputItemList []BetaResponseFunctionCallOutputItemUnion` + + An array of content outputs (text, image, file) for the function tool call. + + - `type BetaResponseInputTextContent struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImageContent struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `Detail BetaResponseInputImageContentDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageContentDetailLow BetaResponseInputImageContentDetail = "low"` + + - `const BetaResponseInputImageContentDetailHigh BetaResponseInputImageContentDetail = "high"` + + - `const BetaResponseInputImageContentDetailAuto BetaResponseInputImageContentDetail = "auto"` + + - `const BetaResponseInputImageContentDetailOriginal BetaResponseInputImageContentDetail = "original"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImageContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFileContent struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileContentDetail` + + 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`. + + - `const BetaResponseInputFileContentDetailAuto BetaResponseInputFileContentDetail = "auto"` + + - `const BetaResponseInputFileContentDetailLow BetaResponseInputFileContentDetail = "low"` + + - `const BetaResponseInputFileContentDetailHigh BetaResponseInputFileContentDetail = "high"` + + - `FileData string` + + The base64-encoded data of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFileContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Type FunctionCallOutput` + + The type of the function tool call output. Always `function_call_output`. + + - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + + - `ID string` + + The unique ID of the function tool call output. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemFunctionCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseInputItemFunctionCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseInputItemFunctionCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseInputItemFunctionCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Status string` + + The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API. + + - `const BetaResponseInputItemFunctionCallOutputStatusInProgress BetaResponseInputItemFunctionCallOutputStatus = "in_progress"` + + - `const BetaResponseInputItemFunctionCallOutputStatusCompleted BetaResponseInputItemFunctionCallOutputStatus = "completed"` + + - `const BetaResponseInputItemFunctionCallOutputStatusIncomplete BetaResponseInputItemFunctionCallOutputStatus = "incomplete"` + + - `type BetaResponseInputItemAgentMessage struct{…}` + + A message routed between agents. + + - `Author string` + + The sending agent identity. + + - `Content []BetaResponseInputItemAgentMessageContentUnion` + + Plaintext, image, or encrypted content sent between agents. + + - `type BetaResponseInputTextContent struct{…}` + + A text input to the model. + + - `type BetaResponseInputImageContent struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision) + + - `type BetaResponseInputItemAgentMessageContentEncryptedContent struct{…}` + + Opaque encrypted content that Responses API decrypts inside trusted model execution. + + - `EncryptedContent string` + + Opaque encrypted content. + + - `Type EncryptedContent` + + The type of the input item. Always `encrypted_content`. + + - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"` + + - `Recipient string` + + The destination agent identity. + + - `Type AgentMessage` + + The item type. Always `agent_message`. + + - `const AgentMessageAgentMessage AgentMessage = "agent_message"` + + - `ID string` + + The unique ID of this agent message item. + + - `Agent BetaResponseInputItemAgentMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemMultiAgentCall struct{…}` + + - `Action string` + + The multi-agent action that was executed. + + - `const BetaResponseInputItemMultiAgentCallActionSpawnAgent BetaResponseInputItemMultiAgentCallAction = "spawn_agent"` + + - `const BetaResponseInputItemMultiAgentCallActionInterruptAgent BetaResponseInputItemMultiAgentCallAction = "interrupt_agent"` + + - `const BetaResponseInputItemMultiAgentCallActionListAgents BetaResponseInputItemMultiAgentCallAction = "list_agents"` + + - `const BetaResponseInputItemMultiAgentCallActionSendMessage BetaResponseInputItemMultiAgentCallAction = "send_message"` + + - `const BetaResponseInputItemMultiAgentCallActionFollowupTask BetaResponseInputItemMultiAgentCallAction = "followup_task"` + + - `const BetaResponseInputItemMultiAgentCallActionWaitAgent BetaResponseInputItemMultiAgentCallAction = "wait_agent"` + + - `Arguments string` + + The action arguments as a JSON string. + + - `CallID string` + + The unique ID linking this call to its output. + + - `Type MultiAgentCall` + + The item type. Always `multi_agent_call`. + + - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"` + + - `ID string` + + The unique ID of this multi-agent call. + + - `Agent BetaResponseInputItemMultiAgentCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemMultiAgentCallOutput struct{…}` + + - `Action string` + + The multi-agent action that produced this result. + + - `const BetaResponseInputItemMultiAgentCallOutputActionSpawnAgent BetaResponseInputItemMultiAgentCallOutputAction = "spawn_agent"` + + - `const BetaResponseInputItemMultiAgentCallOutputActionInterruptAgent BetaResponseInputItemMultiAgentCallOutputAction = "interrupt_agent"` + + - `const BetaResponseInputItemMultiAgentCallOutputActionListAgents BetaResponseInputItemMultiAgentCallOutputAction = "list_agents"` + + - `const BetaResponseInputItemMultiAgentCallOutputActionSendMessage BetaResponseInputItemMultiAgentCallOutputAction = "send_message"` + + - `const BetaResponseInputItemMultiAgentCallOutputActionFollowupTask BetaResponseInputItemMultiAgentCallOutputAction = "followup_task"` + + - `const BetaResponseInputItemMultiAgentCallOutputActionWaitAgent BetaResponseInputItemMultiAgentCallOutputAction = "wait_agent"` + + - `CallID string` + + The unique ID of the multi-agent call. + + - `Output []BetaResponseInputItemMultiAgentCallOutputOutput` + + Text output returned by the multi-agent action. + + - `Text string` + + The text content. + + - `Type OutputText` + + The content type. Always `output_text`. + + - `const OutputTextOutputText OutputText = "output_text"` + + - `Annotations BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsUnion` + + Citations associated with the text content. + + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArrayItem` + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the file cited. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FileCitation` + + The citation type. Always `file_citation`. + + - `const FileCitationFileCitation FileCitation = "file_citation"` + + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray2 []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray2Item` + + - `EndIndex int64` + + The index of the last character of the citation in the message. + + - `StartIndex int64` + + The index of the first character of the citation in the message. + + - `Title string` + + The title of the cited resource. + + - `Type URLCitation` + + The citation type. Always `url_citation`. + + - `const URLCitationURLCitation URLCitation = "url_citation"` + + - `URL string` + + The URL of the cited resource. + + - `type BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray3 []BetaResponseInputItemMultiAgentCallOutputOutputAnnotationsArray3Item` + + - `ContainerID string` + + The ID of the container. + + - `EndIndex int64` + + The index of the last character of the citation in the message. + + - `FileID string` + + The ID of the container file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the citation in the message. + + - `Type ContainerFileCitation` + + The citation type. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `Type MultiAgentCallOutput` + + The item type. Always `multi_agent_call_output`. + + - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"` + + - `ID string` + + The unique ID of this multi-agent call output. + + - `Agent BetaResponseInputItemMultiAgentCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemToolSearchCall struct{…}` + + - `Arguments any` + + The arguments supplied to the tool search call. + + - `Type ToolSearchCall` + + The item type. Always `tool_search_call`. + + - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"` + + - `ID string` + + The unique ID of this tool search call. + + - `Agent BetaResponseInputItemToolSearchCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CallID string` + + The unique ID of the tool search call generated by the model. + + - `Execution string` + + Whether tool search was executed by the server or by the client. + + - `const BetaResponseInputItemToolSearchCallExecutionServer BetaResponseInputItemToolSearchCallExecution = "server"` + + - `const BetaResponseInputItemToolSearchCallExecutionClient BetaResponseInputItemToolSearchCallExecution = "client"` + + - `Status string` + + The status of the tool search call. + + - `const BetaResponseInputItemToolSearchCallStatusInProgress BetaResponseInputItemToolSearchCallStatus = "in_progress"` + + - `const BetaResponseInputItemToolSearchCallStatusCompleted BetaResponseInputItemToolSearchCallStatus = "completed"` + + - `const BetaResponseInputItemToolSearchCallStatusIncomplete BetaResponseInputItemToolSearchCallStatus = "incomplete"` + + - `type BetaResponseToolSearchOutputItemParamResp struct{…}` + + - `Tools []BetaToolUnion` + + The loaded tool definitions returned by the tool search output. + + - `type BetaFunctionTool struct{…}` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `Name string` + + The name of the function to call. + + - `Parameters map[string, any]` + + A JSON schema object describing the parameters of the function. + + - `Strict bool` + + Whether strict parameter validation is enforced for this function tool. + + - `Type Function` + + The type of the function tool. Always `function`. + + - `const FunctionFunction Function = "function"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"` + + - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this function is deferred and loaded via tool search. + + - `Description string` + + A description of the function. Used by the model to determine whether or not to call the function. + + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + + - `type BetaFileSearchTool struct{…}` + + 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). + + - `Type FileSearch` + + The type of the file search tool. Always `file_search`. + + - `const FileSearchFileSearch FileSearch = "file_search"` + + - `VectorStoreIDs []string` + + The IDs of the vector stores to search. + + - `Filters BetaFileSearchToolFiltersUnion` + + A filter to apply. + + - `type BetaFileSearchToolFiltersComparisonFilter struct{…}` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `Key string` + + The key to compare against the value. + + - `Type string` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"` + + - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `float64` + + - `bool` + + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` + + - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` + + Combine multiple filters using `and` or `or`. + + - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter` + + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + + - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `Key string` + + The key to compare against the value. + + - `Type string` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"` + + - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `float64` + + - `bool` + + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` + + - `Type string` + + Type of operation: `and` or `or`. + + - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"` + + - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"` + + - `MaxNumResults int64` + + The maximum number of results to return. This number should be between 1 and 50 inclusive. + + - `RankingOptions BetaFileSearchToolRankingOptions` + + Ranking options for search. + + - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch` + + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + + - `EmbeddingWeight float64` + + The weight of the embedding in the reciprocal ranking fusion. + + - `TextWeight float64` + + The weight of the text in the reciprocal ranking fusion. + + - `Ranker string` + + The ranker to use for the file search. + + - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"` + + - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"` + + - `ScoreThreshold float64` + + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. + + - `type BetaComputerTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `Type Computer` + + The type of the computer tool. Always `computer`. + + - `const ComputerComputer Computer = "computer"` + + - `type BetaComputerUsePreviewTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `DisplayHeight int64` + + The height of the computer display. + + - `DisplayWidth int64` + + The width of the computer display. + + - `Environment BetaComputerUsePreviewToolEnvironment` + + The type of computer environment to control. + + - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"` + + - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"` + + - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"` + + - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"` + + - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"` + + - `Type ComputerUsePreview` + + The type of the computer use tool. Always `computer_use_preview`. + + - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"` + + - `type BetaWebSearchTool struct{…}` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `Type BetaWebSearchToolType` + + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + + - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"` + + - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"` + + - `Filters BetaWebSearchToolFilters` + + Filters for the search. + + - `AllowedDomains []string` + + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. + + Example: `["pubmed.ncbi.nlm.nih.gov"]` + + - `SearchContextSize BetaWebSearchToolSearchContextSize` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"` + + - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"` + + - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"` + + - `UserLocation BetaWebSearchToolUserLocation` + + The approximate location of the user. + + - `City string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `Country string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `Region string` + + Free text input for the region of the user, e.g. `California`. + + - `Timezone string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `Type string` + + The type of location approximation. Always `approximate`. + + - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"` + + - `type BetaToolMcp struct{…}` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + + - `ServerLabel string` + + A label for this MCP server, used to identify it in tool calls. + + - `Type Mcp` + + The type of the MCP tool. Always `mcp`. + + - `const McpMcp Mcp = "mcp"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"` + + - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"` + + - `AllowedTools BetaToolMcpAllowedToolsUnion` + + List of allowed tool names or a filter object. + + - `type BetaToolMcpAllowedToolsMcpAllowedTools []string` + + A string array of allowed tool names + + - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `Authorization string` + + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. + + - `ConnectorID string` + + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + + Currently supported `connector_id` values are: + + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` + + - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"` + + - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"` + + - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"` + + - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"` + + - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"` + + - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"` + + - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"` + + - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"` + + - `DeferLoading bool` + + Whether this MCP tool is deferred and discovered via tool search. + + - `Headers map[string, string]` + + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. + + - `RequireApproval BetaToolMcpRequireApprovalUnion` + + Specify which of the MCP server's tools require approval. + + - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}` + + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. + + - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string` + + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. + + - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"` + + - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"` + + - `ServerDescription string` + + Optional description of the MCP server, used to provide more context. + + - `ServerURL string` + + The URL for the MCP server. One of `server_url`, `connector_id`, or + `tunnel_id` must be provided. + + - `TunnelID string` + + The Secure MCP Tunnel ID to use instead of a direct server URL. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. + + - `type BetaToolCodeInterpreter struct{…}` + + A tool that runs Python code to help generate a response to a prompt. + + - `Container BetaToolCodeInterpreterContainerUnion` + + The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an + optional `memory_limit` setting. + + - `string` + + - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}` + + Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + + - `Type Auto` + + Always `auto`. + + - `const AutoAuto Auto = "auto"` + + - `FileIDs []string` + + An optional list of uploaded files to make available to your code. + + - `MemoryLimit string` + + The memory limit for the code interpreter container. + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"` + + - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion` + + Network access policy for the container. + + - `type BetaContainerNetworkPolicyDisabled struct{…}` + + - `Type Disabled` + + Disable outbound network access. Always `disabled`. + + - `const DisabledDisabled Disabled = "disabled"` + + - `type BetaContainerNetworkPolicyAllowlist struct{…}` + + - `AllowedDomains []string` + + A list of allowed domains when type is `allowlist`. + + - `Type Allowlist` + + Allow outbound network access only to specified domains. Always `allowlist`. + + - `const AllowlistAllowlist Allowlist = "allowlist"` + + - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret` + + Optional domain-scoped secrets for allowlisted domains. + + - `Domain string` + + The domain associated with the secret. + + - `Name string` + + The name of the secret to inject for the domain. + + - `Value string` + + The secret value to inject for the domain. + + - `Type CodeInterpreter` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"` + + - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type BetaToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + + - `type BetaToolImageGeneration struct{…}` + + A tool that generates images using the GPT image models. + + - `Type ImageGeneration` + + The type of the image generation tool. Always `image_generation`. + + - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"` + + - `Action string` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"` + + - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"` + + - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"` + + - `Background string` + + Allows to set transparency for the background of the generated image(s). + This parameter is only supported for GPT image models that support + transparent backgrounds. Must be one of `transparent`, `opaque`, or + `auto` (default value). When `auto` is used, the model will + automatically determine the best background for the image. + + `gpt-image-2` and `gpt-image-2-2026-04-21` do not support + transparent backgrounds. Requests with `background` set to + `transparent` will return an error for these models; use `opaque` or + `auto` instead. + + If `transparent`, the output format needs to support transparency, + so it should be set to either `png` (default value) or `webp`. + + - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"` + + - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"` + + - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"` + + - `InputFidelity string` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"` + + - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"` + + - `InputImageMask BetaToolImageGenerationInputImageMask` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `FileID string` + + File ID for the mask image. + + - `ImageURL string` + + Base64-encoded mask image. + + - `Model string` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `string` + + - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"` + + - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"` + + - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"` + + - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"` + + - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"` + + - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"` + + - `Moderation string` + + Moderation level for the generated image. Default: `auto`. + + - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"` + + - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"` + + - `OutputCompression int64` + + Compression level for the output image. Default: 100. + + - `OutputFormat string` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"` + + - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"` + + - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"` + + - `PartialImages int64` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `Quality string` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"` + + - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"` + + - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"` + + - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"` + + - `Size string` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `string` + + - `string` + + - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"` + + - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"` + + - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"` + + - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"` + + - `type BetaToolLocalShell struct{…}` + + A tool that allows the model to execute shell commands in a local environment. + + - `Type LocalShell` + + The type of the local shell tool. Always `local_shell`. + + - `const LocalShellLocalShell LocalShell = "local_shell"` + + - `type BetaFunctionShellTool struct{…}` + + A tool that allows the model to execute shell commands. + + - `Type Shell` + + The type of the shell tool. Always `shell`. + + - `const ShellShell Shell = "shell"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"` + + - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"` + + - `Environment BetaFunctionShellToolEnvironmentUnion` + + - `type BetaContainerAuto struct{…}` + + - `Type ContainerAuto` + + Automatically creates a container for this request + + - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"` + + - `FileIDs []string` + + An optional list of uploaded files to make available to your code. + + - `MemoryLimit BetaContainerAutoMemoryLimit` + + The memory limit for the container. + + - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"` + + - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"` + + - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"` + + - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"` + + - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion` + + Network access policy for the container. + + - `type BetaContainerNetworkPolicyDisabled struct{…}` + + - `type BetaContainerNetworkPolicyAllowlist struct{…}` + + - `Skills []BetaContainerAutoSkillUnion` + + An optional list of skills referenced by id or inline data. + + - `type BetaSkillReference struct{…}` + + - `SkillID string` + + The ID of the referenced skill. + + - `Type SkillReference` + + References a skill created with the /v1/skills endpoint. + + - `const SkillReferenceSkillReference SkillReference = "skill_reference"` + + - `Version string` + + Optional skill version. Use a positive integer or 'latest'. Omit for default. + + - `type BetaInlineSkill struct{…}` + + - `Description string` + + The description of the skill. + + - `Name string` + + The name of the skill. + + - `Source BetaInlineSkillSource` + + Inline skill payload + + - `Data string` + + Base64-encoded skill zip bundle. + + - `MediaType ApplicationZip` + + The media type of the inline skill payload. Must be `application/zip`. + + - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"` + + - `Type Base64` + + The type of the inline skill source. Must be `base64`. + + - `const Base64Base64 Base64 = "base64"` + + - `Type Inline` + + Defines an inline skill for this request. + + - `const InlineInline Inline = "inline"` + + - `type BetaLocalEnvironment struct{…}` + + - `Type Local` + + Use a local computer environment. + + - `const LocalLocal Local = "local"` + + - `Skills []BetaLocalSkill` + + An optional list of skills. + + - `Description string` + + The description of the skill. + + - `Name string` + + The name of the skill. + + - `Path string` + + The path to the directory containing the skill. + + - `type BetaContainerReference struct{…}` + + - `ContainerID string` + + The ID of the referenced container. + + - `Type ContainerReference` + + References a container created with the /v1/containers endpoint + + - `const ContainerReferenceContainerReference ContainerReference = "container_reference"` + + - `type BetaCustomTool struct{…}` + + 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) + + - `Name string` + + The name of the custom tool, used to identify it in tool calls. + + - `Type Custom` + + The type of the custom tool. Always `custom`. + + - `const CustomCustom Custom = "custom"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"` + + - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this tool should be deferred and discovered via tool search. + + - `Description string` + + Optional description of the custom tool, used to provide more context. + + - `Format BetaCustomToolFormatUnion` + + The input format for the custom tool. Default is unconstrained text. + + - `type BetaCustomToolFormatText struct{…}` + + Unconstrained free-form text. + + - `Type Text` + + Unconstrained text format. Always `text`. + + - `const TextText Text = "text"` + + - `type BetaCustomToolFormatGrammar struct{…}` + + A grammar defined by the user. + + - `Definition string` + + The grammar definition. + + - `Syntax string` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"` + + - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"` + + - `Type Grammar` + + Grammar format. Always `grammar`. + + - `const GrammarGrammar Grammar = "grammar"` + + - `type BetaNamespaceTool struct{…}` + + Groups function/custom tools under a shared namespace. + + - `Description string` + + A description of the namespace shown to the model. + + - `Name string` + + The namespace name used in tool calls (for example, `crm`). + + - `Tools []BetaNamespaceToolToolUnion` + + The function/custom tools available inside this namespace. + + - `type BetaNamespaceToolToolFunction struct{…}` + + - `Name string` + + - `Type Function` + + - `const FunctionFunction Function = "function"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this function should be deferred and discovered via tool search. + + - `Description string` + + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + + - `Parameters any` + + - `Strict bool` + + 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. + + - `type BetaCustomTool struct{…}` + + 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) + + - `Type Namespace` + + The type of the tool. Always `namespace`. + + - `const NamespaceNamespace Namespace = "namespace"` + + - `type BetaToolSearchTool struct{…}` + + Hosted or BYOT tool search configuration for deferred tools. + + - `Type ToolSearch` + + The type of the tool. Always `tool_search`. + + - `const ToolSearchToolSearch ToolSearch = "tool_search"` + + - `Description string` + + Description shown to the model for a client-executed tool search tool. + + - `Execution BetaToolSearchToolExecution` + + Whether tool search is executed by the server or by the client. + + - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"` + + - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"` + + - `Parameters any` + + Parameter schema for a client-executed tool search tool. + + - `type BetaWebSearchPreviewTool struct{…}` + + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `Type BetaWebSearchPreviewToolType` + + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + + - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"` + + - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"` + + - `SearchContentTypes []string` + + - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"` + + - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"` + + - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"` + + - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"` + + - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"` + + - `UserLocation BetaWebSearchPreviewToolUserLocation` + + The user's location. + + - `Type Approximate` + + The type of location approximation. Always `approximate`. + + - `const ApproximateApproximate Approximate = "approximate"` + + - `City string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `Country string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `Region string` + + Free text input for the region of the user, e.g. `California`. + + - `Timezone string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `type BetaApplyPatchTool struct{…}` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `Type ApplyPatch` + + The type of the tool. Always `apply_patch`. + + - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"` + + - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"` + + - `Type ToolSearchOutput` + + The item type. Always `tool_search_output`. + + - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"` + + - `ID string` + + The unique ID of this tool search output. + + - `Agent BetaResponseToolSearchOutputItemParamAgentResp` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CallID string` + + The unique ID of the tool search call generated by the model. + + - `Execution BetaResponseToolSearchOutputItemParamExecution` + + Whether tool search was executed by the server or by the client. + + - `const BetaResponseToolSearchOutputItemParamExecutionServer BetaResponseToolSearchOutputItemParamExecution = "server"` + + - `const BetaResponseToolSearchOutputItemParamExecutionClient BetaResponseToolSearchOutputItemParamExecution = "client"` + + - `Status BetaResponseToolSearchOutputItemParamStatus` + + The status of the tool search output. + + - `const BetaResponseToolSearchOutputItemParamStatusInProgress BetaResponseToolSearchOutputItemParamStatus = "in_progress"` + + - `const BetaResponseToolSearchOutputItemParamStatusCompleted BetaResponseToolSearchOutputItemParamStatus = "completed"` + + - `const BetaResponseToolSearchOutputItemParamStatusIncomplete BetaResponseToolSearchOutputItemParamStatus = "incomplete"` + + - `type BetaResponseInputItemAdditionalTools struct{…}` + + - `Role Developer` + + The role that provided the additional tools. Only `developer` is supported. + + - `const DeveloperDeveloper Developer = "developer"` + + - `Tools []BetaToolUnion` + + A list of additional tools made available at this item. + + - `type BetaFunctionTool struct{…}` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `type BetaFileSearchTool struct{…}` + + 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). + + - `type BetaComputerTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type BetaComputerUsePreviewTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type BetaWebSearchTool struct{…}` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type BetaToolMcp struct{…}` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + + - `type BetaToolCodeInterpreter struct{…}` + + A tool that runs Python code to help generate a response to a prompt. + + - `type BetaToolProgrammaticToolCalling struct{…}` + + - `type BetaToolImageGeneration struct{…}` + + A tool that generates images using the GPT image models. + + - `type BetaToolLocalShell struct{…}` + + A tool that allows the model to execute shell commands in a local environment. + + - `type BetaFunctionShellTool struct{…}` + + A tool that allows the model to execute shell commands. + + - `type BetaCustomTool struct{…}` + + 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) + + - `type BetaNamespaceTool struct{…}` + + Groups function/custom tools under a shared namespace. + + - `type BetaToolSearchTool struct{…}` + + Hosted or BYOT tool search configuration for deferred tools. + + - `type BetaWebSearchPreviewTool struct{…}` + + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type BetaApplyPatchTool struct{…}` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `Type AdditionalTools` + + The item type. Always `additional_tools`. + + - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"` + + - `ID string` + + The unique ID of this additional tools item. + + - `Agent BetaResponseInputItemAdditionalToolsAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseReasoningItem struct{…}` + + A description of the chain of thought used by a reasoning model while generating + a response. Be sure to include these items in your `input` to the Responses API + for subsequent turns of a conversation if you are manually + [managing context](https://platform.openai.com/docs/guides/conversation-state). + + - `ID string` + + The unique identifier of the reasoning content. + + - `Summary []BetaResponseReasoningItemSummary` + + Reasoning summary content. + + - `Text string` + + A summary of the reasoning output from the model so far. + + - `Type SummaryText` + + The type of the object. Always `summary_text`. + + - `const SummaryTextSummaryText SummaryText = "summary_text"` + + - `Type Reasoning` + + The type of the object. Always `reasoning`. + + - `const ReasoningReasoning Reasoning = "reasoning"` + + - `Agent BetaResponseReasoningItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Content []BetaResponseReasoningItemContent` + + Reasoning text content. + + - `Text string` + + The reasoning text from the model. + + - `Type ReasoningText` + + The type of the reasoning text. Always `reasoning_text`. + + - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"` + + - `EncryptedContent string` + + The encrypted content of the reasoning item - populated when a response is + generated with `reasoning.encrypted_content` in the `include` parameter. + + - `Status BetaResponseReasoningItemStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"` + + - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"` + + - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"` + + - `type BetaResponseCompactionItemParamResp struct{…}` + + A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + + - `EncryptedContent string` + + The encrypted content of the compaction summary. + + - `Type Compaction` + + The type of the item. Always `compaction`. + + - `const CompactionCompaction Compaction = "compaction"` + + - `ID string` + + The ID of the compaction item. + + - `Agent BetaResponseCompactionItemParamAgentResp` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemImageGenerationCall struct{…}` + + An image generation request made by the model. + + - `ID string` + + The unique ID of the image generation call. + + - `Result string` + + The generated image encoded in base64. + + - `Status string` + + The status of the image generation call. + + - `const BetaResponseInputItemImageGenerationCallStatusInProgress BetaResponseInputItemImageGenerationCallStatus = "in_progress"` + + - `const BetaResponseInputItemImageGenerationCallStatusCompleted BetaResponseInputItemImageGenerationCallStatus = "completed"` + + - `const BetaResponseInputItemImageGenerationCallStatusGenerating BetaResponseInputItemImageGenerationCallStatus = "generating"` + + - `const BetaResponseInputItemImageGenerationCallStatusFailed BetaResponseInputItemImageGenerationCallStatus = "failed"` + + - `Type ImageGenerationCall` + + The type of the image generation call. Always `image_generation_call`. + + - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"` + + - `Agent BetaResponseInputItemImageGenerationCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseCodeInterpreterToolCall struct{…}` + + A tool call to run code. + + - `ID string` + + The unique ID of the code interpreter tool call. + + - `Code string` + + The code to run, or null if not available. + + - `ContainerID string` + + The ID of the container used to run the code. + + - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion` + + The outputs generated by the code interpreter, such as logs or images. + Can be null if no outputs are available. + + - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}` + + The logs output from the code interpreter. + + - `Logs string` + + The logs output from the code interpreter. + + - `Type Logs` + + The type of the output. Always `logs`. + + - `const LogsLogs Logs = "logs"` + + - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}` + + The image output from the code interpreter. + + - `Type Image` + + The type of the output. Always `image`. + + - `const ImageImage Image = "image"` + + - `URL string` + + The URL of the image output from the code interpreter. + + - `Status BetaResponseCodeInterpreterToolCallStatus` + + The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. + + - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"` + + - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"` + + - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"` + + - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"` + + - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"` + + - `Type CodeInterpreterCall` + + The type of the code interpreter tool call. Always `code_interpreter_call`. + + - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"` + + - `Agent BetaResponseCodeInterpreterToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemLocalShellCall struct{…}` + + A tool call to run a command on the local shell. + + - `ID string` + + The unique ID of the local shell call. + + - `Action BetaResponseInputItemLocalShellCallAction` + + Execute a shell command on the server. + + - `Command []string` + + The command to run. + + - `Env map[string, string]` + + Environment variables to set for the command. + + - `Type Exec` + + The type of the local shell action. Always `exec`. + + - `const ExecExec Exec = "exec"` + + - `TimeoutMs int64` + + Optional timeout in milliseconds for the command. + + - `User string` + + Optional user to run the command as. + + - `WorkingDirectory string` + + Optional working directory to run the command in. + + - `CallID string` + + The unique ID of the local shell tool call generated by the model. + + - `Status string` + + The status of the local shell call. + + - `const BetaResponseInputItemLocalShellCallStatusInProgress BetaResponseInputItemLocalShellCallStatus = "in_progress"` + + - `const BetaResponseInputItemLocalShellCallStatusCompleted BetaResponseInputItemLocalShellCallStatus = "completed"` + + - `const BetaResponseInputItemLocalShellCallStatusIncomplete BetaResponseInputItemLocalShellCallStatus = "incomplete"` + + - `Type LocalShellCall` + + The type of the local shell call. Always `local_shell_call`. + + - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"` + + - `Agent BetaResponseInputItemLocalShellCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemLocalShellCallOutput struct{…}` + + The output of a local shell tool call. + + - `ID string` + + The unique ID of the local shell tool call generated by the model. + + - `Output string` + + A JSON string of the output of the local shell tool call. + + - `Type LocalShellCallOutput` + + The type of the local shell tool call output. Always `local_shell_call_output`. + + - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"` + + - `Agent BetaResponseInputItemLocalShellCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status string` + + The status of the item. One of `in_progress`, `completed`, or `incomplete`. + + - `const BetaResponseInputItemLocalShellCallOutputStatusInProgress BetaResponseInputItemLocalShellCallOutputStatus = "in_progress"` + + - `const BetaResponseInputItemLocalShellCallOutputStatusCompleted BetaResponseInputItemLocalShellCallOutputStatus = "completed"` + + - `const BetaResponseInputItemLocalShellCallOutputStatusIncomplete BetaResponseInputItemLocalShellCallOutputStatus = "incomplete"` + + - `type BetaResponseInputItemShellCall struct{…}` + + A tool representing a request to execute one or more shell commands. + + - `Action BetaResponseInputItemShellCallAction` + + The shell commands and limits that describe how to run the tool call. + + - `Commands []string` + + Ordered shell commands for the execution environment to run. + + - `MaxOutputLength int64` + + Maximum number of UTF-8 characters to capture from combined stdout and stderr output. + + - `TimeoutMs int64` + + Maximum wall-clock time in milliseconds to allow the shell commands to run. + + - `CallID string` + + The unique ID of the shell tool call generated by the model. + + - `Type ShellCall` + + The type of the item. Always `shell_call`. + + - `const ShellCallShellCall ShellCall = "shell_call"` + + - `ID string` + + The unique ID of the shell tool call. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemShellCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseInputItemShellCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseInputItemShellCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseInputItemShellCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Environment BetaResponseInputItemShellCallEnvironmentUnion` + + The environment to execute the shell commands in. + + - `type BetaLocalEnvironment struct{…}` + + - `type BetaContainerReference struct{…}` + + - `Status string` + + The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. + + - `const BetaResponseInputItemShellCallStatusInProgress BetaResponseInputItemShellCallStatus = "in_progress"` + + - `const BetaResponseInputItemShellCallStatusCompleted BetaResponseInputItemShellCallStatus = "completed"` + + - `const BetaResponseInputItemShellCallStatusIncomplete BetaResponseInputItemShellCallStatus = "incomplete"` + + - `type BetaResponseInputItemShellCallOutput struct{…}` + + The streamed output items emitted by a shell tool call. + + - `CallID string` + + The unique ID of the shell tool call generated by the model. + + - `Output []BetaResponseFunctionShellCallOutputContent` + + Captured chunks of stdout and stderr output, along with their associated outcomes. + + - `Outcome BetaResponseFunctionShellCallOutputContentOutcomeUnion` + + The exit or timeout outcome associated with this shell call. + + - `type BetaResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}` + + Indicates that the shell call exceeded its configured time limit. + + - `Type Timeout` + + The outcome type. Always `timeout`. + + - `const TimeoutTimeout Timeout = "timeout"` + + - `type BetaResponseFunctionShellCallOutputContentOutcomeExit struct{…}` + + Indicates that the shell commands finished and returned an exit code. + + - `ExitCode int64` + + The exit code returned by the shell process. + + - `Type Exit` + + The outcome type. Always `exit`. + + - `const ExitExit Exit = "exit"` + + - `Stderr string` + + Captured stderr output for the shell call. + + - `Stdout string` + + Captured stdout output for the shell call. + + - `Type ShellCallOutput` + + The type of the item. Always `shell_call_output`. + + - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + + - `ID string` + + The unique ID of the shell tool call output. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemShellCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseInputItemShellCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseInputItemShellCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseInputItemShellCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `MaxOutputLength int64` + + The maximum number of UTF-8 characters captured for this shell call's combined output. + + - `Status string` + + The status of the shell call output. + + - `const BetaResponseInputItemShellCallOutputStatusInProgress BetaResponseInputItemShellCallOutputStatus = "in_progress"` + + - `const BetaResponseInputItemShellCallOutputStatusCompleted BetaResponseInputItemShellCallOutputStatus = "completed"` + + - `const BetaResponseInputItemShellCallOutputStatusIncomplete BetaResponseInputItemShellCallOutputStatus = "incomplete"` + + - `type BetaResponseInputItemApplyPatchCall struct{…}` + + A tool call representing a request to create, delete, or update files using diff patches. + + - `CallID string` + + The unique ID of the apply patch tool call generated by the model. + + - `Operation BetaResponseInputItemApplyPatchCallOperationUnion` + + The specific create, delete, or update instruction for the apply_patch tool call. + + - `type BetaResponseInputItemApplyPatchCallOperationCreateFile struct{…}` + + Instruction for creating a new file via the apply_patch tool. + + - `Diff string` + + Unified diff content to apply when creating the file. + + - `Path string` + + Path of the file to create relative to the workspace root. + + - `Type CreateFile` + + The operation type. Always `create_file`. + + - `const CreateFileCreateFile CreateFile = "create_file"` + + - `type BetaResponseInputItemApplyPatchCallOperationDeleteFile struct{…}` + + Instruction for deleting an existing file via the apply_patch tool. + + - `Path string` + + Path of the file to delete relative to the workspace root. + + - `Type DeleteFile` + + The operation type. Always `delete_file`. + + - `const DeleteFileDeleteFile DeleteFile = "delete_file"` + + - `type BetaResponseInputItemApplyPatchCallOperationUpdateFile struct{…}` + + Instruction for updating an existing file via the apply_patch tool. + + - `Diff string` + + Unified diff content to apply to the existing file. + + - `Path string` + + Path of the file to update relative to the workspace root. + + - `Type UpdateFile` + + The operation type. Always `update_file`. + + - `const UpdateFileUpdateFile UpdateFile = "update_file"` + + - `Status string` + + The status of the apply patch tool call. One of `in_progress` or `completed`. + + - `const BetaResponseInputItemApplyPatchCallStatusInProgress BetaResponseInputItemApplyPatchCallStatus = "in_progress"` + + - `const BetaResponseInputItemApplyPatchCallStatusCompleted BetaResponseInputItemApplyPatchCallStatus = "completed"` + + - `Type ApplyPatchCall` + + The type of the item. Always `apply_patch_call`. + + - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + + - `ID string` + + The unique ID of the apply patch tool call. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemApplyPatchCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseInputItemApplyPatchCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseInputItemApplyPatchCallCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseInputItemApplyPatchCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type BetaResponseInputItemApplyPatchCallOutput struct{…}` + + The streamed output emitted by an apply patch tool call. + + - `CallID string` + + The unique ID of the apply patch tool call generated by the model. + + - `Status string` + + The status of the apply patch tool call output. One of `completed` or `failed`. + + - `const BetaResponseInputItemApplyPatchCallOutputStatusCompleted BetaResponseInputItemApplyPatchCallOutputStatus = "completed"` + + - `const BetaResponseInputItemApplyPatchCallOutputStatusFailed BetaResponseInputItemApplyPatchCallOutputStatus = "failed"` + + - `Type ApplyPatchCallOutput` + + The type of the item. Always `apply_patch_call_output`. + + - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + + - `ID string` + + The unique ID of the apply patch tool call output. Populated when this item is returned via API. + + - `Agent BetaResponseInputItemApplyPatchCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseInputItemApplyPatchCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseInputItemApplyPatchCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseInputItemApplyPatchCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Output string` + + Optional human-readable log text from the apply patch tool (e.g., patch results or errors). + + - `type BetaResponseInputItemMcpListTools struct{…}` + + A list of tools available on an MCP server. + + - `ID string` + + The unique ID of the list. + + - `ServerLabel string` + + The label of the MCP server. + + - `Tools []BetaResponseInputItemMcpListToolsTool` + + The tools available on the server. + + - `InputSchema any` + + The JSON schema describing the tool's input. + + - `Name string` + + The name of the tool. + + - `Annotations any` + + Additional annotations about the tool. + + - `Description string` + + The description of the tool. + + - `Type McpListTools` + + The type of the item. Always `mcp_list_tools`. + + - `const McpListToolsMcpListTools McpListTools = "mcp_list_tools"` + + - `Agent BetaResponseInputItemMcpListToolsAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Error string` + + Error message if the server could not list tools. + + - `type BetaResponseInputItemMcpApprovalRequest struct{…}` + + A request for human approval of a tool invocation. + + - `ID string` + + The unique ID of the approval request. + + - `Arguments string` + + A JSON string of arguments for the tool. + + - `Name string` + + The name of the tool to run. + + - `ServerLabel string` + + The label of the MCP server making the request. + + - `Type McpApprovalRequest` + + The type of the item. Always `mcp_approval_request`. + + - `const McpApprovalRequestMcpApprovalRequest McpApprovalRequest = "mcp_approval_request"` + + - `Agent BetaResponseInputItemMcpApprovalRequestAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemMcpApprovalResponse struct{…}` + + A response to an MCP approval request. + + - `ApprovalRequestID string` + + The ID of the approval request being answered. + + - `Approve bool` + + Whether the request was approved. + + - `Type McpApprovalResponse` + + The type of the item. Always `mcp_approval_response`. + + - `const McpApprovalResponseMcpApprovalResponse McpApprovalResponse = "mcp_approval_response"` + + - `ID string` + + The unique ID of the approval response + + - `Agent BetaResponseInputItemMcpApprovalResponseAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Reason string` + + Optional reason for the decision. + + - `type BetaResponseInputItemMcpCall struct{…}` + + An invocation of a tool on an MCP server. + + - `ID string` + + The unique ID of the tool call. + + - `Arguments string` + + A JSON string of the arguments passed to the tool. + + - `Name string` + + The name of the tool that was run. + + - `ServerLabel string` + + The label of the MCP server running the tool. + + - `Type McpCall` + + The type of the item. Always `mcp_call`. + + - `const McpCallMcpCall McpCall = "mcp_call"` + + - `Agent BetaResponseInputItemMcpCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `ApprovalRequestID string` + + Unique identifier for the MCP tool call approval request. + Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call. + + - `Error string` + + The error from the tool call, if any. + + - `Output string` + + The output from the tool call. + + - `Status string` + + The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`. + + - `const BetaResponseInputItemMcpCallStatusInProgress BetaResponseInputItemMcpCallStatus = "in_progress"` + + - `const BetaResponseInputItemMcpCallStatusCompleted BetaResponseInputItemMcpCallStatus = "completed"` + + - `const BetaResponseInputItemMcpCallStatusIncomplete BetaResponseInputItemMcpCallStatus = "incomplete"` + + - `const BetaResponseInputItemMcpCallStatusCalling BetaResponseInputItemMcpCallStatus = "calling"` + + - `const BetaResponseInputItemMcpCallStatusFailed BetaResponseInputItemMcpCallStatus = "failed"` + + - `type BetaResponseCustomToolCallOutput struct{…}` + + The output of a custom tool call from your code, being sent back to the model. + + - `CallID string` + + The call ID, used to map this custom tool call output to a custom tool call. + + - `Output BetaResponseCustomToolCallOutputOutputUnion` + + The output from the custom tool call generated by your code. + Can be a string or an list of output content. + + - `string` + + - `type BetaResponseCustomToolCallOutputOutputOutputContentList []BetaResponseCustomToolCallOutputOutputOutputContentListItemUnion` + + Text, image, or file output of the custom tool call. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type CustomToolCallOutput` + + The type of the custom tool call output. Always `custom_tool_call_output`. + + - `const CustomToolCallOutputCustomToolCallOutput CustomToolCallOutput = "custom_tool_call_output"` + + - `ID string` + + The unique ID of the custom tool call output in the OpenAI platform. + + - `Agent BetaResponseCustomToolCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseCustomToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseCustomToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseCustomToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `type BetaResponseCustomToolCall struct{…}` + + A call to a custom tool created by the model. + + - `CallID string` + + An identifier used to map this custom tool call to a tool call output. + + - `Input string` + + The input for the custom tool call generated by the model. + + - `Name string` + + The name of the custom tool being called. + + - `Type CustomToolCall` + + The type of the custom tool call. Always `custom_tool_call`. + + - `const CustomToolCallCustomToolCall CustomToolCall = "custom_tool_call"` + + - `ID string` + + The unique ID of the custom tool call in the OpenAI platform. + + - `Agent BetaResponseCustomToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseCustomToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseCustomToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseCustomToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `Namespace string` + + The namespace of the custom tool being called. + + - `type BetaResponseInputItemCompactionTrigger struct{…}` + + Compacts the current context. Must be the final input item. + + - `Type CompactionTrigger` + + The type of the item. Always `compaction_trigger`. + + - `const CompactionTriggerCompactionTrigger CompactionTrigger = "compaction_trigger"` + + - `Agent BetaResponseInputItemCompactionTriggerAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemItemReference struct{…}` + + An internal identifier for an item to reference. + + - `ID string` + + The ID of the item to reference. + + - `Agent BetaResponseInputItemItemReferenceAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Type string` + + The type of item to reference. Always `item_reference`. + + - `const BetaResponseInputItemItemReferenceTypeItemReference BetaResponseInputItemItemReferenceType = "item_reference"` + + - `type BetaResponseInputItemProgram struct{…}` + + - `ID string` + + The unique ID of this program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The item type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Agent BetaResponseInputItemProgramAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseInputItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of this program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output. + + - `const BetaResponseInputItemProgramOutputStatusCompleted BetaResponseInputItemProgramOutputStatus = "completed"` + + - `const BetaResponseInputItemProgramOutputStatusIncomplete BetaResponseInputItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The item type. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + + - `Agent BetaResponseInputItemProgramOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + +### Beta Response Input Message Content List + +- `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` + + A list of one or many input items to the model, containing different content + types. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input Message Item + +- `type BetaResponseInputMessageItem struct{…}` + + - `ID string` + + The unique ID of the message input. + + - `Content BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Role BetaResponseInputMessageItemRole` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"` + + - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"` + + - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"` + + - `Type Message` + + The type of the message input. Always set to `message`. + + - `const MessageMessage Message = "message"` + + - `Agent BetaResponseInputMessageItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status BetaResponseInputMessageItemStatus` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"` + + - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"` + + - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"` + +### Beta Response Input Text + +- `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Input Text Content + +- `type BetaResponseInputTextContent struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextContentPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + +### Beta Response Item + +- `type BetaResponseItemUnion interface{…}` + + Content item used to generate a response. + + - `type BetaResponseInputMessageItem struct{…}` + + - `ID string` + + The unique ID of the message input. + + - `Content BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Role BetaResponseInputMessageItemRole` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `const BetaResponseInputMessageItemRoleUser BetaResponseInputMessageItemRole = "user"` + + - `const BetaResponseInputMessageItemRoleSystem BetaResponseInputMessageItemRole = "system"` + + - `const BetaResponseInputMessageItemRoleDeveloper BetaResponseInputMessageItemRole = "developer"` + + - `Type Message` + + The type of the message input. Always set to `message`. + + - `const MessageMessage Message = "message"` + + - `Agent BetaResponseInputMessageItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status BetaResponseInputMessageItemStatus` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseInputMessageItemStatusInProgress BetaResponseInputMessageItemStatus = "in_progress"` + + - `const BetaResponseInputMessageItemStatusCompleted BetaResponseInputMessageItemStatus = "completed"` + + - `const BetaResponseInputMessageItemStatusIncomplete BetaResponseInputMessageItemStatus = "incomplete"` + + - `type BetaResponseOutputMessage struct{…}` + + An output message from the model. + + - `ID string` + + The unique ID of the output message. + + - `Content []BetaResponseOutputMessageContentUnion` + + The content of the output message. + + - `type BetaResponseOutputText struct{…}` + + A text output from the model. + + - `Annotations []BetaResponseOutputTextAnnotationUnion` + + The annotations of the text output. + + - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` + + A citation to a file. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the file cited. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FileCitation` + + The type of the file citation. Always `file_citation`. + + - `const FileCitationFileCitation FileCitation = "file_citation"` + + - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` + + A citation for a web resource used to generate a model response. + + - `EndIndex int64` + + The index of the last character of the URL citation in the message. + + - `StartIndex int64` + + The index of the first character of the URL citation in the message. + + - `Title string` + + The title of the web resource. + + - `Type URLCitation` + + The type of the URL citation. Always `url_citation`. + + - `const URLCitationURLCitation URLCitation = "url_citation"` + + - `URL string` + + The URL of the web resource. + + - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` + + A citation for a container file used to generate a model response. + + - `ContainerID string` + + The ID of the container file. + + - `EndIndex int64` + + The index of the last character of the container file citation in the message. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the container file citation in the message. + + - `Type ContainerFileCitation` + + The type of the container file citation. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `type BetaResponseOutputTextAnnotationFilePath struct{…}` + + A path to a file. + + - `FileID string` + + The ID of the file. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FilePath` + + The type of the file path. Always `file_path`. + + - `const FilePathFilePath FilePath = "file_path"` + + - `Text string` + + The text output from the model. + + - `Type OutputText` + + The type of the output text. Always `output_text`. + + - `const OutputTextOutputText OutputText = "output_text"` + + - `Logprobs []BetaResponseOutputTextLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `type BetaResponseOutputRefusal struct{…}` + + A refusal from the model. + + - `Refusal string` + + The refusal explanation from the model. + + - `Type Refusal` + + The type of the refusal. Always `refusal`. + + - `const RefusalRefusal Refusal = "refusal"` + + - `Role Assistant` + + The role of the output message. Always `assistant`. + + - `const AssistantAssistant Assistant = "assistant"` + + - `Status BetaResponseOutputMessageStatus` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"` + + - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"` + + - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"` + + - `Type Message` + + The type of the output message. Always `message`. + + - `const MessageMessage Message = "message"` + + - `Agent BetaResponseOutputMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Phase BetaResponseOutputMessagePhase` + + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + + - `type BetaResponseFileSearchToolCall struct{…}` + + The results of a file search tool call. See the + [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more information. + + - `ID string` + + The unique ID of the file search tool call. + + - `Queries []string` + + The queries used to search for files. + + - `Status BetaResponseFileSearchToolCallStatus` + + The status of the file search tool call. One of `in_progress`, + `searching`, `incomplete` or `failed`, + + - `const BetaResponseFileSearchToolCallStatusInProgress BetaResponseFileSearchToolCallStatus = "in_progress"` + + - `const BetaResponseFileSearchToolCallStatusSearching BetaResponseFileSearchToolCallStatus = "searching"` + + - `const BetaResponseFileSearchToolCallStatusCompleted BetaResponseFileSearchToolCallStatus = "completed"` + + - `const BetaResponseFileSearchToolCallStatusIncomplete BetaResponseFileSearchToolCallStatus = "incomplete"` + + - `const BetaResponseFileSearchToolCallStatusFailed BetaResponseFileSearchToolCallStatus = "failed"` + + - `Type FileSearchCall` + + The type of the file search tool call. Always `file_search_call`. + + - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"` + + - `Agent BetaResponseFileSearchToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Results []BetaResponseFileSearchToolCallResult` + + The results of the file search tool call. + + - `Attributes map[string, BetaResponseFileSearchToolCallResultAttributeUnion]` + + Set of 16 key-value pairs that can be attached to an object. This can be + useful for storing additional information about the object in a structured + format, and querying for objects via API or the dashboard. Keys are strings + with a maximum length of 64 characters. Values are strings with a maximum + length of 512 characters, booleans, or numbers. + + - `string` + + - `float64` + + - `bool` + + - `FileID string` + + The unique ID of the file. + + - `Filename string` + + The name of the file. + + - `Score float64` + + The relevance score of the file - a value between 0 and 1. + + - `Text string` + + The text that was retrieved from the file. + + - `type BetaResponseComputerToolCall struct{…}` + + A tool call to a computer use tool. See the + [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more information. + + - `ID string` + + The unique ID of the computer call. + + - `CallID string` + + An identifier used when responding to the tool call with output. + + - `PendingSafetyChecks []BetaResponseComputerToolCallPendingSafetyCheck` + + The pending safety checks for the computer call. + + - `ID string` + + The ID of the pending safety check. + + - `Code string` + + The type of the pending safety check. + + - `Message string` + + Details about the pending safety check. + + - `Status BetaResponseComputerToolCallStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseComputerToolCallStatusInProgress BetaResponseComputerToolCallStatus = "in_progress"` + + - `const BetaResponseComputerToolCallStatusCompleted BetaResponseComputerToolCallStatus = "completed"` + + - `const BetaResponseComputerToolCallStatusIncomplete BetaResponseComputerToolCallStatus = "incomplete"` + + - `Type BetaResponseComputerToolCallType` + + The type of the computer call. Always `computer_call`. + + - `const BetaResponseComputerToolCallTypeComputerCall BetaResponseComputerToolCallType = "computer_call"` + + - `Action BetaComputerActionUnion` + + A click action. + + - `type BetaComputerActionClick struct{…}` + + A click action. + + - `Button string` + + Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`. + + - `const BetaComputerActionClickButtonLeft BetaComputerActionClickButton = "left"` + + - `const BetaComputerActionClickButtonRight BetaComputerActionClickButton = "right"` + + - `const BetaComputerActionClickButtonWheel BetaComputerActionClickButton = "wheel"` + + - `const BetaComputerActionClickButtonBack BetaComputerActionClickButton = "back"` + + - `const BetaComputerActionClickButtonForward BetaComputerActionClickButton = "forward"` + + - `Type Click` + + Specifies the event type. For a click action, this property is always `click`. + + - `const ClickClick Click = "click"` + + - `X int64` + + The x-coordinate where the click occurred. + + - `Y int64` + + The y-coordinate where the click occurred. + + - `Keys []string` + + The keys being held while clicking. + + - `type BetaComputerActionDoubleClick struct{…}` + + A double click action. + + - `Keys []string` + + The keys being held while double-clicking. + + - `Type DoubleClick` + + Specifies the event type. For a double click action, this property is always set to `double_click`. + + - `const DoubleClickDoubleClick DoubleClick = "double_click"` + + - `X int64` + + The x-coordinate where the double click occurred. + + - `Y int64` + + The y-coordinate where the double click occurred. + + - `type BetaComputerActionDrag struct{…}` + + A drag action. + + - `Path []BetaComputerActionDragPath` + + An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg + + ``` + [ + { x: 100, y: 200 }, + { x: 200, y: 300 } + ] + ``` + + - `X int64` + + The x-coordinate. + + - `Y int64` + + The y-coordinate. + + - `Type Drag` + + Specifies the event type. For a drag action, this property is always set to `drag`. + + - `const DragDrag Drag = "drag"` + + - `Keys []string` + + The keys being held while dragging the mouse. + + - `type BetaComputerActionKeypress struct{…}` + + A collection of keypresses the model would like to perform. + + - `Keys []string` + + The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. + + - `Type Keypress` + + Specifies the event type. For a keypress action, this property is always set to `keypress`. + + - `const KeypressKeypress Keypress = "keypress"` + + - `type BetaComputerActionMove struct{…}` + + A mouse move action. + + - `Type Move` + + Specifies the event type. For a move action, this property is always set to `move`. + + - `const MoveMove Move = "move"` + + - `X int64` + + The x-coordinate to move to. + + - `Y int64` + + The y-coordinate to move to. + + - `Keys []string` + + The keys being held while moving the mouse. + + - `type BetaComputerActionScreenshot struct{…}` + + A screenshot action. + + - `Type Screenshot` + + Specifies the event type. For a screenshot action, this property is always set to `screenshot`. + + - `const ScreenshotScreenshot Screenshot = "screenshot"` + + - `type BetaComputerActionScroll struct{…}` + + A scroll action. + + - `ScrollX int64` + + The horizontal scroll distance. + + - `ScrollY int64` + + The vertical scroll distance. + + - `Type Scroll` + + Specifies the event type. For a scroll action, this property is always set to `scroll`. + + - `const ScrollScroll Scroll = "scroll"` + + - `X int64` + + The x-coordinate where the scroll occurred. + + - `Y int64` + + The y-coordinate where the scroll occurred. + + - `Keys []string` + + The keys being held while scrolling. + + - `type BetaComputerActionType struct{…}` + + An action to type in text. + + - `Text string` + + The text to type. + + - `Type Type` + + Specifies the event type. For a type action, this property is always set to `type`. + + - `const TypeType Type = "type"` + + - `type BetaComputerActionWait struct{…}` + + A wait action. + + - `Type Wait` + + Specifies the event type. For a wait action, this property is always set to `wait`. + + - `const WaitWait Wait = "wait"` + + - `Actions BetaComputerActionList` + + Flattened batched actions for `computer_use`. Each action includes an + `type` discriminator and action-specific fields. + + - `type BetaComputerActionClick struct{…}` + + A click action. + + - `type BetaComputerActionDoubleClick struct{…}` + + A double click action. + + - `type BetaComputerActionDrag struct{…}` + + A drag action. + + - `type BetaComputerActionKeypress struct{…}` + + A collection of keypresses the model would like to perform. + + - `type BetaComputerActionMove struct{…}` + + A mouse move action. + + - `type BetaComputerActionScreenshot struct{…}` + + A screenshot action. + + - `type BetaComputerActionScroll struct{…}` + + A scroll action. + + - `type BetaComputerActionType struct{…}` + + An action to type in text. + + - `type BetaComputerActionWait struct{…}` + + A wait action. + + - `Agent BetaResponseComputerToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseComputerToolCallOutputItem struct{…}` + + - `ID string` + + The unique ID of the computer call tool output. + + - `CallID string` + + The ID of the computer tool call that produced the output. + + - `Output BetaResponseComputerToolCallOutputScreenshot` + + A computer screenshot image used with the computer use tool. + + - `Type ComputerScreenshot` + + Specifies the event type. For a computer screenshot, this property is + always set to `computer_screenshot`. + + - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"` + + - `FileID string` + + The identifier of an uploaded file that contains the screenshot. + + - `ImageURL string` + + The URL of the screenshot image. + + - `Status BetaResponseComputerToolCallOutputItemStatus` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseComputerToolCallOutputItemStatusCompleted BetaResponseComputerToolCallOutputItemStatus = "completed"` + + - `const BetaResponseComputerToolCallOutputItemStatusIncomplete BetaResponseComputerToolCallOutputItemStatus = "incomplete"` + + - `const BetaResponseComputerToolCallOutputItemStatusFailed BetaResponseComputerToolCallOutputItemStatus = "failed"` + + - `const BetaResponseComputerToolCallOutputItemStatusInProgress BetaResponseComputerToolCallOutputItemStatus = "in_progress"` + + - `Type ComputerCallOutput` + + The type of the computer tool call output. Always `computer_call_output`. + + - `const ComputerCallOutputComputerCallOutput ComputerCallOutput = "computer_call_output"` + + - `AcknowledgedSafetyChecks []BetaResponseComputerToolCallOutputItemAcknowledgedSafetyCheck` + + The safety checks reported by the API that have been acknowledged by the + developer. + + - `ID string` + + The ID of the pending safety check. + + - `Code string` + + The type of the pending safety check. + + - `Message string` + + Details about the pending safety check. + + - `Agent BetaResponseComputerToolCallOutputItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseFunctionWebSearch struct{…}` + + The results of a web search tool call. See the + [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more information. + + - `ID string` + + The unique ID of the web search tool call. + + - `Action BetaResponseFunctionWebSearchActionUnion` + + An object describing the specific action taken in this web search call. + Includes details on how the model used the web (search, open_page, find_in_page). + + - `type BetaResponseFunctionWebSearchActionSearch struct{…}` + + Action type "search" - Performs a web search query. + + - `Type Search` + + The action type. + + - `const SearchSearch Search = "search"` + + - `Queries []string` + + The search queries. + + - `Query string` + + The search query. + + - `Sources []BetaResponseFunctionWebSearchActionSearchSource` + + The sources used in the search. + + - `Type URL` + + The type of source. Always `url`. + + - `const URLURL URL = "url"` + + - `URL string` + + The URL of the source. + + - `type BetaResponseFunctionWebSearchActionOpenPage struct{…}` + + Action type "open_page" - Opens a specific URL from search results. + + - `Type OpenPage` + + The action type. + + - `const OpenPageOpenPage OpenPage = "open_page"` + + - `URL string` + + The URL opened by the model. + + - `type BetaResponseFunctionWebSearchActionFindInPage struct{…}` + + Action type "find_in_page": Searches for a pattern within a loaded page. + + - `Pattern string` + + The pattern or text to search for within the page. + + - `Type FindInPage` + + The action type. + + - `const FindInPageFindInPage FindInPage = "find_in_page"` + + - `URL string` + + The URL of the page searched for the pattern. + + - `Status BetaResponseFunctionWebSearchStatus` + + The status of the web search tool call. + + - `const BetaResponseFunctionWebSearchStatusInProgress BetaResponseFunctionWebSearchStatus = "in_progress"` + + - `const BetaResponseFunctionWebSearchStatusSearching BetaResponseFunctionWebSearchStatus = "searching"` + + - `const BetaResponseFunctionWebSearchStatusCompleted BetaResponseFunctionWebSearchStatus = "completed"` + + - `const BetaResponseFunctionWebSearchStatusFailed BetaResponseFunctionWebSearchStatus = "failed"` + + - `Type WebSearchCall` + + The type of the web search tool call. Always `web_search_call`. + + - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"` + + - `Agent BetaResponseFunctionWebSearchAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseFunctionToolCallItem struct{…}` + + A tool call to run a function. See the + [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more information. + + - `ID string` + + The unique ID of the function tool call. + + - `Status string` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseFunctionToolCallItemStatusInProgress BetaResponseFunctionToolCallItemStatus = "in_progress"` + + - `const BetaResponseFunctionToolCallItemStatusCompleted BetaResponseFunctionToolCallItemStatus = "completed"` + + - `const BetaResponseFunctionToolCallItemStatusIncomplete BetaResponseFunctionToolCallItemStatus = "incomplete"` + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseFunctionToolCallOutputItem struct{…}` + + - `ID string` + + The unique ID of the function call tool output. + + - `CallID string` + + The unique ID of the function tool call generated by the model. + + - `Output BetaResponseFunctionToolCallOutputItemOutputUnion` + + The output from the function call generated by your code. + Can be a string or an list of output content. + + - `string` + + - `type BetaResponseFunctionToolCallOutputItemOutputOutputContentList []BetaResponseFunctionToolCallOutputItemOutputOutputContentListItemUnion` + + Text, image, or file output of the function call. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Status BetaResponseFunctionToolCallOutputItemStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseFunctionToolCallOutputItemStatusInProgress BetaResponseFunctionToolCallOutputItemStatus = "in_progress"` + + - `const BetaResponseFunctionToolCallOutputItemStatusCompleted BetaResponseFunctionToolCallOutputItemStatus = "completed"` + + - `const BetaResponseFunctionToolCallOutputItemStatusIncomplete BetaResponseFunctionToolCallOutputItemStatus = "incomplete"` + + - `Type FunctionCallOutput` + + The type of the function tool call output. Always `function_call_output`. + + - `const FunctionCallOutputFunctionCallOutput FunctionCallOutput = "function_call_output"` + + - `Agent BetaResponseFunctionToolCallOutputItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseFunctionToolCallOutputItemCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseFunctionToolCallOutputItemCallerDirect struct{…}` + + - `Type Direct` + + The caller type. Always `direct`. + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseFunctionToolCallOutputItemCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + The caller type. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseItemAgentMessage struct{…}` + + - `ID string` + + The unique ID of the agent message. + + - `Author string` + + The sending agent identity. + + - `Content []BetaResponseItemAgentMessageContentUnion` + + Encrypted content sent between agents. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `type BetaResponseOutputText struct{…}` + + A text output from the model. + + - `type BetaResponseItemAgentMessageContentText struct{…}` + + A text content. + + - `Text string` + + - `Type Text` + + - `const TextText Text = "text"` + + - `type BetaResponseItemAgentMessageContentSummaryText struct{…}` + + A summary text from the model. + + - `Text string` + + A summary of the reasoning output from the model so far. + + - `Type SummaryText` + + The type of the object. Always `summary_text`. + + - `const SummaryTextSummaryText SummaryText = "summary_text"` + + - `type BetaResponseItemAgentMessageContentReasoningText struct{…}` + + Reasoning text from the model. + + - `Text string` + + The reasoning text from the model. + + - `Type ReasoningText` + + The type of the reasoning text. Always `reasoning_text`. + + - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"` + + - `type BetaResponseOutputRefusal struct{…}` + + A refusal from the model. + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `type BetaResponseItemAgentMessageContentComputerScreenshot struct{…}` + + A screenshot of a computer. + + - `Detail string` + + The detail level of the screenshot image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailLow BetaResponseItemAgentMessageContentComputerScreenshotDetail = "low"` + + - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailHigh BetaResponseItemAgentMessageContentComputerScreenshotDetail = "high"` + + - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailAuto BetaResponseItemAgentMessageContentComputerScreenshotDetail = "auto"` + + - `const BetaResponseItemAgentMessageContentComputerScreenshotDetailOriginal BetaResponseItemAgentMessageContentComputerScreenshotDetail = "original"` + + - `FileID string` + + The identifier of an uploaded file that contains the screenshot. + + - `ImageURL string` + + The URL of the screenshot image. + + - `Type ComputerScreenshot` + + Specifies the event type. For a computer screenshot, this property is always set to `computer_screenshot`. + + - `const ComputerScreenshotComputerScreenshot ComputerScreenshot = "computer_screenshot"` + + - `PromptCacheBreakpoint BetaResponseItemAgentMessageContentComputerScreenshotPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `type BetaResponseItemAgentMessageContentEncryptedContent struct{…}` + + Opaque encrypted content that Responses API decrypts inside trusted model execution. + + - `EncryptedContent string` + + Opaque encrypted content. + + - `Type EncryptedContent` + + The type of the input item. Always `encrypted_content`. + + - `const EncryptedContentEncryptedContent EncryptedContent = "encrypted_content"` + + - `Recipient string` + + The destination agent identity. + + - `Type AgentMessage` + + The type of the item. Always `agent_message`. + + - `const AgentMessageAgentMessage AgentMessage = "agent_message"` + + - `Agent BetaResponseItemAgentMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseItemMultiAgentCall struct{…}` + + - `ID string` + + The unique ID of the multi-agent call item. + + - `Action string` + + The multi-agent action to execute. + + - `const BetaResponseItemMultiAgentCallActionSpawnAgent BetaResponseItemMultiAgentCallAction = "spawn_agent"` + + - `const BetaResponseItemMultiAgentCallActionInterruptAgent BetaResponseItemMultiAgentCallAction = "interrupt_agent"` + + - `const BetaResponseItemMultiAgentCallActionListAgents BetaResponseItemMultiAgentCallAction = "list_agents"` + + - `const BetaResponseItemMultiAgentCallActionSendMessage BetaResponseItemMultiAgentCallAction = "send_message"` + + - `const BetaResponseItemMultiAgentCallActionFollowupTask BetaResponseItemMultiAgentCallAction = "followup_task"` + + - `const BetaResponseItemMultiAgentCallActionWaitAgent BetaResponseItemMultiAgentCallAction = "wait_agent"` + + - `Arguments string` + + The JSON string of arguments generated for the action. + + - `CallID string` + + The unique ID linking this call to its output. + + - `Type MultiAgentCall` + + The type of the multi-agent call. Always `multi_agent_call`. + + - `const MultiAgentCallMultiAgentCall MultiAgentCall = "multi_agent_call"` + + - `Agent BetaResponseItemMultiAgentCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseItemMultiAgentCallOutput struct{…}` + + - `ID string` + + The unique ID of the multi-agent call output item. + + - `Action string` + + The multi-agent action that produced this result. + + - `const BetaResponseItemMultiAgentCallOutputActionSpawnAgent BetaResponseItemMultiAgentCallOutputAction = "spawn_agent"` + + - `const BetaResponseItemMultiAgentCallOutputActionInterruptAgent BetaResponseItemMultiAgentCallOutputAction = "interrupt_agent"` + + - `const BetaResponseItemMultiAgentCallOutputActionListAgents BetaResponseItemMultiAgentCallOutputAction = "list_agents"` + + - `const BetaResponseItemMultiAgentCallOutputActionSendMessage BetaResponseItemMultiAgentCallOutputAction = "send_message"` + + - `const BetaResponseItemMultiAgentCallOutputActionFollowupTask BetaResponseItemMultiAgentCallOutputAction = "followup_task"` + + - `const BetaResponseItemMultiAgentCallOutputActionWaitAgent BetaResponseItemMultiAgentCallOutputAction = "wait_agent"` + + - `CallID string` + + The unique ID of the multi-agent call. + + - `Output []BetaResponseOutputText` + + Text output returned by the multi-agent action. + + - `Annotations []BetaResponseOutputTextAnnotationUnion` + + The annotations of the text output. + + - `Text string` + + The text output from the model. + + - `Type OutputText` + + The type of the output text. Always `output_text`. + + - `Logprobs []BetaResponseOutputTextLogprob` + + - `Type MultiAgentCallOutput` + + The type of the multi-agent result. Always `multi_agent_call_output`. + + - `const MultiAgentCallOutputMultiAgentCallOutput MultiAgentCallOutput = "multi_agent_call_output"` + + - `Agent BetaResponseItemMultiAgentCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseToolSearchCall struct{…}` + + - `ID string` + + The unique ID of the tool search call item. + + - `Arguments any` + + Arguments used for the tool search call. + + - `CallID string` + + The unique ID of the tool search call generated by the model. + + - `Execution BetaResponseToolSearchCallExecution` + + Whether tool search was executed by the server or by the client. + + - `const BetaResponseToolSearchCallExecutionServer BetaResponseToolSearchCallExecution = "server"` + + - `const BetaResponseToolSearchCallExecutionClient BetaResponseToolSearchCallExecution = "client"` + + - `Status BetaResponseToolSearchCallStatus` + + The status of the tool search call item that was recorded. + + - `const BetaResponseToolSearchCallStatusInProgress BetaResponseToolSearchCallStatus = "in_progress"` + + - `const BetaResponseToolSearchCallStatusCompleted BetaResponseToolSearchCallStatus = "completed"` + + - `const BetaResponseToolSearchCallStatusIncomplete BetaResponseToolSearchCallStatus = "incomplete"` + + - `Type ToolSearchCall` + + The type of the item. Always `tool_search_call`. + + - `const ToolSearchCallToolSearchCall ToolSearchCall = "tool_search_call"` + + - `Agent BetaResponseToolSearchCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseToolSearchOutputItem struct{…}` + + - `ID string` + + The unique ID of the tool search output item. + + - `CallID string` + + The unique ID of the tool search call generated by the model. + + - `Execution BetaResponseToolSearchOutputItemExecution` + + Whether tool search was executed by the server or by the client. + + - `const BetaResponseToolSearchOutputItemExecutionServer BetaResponseToolSearchOutputItemExecution = "server"` + + - `const BetaResponseToolSearchOutputItemExecutionClient BetaResponseToolSearchOutputItemExecution = "client"` + + - `Status BetaResponseToolSearchOutputItemStatus` + + The status of the tool search output item that was recorded. + + - `const BetaResponseToolSearchOutputItemStatusInProgress BetaResponseToolSearchOutputItemStatus = "in_progress"` + + - `const BetaResponseToolSearchOutputItemStatusCompleted BetaResponseToolSearchOutputItemStatus = "completed"` + + - `const BetaResponseToolSearchOutputItemStatusIncomplete BetaResponseToolSearchOutputItemStatus = "incomplete"` + + - `Tools []BetaToolUnion` + + The loaded tool definitions returned by tool search. + + - `type BetaFunctionTool struct{…}` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `Name string` + + The name of the function to call. + + - `Parameters map[string, any]` + + A JSON schema object describing the parameters of the function. + + - `Strict bool` + + Whether strict parameter validation is enforced for this function tool. + + - `Type Function` + + The type of the function tool. Always `function`. + + - `const FunctionFunction Function = "function"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaFunctionToolAllowedCallerDirect BetaFunctionToolAllowedCaller = "direct"` + + - `const BetaFunctionToolAllowedCallerProgrammatic BetaFunctionToolAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this function is deferred and loaded via tool search. + + - `Description string` + + A description of the function. Used by the model to determine whether or not to call the function. + + - `OutputSchema map[string, any]` + + A JSON schema object describing the JSON value encoded in string outputs for this function. + + - `type BetaFileSearchTool struct{…}` + + 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). + + - `Type FileSearch` + + The type of the file search tool. Always `file_search`. + + - `const FileSearchFileSearch FileSearch = "file_search"` + + - `VectorStoreIDs []string` + + The IDs of the vector stores to search. + + - `Filters BetaFileSearchToolFiltersUnion` + + A filter to apply. + + - `type BetaFileSearchToolFiltersComparisonFilter struct{…}` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `Key string` + + The key to compare against the value. + + - `Type string` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `const BetaFileSearchToolFiltersComparisonFilterTypeEq BetaFileSearchToolFiltersComparisonFilterType = "eq"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeNe BetaFileSearchToolFiltersComparisonFilterType = "ne"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeGt BetaFileSearchToolFiltersComparisonFilterType = "gt"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeGte BetaFileSearchToolFiltersComparisonFilterType = "gte"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeLt BetaFileSearchToolFiltersComparisonFilterType = "lt"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeLte BetaFileSearchToolFiltersComparisonFilterType = "lte"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeIn BetaFileSearchToolFiltersComparisonFilterType = "in"` + + - `const BetaFileSearchToolFiltersComparisonFilterTypeNin BetaFileSearchToolFiltersComparisonFilterType = "nin"` + + - `Value BetaFileSearchToolFiltersComparisonFilterValueUnion` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `float64` + + - `bool` + + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` + + - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` + + Combine multiple filters using `and` or `or`. + + - `Filters []BetaFileSearchToolFiltersCompoundFilterFilter` + + Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. + + - `type BetaFileSearchToolFiltersCompoundFilterFilter struct{…}` + + A filter used to compare a specified attribute key to a given value using a defined comparison operation. + + - `Key string` + + The key to compare against the value. + + - `Type string` + + Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. + + - `eq`: equals + - `ne`: not equal + - `gt`: greater than + - `gte`: greater than or equal + - `lt`: less than + - `lte`: less than or equal + - `in`: in + - `nin`: not in + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeEq BetaFileSearchToolFiltersCompoundFilterFilterType = "eq"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNe BetaFileSearchToolFiltersCompoundFilterFilterType = "ne"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGt BetaFileSearchToolFiltersCompoundFilterFilterType = "gt"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeGte BetaFileSearchToolFiltersCompoundFilterFilterType = "gte"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLt BetaFileSearchToolFiltersCompoundFilterFilterType = "lt"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeLte BetaFileSearchToolFiltersCompoundFilterFilterType = "lte"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeIn BetaFileSearchToolFiltersCompoundFilterFilterType = "in"` + + - `const BetaFileSearchToolFiltersCompoundFilterFilterTypeNin BetaFileSearchToolFiltersCompoundFilterFilterType = "nin"` + + - `Value BetaFileSearchToolFiltersCompoundFilterFilterValueUnion` + + The value to compare against the attribute key; supports string, number, or boolean types. + + - `string` + + - `float64` + + - `bool` + + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` + + - `Type string` + + Type of operation: `and` or `or`. + + - `const BetaFileSearchToolFiltersCompoundFilterTypeAnd BetaFileSearchToolFiltersCompoundFilterType = "and"` + + - `const BetaFileSearchToolFiltersCompoundFilterTypeOr BetaFileSearchToolFiltersCompoundFilterType = "or"` + + - `MaxNumResults int64` + + The maximum number of results to return. This number should be between 1 and 50 inclusive. + + - `RankingOptions BetaFileSearchToolRankingOptions` + + Ranking options for search. + + - `HybridSearch BetaFileSearchToolRankingOptionsHybridSearch` + + Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled. + + - `EmbeddingWeight float64` + + The weight of the embedding in the reciprocal ranking fusion. + + - `TextWeight float64` + + The weight of the text in the reciprocal ranking fusion. + + - `Ranker string` + + The ranker to use for the file search. + + - `const BetaFileSearchToolRankingOptionsRankerAuto BetaFileSearchToolRankingOptionsRanker = "auto"` + + - `const BetaFileSearchToolRankingOptionsRankerDefault2024_11_15 BetaFileSearchToolRankingOptionsRanker = "default-2024-11-15"` + + - `ScoreThreshold float64` + + The score threshold for the file search, a number between 0 and 1. Numbers closer to 1 will attempt to return only the most relevant results, but may return fewer results. + + - `type BetaComputerTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `Type Computer` + + The type of the computer tool. Always `computer`. + + - `const ComputerComputer Computer = "computer"` + + - `type BetaComputerUsePreviewTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `DisplayHeight int64` + + The height of the computer display. + + - `DisplayWidth int64` + + The width of the computer display. + + - `Environment BetaComputerUsePreviewToolEnvironment` + + The type of computer environment to control. + + - `const BetaComputerUsePreviewToolEnvironmentWindows BetaComputerUsePreviewToolEnvironment = "windows"` + + - `const BetaComputerUsePreviewToolEnvironmentMac BetaComputerUsePreviewToolEnvironment = "mac"` + + - `const BetaComputerUsePreviewToolEnvironmentLinux BetaComputerUsePreviewToolEnvironment = "linux"` + + - `const BetaComputerUsePreviewToolEnvironmentUbuntu BetaComputerUsePreviewToolEnvironment = "ubuntu"` + + - `const BetaComputerUsePreviewToolEnvironmentBrowser BetaComputerUsePreviewToolEnvironment = "browser"` + + - `Type ComputerUsePreview` + + The type of the computer use tool. Always `computer_use_preview`. + + - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"` + + - `type BetaWebSearchTool struct{…}` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `Type BetaWebSearchToolType` + + The type of the web search tool. One of `web_search` or `web_search_2025_08_26`. + + - `const BetaWebSearchToolTypeWebSearch BetaWebSearchToolType = "web_search"` + + - `const BetaWebSearchToolTypeWebSearch2025_08_26 BetaWebSearchToolType = "web_search_2025_08_26"` + + - `Filters BetaWebSearchToolFilters` + + Filters for the search. + + - `AllowedDomains []string` + + Allowed domains for the search. If not provided, all domains are allowed. + Subdomains of the provided domains are allowed as well. + + Example: `["pubmed.ncbi.nlm.nih.gov"]` + + - `SearchContextSize BetaWebSearchToolSearchContextSize` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `const BetaWebSearchToolSearchContextSizeLow BetaWebSearchToolSearchContextSize = "low"` + + - `const BetaWebSearchToolSearchContextSizeMedium BetaWebSearchToolSearchContextSize = "medium"` + + - `const BetaWebSearchToolSearchContextSizeHigh BetaWebSearchToolSearchContextSize = "high"` + + - `UserLocation BetaWebSearchToolUserLocation` + + The approximate location of the user. + + - `City string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `Country string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `Region string` + + Free text input for the region of the user, e.g. `California`. + + - `Timezone string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `Type string` + + The type of location approximation. Always `approximate`. + + - `const BetaWebSearchToolUserLocationTypeApproximate BetaWebSearchToolUserLocationType = "approximate"` + + - `type BetaToolMcp struct{…}` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + + - `ServerLabel string` + + A label for this MCP server, used to identify it in tool calls. + + - `Type Mcp` + + The type of the MCP tool. Always `mcp`. + + - `const McpMcp Mcp = "mcp"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaToolMcpAllowedCallerDirect BetaToolMcpAllowedCaller = "direct"` + + - `const BetaToolMcpAllowedCallerProgrammatic BetaToolMcpAllowedCaller = "programmatic"` + + - `AllowedTools BetaToolMcpAllowedToolsUnion` + + List of allowed tool names or a filter object. + + - `type BetaToolMcpAllowedToolsMcpAllowedTools []string` + + A string array of allowed tool names + + - `type BetaToolMcpAllowedToolsMcpToolFilter struct{…}` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `Authorization string` + + An OAuth access token that can be used with a remote MCP server, either + with a custom MCP server URL or a service connector. Your application + must handle the OAuth authorization flow and provide the token here. + + - `ConnectorID string` + + Identifier for service connectors, like those available in ChatGPT. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more + about service connectors [here](https://platform.openai.com/docs/guides/tools-remote-mcp#connectors). + + Currently supported `connector_id` values are: + + - Dropbox: `connector_dropbox` + - Gmail: `connector_gmail` + - Google Calendar: `connector_googlecalendar` + - Google Drive: `connector_googledrive` + - Microsoft Teams: `connector_microsoftteams` + - Outlook Calendar: `connector_outlookcalendar` + - Outlook Email: `connector_outlookemail` + - SharePoint: `connector_sharepoint` + + - `const BetaToolMcpConnectorIDConnectorDropbox BetaToolMcpConnectorID = "connector_dropbox"` + + - `const BetaToolMcpConnectorIDConnectorGmail BetaToolMcpConnectorID = "connector_gmail"` + + - `const BetaToolMcpConnectorIDConnectorGooglecalendar BetaToolMcpConnectorID = "connector_googlecalendar"` + + - `const BetaToolMcpConnectorIDConnectorGoogledrive BetaToolMcpConnectorID = "connector_googledrive"` + + - `const BetaToolMcpConnectorIDConnectorMicrosoftteams BetaToolMcpConnectorID = "connector_microsoftteams"` + + - `const BetaToolMcpConnectorIDConnectorOutlookcalendar BetaToolMcpConnectorID = "connector_outlookcalendar"` + + - `const BetaToolMcpConnectorIDConnectorOutlookemail BetaToolMcpConnectorID = "connector_outlookemail"` + + - `const BetaToolMcpConnectorIDConnectorSharepoint BetaToolMcpConnectorID = "connector_sharepoint"` + + - `DeferLoading bool` + + Whether this MCP tool is deferred and discovered via tool search. + + - `Headers map[string, string]` + + Optional HTTP headers to send to the MCP server. Use for authentication + or other purposes. + + - `RequireApproval BetaToolMcpRequireApprovalUnion` + + Specify which of the MCP server's tools require approval. + + - `type BetaToolMcpRequireApprovalMcpToolApprovalFilter struct{…}` + + Specify which of the MCP server's tools require approval. Can be + `always`, `never`, or a filter object associated with tools + that require approval. + + - `Always BetaToolMcpRequireApprovalMcpToolApprovalFilterAlways` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `Never BetaToolMcpRequireApprovalMcpToolApprovalFilterNever` + + A filter object to specify which tools are allowed. + + - `ReadOnly bool` + + Indicates whether or not a tool modifies data or is read-only. If an + MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint), + it will match this filter. + + - `ToolNames []string` + + List of allowed tool names. + + - `type BetaToolMcpRequireApprovalMcpToolApprovalSetting string` + + Specify a single approval policy for all tools. One of `always` or + `never`. When set to `always`, all tools will require approval. When + set to `never`, all tools will not require approval. + + - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingAlways BetaToolMcpRequireApprovalMcpToolApprovalSetting = "always"` + + - `const BetaToolMcpRequireApprovalMcpToolApprovalSettingNever BetaToolMcpRequireApprovalMcpToolApprovalSetting = "never"` + + - `ServerDescription string` + + Optional description of the MCP server, used to provide more context. + + - `ServerURL string` + + The URL for the MCP server. One of `server_url`, `connector_id`, or + `tunnel_id` must be provided. + + - `TunnelID string` + + The Secure MCP Tunnel ID to use instead of a direct server URL. One of + `server_url`, `connector_id`, or `tunnel_id` must be provided. + + - `type BetaToolCodeInterpreter struct{…}` + + A tool that runs Python code to help generate a response to a prompt. + + - `Container BetaToolCodeInterpreterContainerUnion` + + The code interpreter container. Can be a container ID or an object that + specifies uploaded file IDs to make available to your code, along with an + optional `memory_limit` setting. + + - `string` + + - `type BetaToolCodeInterpreterContainerCodeInterpreterToolAuto struct{…}` + + Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on. + + - `Type Auto` + + Always `auto`. + + - `const AutoAuto Auto = "auto"` + + - `FileIDs []string` + + An optional list of uploaded files to make available to your code. + + - `MemoryLimit string` + + The memory limit for the code interpreter container. + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"` + + - `const BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g BetaToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"` + + - `NetworkPolicy BetaToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion` + + Network access policy for the container. + + - `type BetaContainerNetworkPolicyDisabled struct{…}` + + - `Type Disabled` + + Disable outbound network access. Always `disabled`. + + - `const DisabledDisabled Disabled = "disabled"` + + - `type BetaContainerNetworkPolicyAllowlist struct{…}` + + - `AllowedDomains []string` + + A list of allowed domains when type is `allowlist`. + + - `Type Allowlist` + + Allow outbound network access only to specified domains. Always `allowlist`. + + - `const AllowlistAllowlist Allowlist = "allowlist"` + + - `DomainSecrets []BetaContainerNetworkPolicyDomainSecret` + + Optional domain-scoped secrets for allowlisted domains. + + - `Domain string` + + The domain associated with the secret. + + - `Name string` + + The name of the secret to inject for the domain. + + - `Value string` + + The secret value to inject for the domain. + + - `Type CodeInterpreter` + + The type of the code interpreter tool. Always `code_interpreter`. + + - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaToolCodeInterpreterAllowedCallerDirect BetaToolCodeInterpreterAllowedCaller = "direct"` + + - `const BetaToolCodeInterpreterAllowedCallerProgrammatic BetaToolCodeInterpreterAllowedCaller = "programmatic"` + + - `type BetaToolProgrammaticToolCalling struct{…}` + + - `Type ProgrammaticToolCalling` + + The type of the tool. Always `programmatic_tool_calling`. + + - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"` + + - `type BetaToolImageGeneration struct{…}` + + A tool that generates images using the GPT image models. + + - `Type ImageGeneration` + + The type of the image generation tool. Always `image_generation`. + + - `const ImageGenerationImageGeneration ImageGeneration = "image_generation"` + + - `Action string` + + Whether to generate a new image or edit an existing image. Default: `auto`. + + - `const BetaToolImageGenerationActionGenerate BetaToolImageGenerationAction = "generate"` + + - `const BetaToolImageGenerationActionEdit BetaToolImageGenerationAction = "edit"` + + - `const BetaToolImageGenerationActionAuto BetaToolImageGenerationAction = "auto"` + + - `Background string` + + Allows to set transparency for the background of the generated image(s). + This parameter is only supported for GPT image models that support + transparent backgrounds. Must be one of `transparent`, `opaque`, or + `auto` (default value). When `auto` is used, the model will + automatically determine the best background for the image. + + `gpt-image-2` and `gpt-image-2-2026-04-21` do not support + transparent backgrounds. Requests with `background` set to + `transparent` will return an error for these models; use `opaque` or + `auto` instead. + + If `transparent`, the output format needs to support transparency, + so it should be set to either `png` (default value) or `webp`. + + - `const BetaToolImageGenerationBackgroundTransparent BetaToolImageGenerationBackground = "transparent"` + + - `const BetaToolImageGenerationBackgroundOpaque BetaToolImageGenerationBackground = "opaque"` + + - `const BetaToolImageGenerationBackgroundAuto BetaToolImageGenerationBackground = "auto"` + + - `InputFidelity string` + + Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`. + + - `const BetaToolImageGenerationInputFidelityHigh BetaToolImageGenerationInputFidelity = "high"` + + - `const BetaToolImageGenerationInputFidelityLow BetaToolImageGenerationInputFidelity = "low"` + + - `InputImageMask BetaToolImageGenerationInputImageMask` + + Optional mask for inpainting. Contains `image_url` + (string, optional) and `file_id` (string, optional). + + - `FileID string` + + File ID for the mask image. + + - `ImageURL string` + + Base64-encoded mask image. + + - `Model string` + + The image generation model to use. Default: `gpt-image-1`. + + - `string` + + - `string` + + - `const BetaToolImageGenerationModelGPTImage1 BetaToolImageGenerationModel = "gpt-image-1"` + + - `const BetaToolImageGenerationModelGPTImage1Mini BetaToolImageGenerationModel = "gpt-image-1-mini"` + + - `const BetaToolImageGenerationModelGPTImage2 BetaToolImageGenerationModel = "gpt-image-2"` + + - `const BetaToolImageGenerationModelGPTImage2_2026_04_21 BetaToolImageGenerationModel = "gpt-image-2-2026-04-21"` + + - `const BetaToolImageGenerationModelGPTImage1_5 BetaToolImageGenerationModel = "gpt-image-1.5"` + + - `const BetaToolImageGenerationModelChatgptImageLatest BetaToolImageGenerationModel = "chatgpt-image-latest"` + + - `Moderation string` + + Moderation level for the generated image. Default: `auto`. + + - `const BetaToolImageGenerationModerationAuto BetaToolImageGenerationModeration = "auto"` + + - `const BetaToolImageGenerationModerationLow BetaToolImageGenerationModeration = "low"` + + - `OutputCompression int64` + + Compression level for the output image. Default: 100. + + - `OutputFormat string` + + The output format of the generated image. One of `png`, `webp`, or + `jpeg`. Default: `png`. + + - `const BetaToolImageGenerationOutputFormatPNG BetaToolImageGenerationOutputFormat = "png"` + + - `const BetaToolImageGenerationOutputFormatWebP BetaToolImageGenerationOutputFormat = "webp"` + + - `const BetaToolImageGenerationOutputFormatJPEG BetaToolImageGenerationOutputFormat = "jpeg"` + + - `PartialImages int64` + + Number of partial images to generate in streaming mode, from 0 (default value) to 3. + + - `Quality string` + + The quality of the generated image. One of `low`, `medium`, `high`, + or `auto`. Default: `auto`. + + - `const BetaToolImageGenerationQualityLow BetaToolImageGenerationQuality = "low"` + + - `const BetaToolImageGenerationQualityMedium BetaToolImageGenerationQuality = "medium"` + + - `const BetaToolImageGenerationQualityHigh BetaToolImageGenerationQuality = "high"` + + - `const BetaToolImageGenerationQualityAuto BetaToolImageGenerationQuality = "auto"` + + - `Size string` + + The size of the generated images. For `gpt-image-2` and `gpt-image-2-2026-04-21`, arbitrary resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and the maximum supported resolution is `3840x2160`. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models; `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`. + + - `string` + + - `string` + + - `const BetaToolImageGenerationSize1024x1024 BetaToolImageGenerationSize = "1024x1024"` + + - `const BetaToolImageGenerationSize1024x1536 BetaToolImageGenerationSize = "1024x1536"` + + - `const BetaToolImageGenerationSize1536x1024 BetaToolImageGenerationSize = "1536x1024"` + + - `const BetaToolImageGenerationSizeAuto BetaToolImageGenerationSize = "auto"` + + - `type BetaToolLocalShell struct{…}` + + A tool that allows the model to execute shell commands in a local environment. + + - `Type LocalShell` + + The type of the local shell tool. Always `local_shell`. + + - `const LocalShellLocalShell LocalShell = "local_shell"` + + - `type BetaFunctionShellTool struct{…}` + + A tool that allows the model to execute shell commands. + + - `Type Shell` + + The type of the shell tool. Always `shell`. + + - `const ShellShell Shell = "shell"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaFunctionShellToolAllowedCallerDirect BetaFunctionShellToolAllowedCaller = "direct"` + + - `const BetaFunctionShellToolAllowedCallerProgrammatic BetaFunctionShellToolAllowedCaller = "programmatic"` + + - `Environment BetaFunctionShellToolEnvironmentUnion` + + - `type BetaContainerAuto struct{…}` + + - `Type ContainerAuto` + + Automatically creates a container for this request + + - `const ContainerAutoContainerAuto ContainerAuto = "container_auto"` + + - `FileIDs []string` + + An optional list of uploaded files to make available to your code. + + - `MemoryLimit BetaContainerAutoMemoryLimit` + + The memory limit for the container. + + - `const BetaContainerAutoMemoryLimit1g BetaContainerAutoMemoryLimit = "1g"` + + - `const BetaContainerAutoMemoryLimit4g BetaContainerAutoMemoryLimit = "4g"` + + - `const BetaContainerAutoMemoryLimit16g BetaContainerAutoMemoryLimit = "16g"` + + - `const BetaContainerAutoMemoryLimit64g BetaContainerAutoMemoryLimit = "64g"` + + - `NetworkPolicy BetaContainerAutoNetworkPolicyUnion` + + Network access policy for the container. + + - `type BetaContainerNetworkPolicyDisabled struct{…}` + + - `type BetaContainerNetworkPolicyAllowlist struct{…}` + + - `Skills []BetaContainerAutoSkillUnion` + + An optional list of skills referenced by id or inline data. + + - `type BetaSkillReference struct{…}` + + - `SkillID string` + + The ID of the referenced skill. + + - `Type SkillReference` + + References a skill created with the /v1/skills endpoint. + + - `const SkillReferenceSkillReference SkillReference = "skill_reference"` + + - `Version string` + + Optional skill version. Use a positive integer or 'latest'. Omit for default. + + - `type BetaInlineSkill struct{…}` + + - `Description string` + + The description of the skill. + + - `Name string` + + The name of the skill. + + - `Source BetaInlineSkillSource` + + Inline skill payload + + - `Data string` + + Base64-encoded skill zip bundle. + + - `MediaType ApplicationZip` + + The media type of the inline skill payload. Must be `application/zip`. + + - `const ApplicationZipApplicationZip ApplicationZip = "application/zip"` + + - `Type Base64` + + The type of the inline skill source. Must be `base64`. + + - `const Base64Base64 Base64 = "base64"` + + - `Type Inline` + + Defines an inline skill for this request. + + - `const InlineInline Inline = "inline"` + + - `type BetaLocalEnvironment struct{…}` + + - `Type Local` + + Use a local computer environment. + + - `const LocalLocal Local = "local"` + + - `Skills []BetaLocalSkill` + + An optional list of skills. + + - `Description string` + + The description of the skill. + + - `Name string` + + The name of the skill. + + - `Path string` + + The path to the directory containing the skill. + + - `type BetaContainerReference struct{…}` + + - `ContainerID string` + + The ID of the referenced container. + + - `Type ContainerReference` + + References a container created with the /v1/containers endpoint + + - `const ContainerReferenceContainerReference ContainerReference = "container_reference"` + + - `type BetaCustomTool struct{…}` + + 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) + + - `Name string` + + The name of the custom tool, used to identify it in tool calls. + + - `Type Custom` + + The type of the custom tool. Always `custom`. + + - `const CustomCustom Custom = "custom"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaCustomToolAllowedCallerDirect BetaCustomToolAllowedCaller = "direct"` + + - `const BetaCustomToolAllowedCallerProgrammatic BetaCustomToolAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this tool should be deferred and discovered via tool search. + + - `Description string` + + Optional description of the custom tool, used to provide more context. + + - `Format BetaCustomToolFormatUnion` + + The input format for the custom tool. Default is unconstrained text. + + - `type BetaCustomToolFormatText struct{…}` + + Unconstrained free-form text. + + - `Type Text` + + Unconstrained text format. Always `text`. + + - `const TextText Text = "text"` + + - `type BetaCustomToolFormatGrammar struct{…}` + + A grammar defined by the user. + + - `Definition string` + + The grammar definition. + + - `Syntax string` + + The syntax of the grammar definition. One of `lark` or `regex`. + + - `const BetaCustomToolFormatGrammarSyntaxLark BetaCustomToolFormatGrammarSyntax = "lark"` + + - `const BetaCustomToolFormatGrammarSyntaxRegex BetaCustomToolFormatGrammarSyntax = "regex"` + + - `Type Grammar` + + Grammar format. Always `grammar`. + + - `const GrammarGrammar Grammar = "grammar"` + + - `type BetaNamespaceTool struct{…}` + + Groups function/custom tools under a shared namespace. + + - `Description string` + + A description of the namespace shown to the model. + + - `Name string` + + The namespace name used in tool calls (for example, `crm`). + + - `Tools []BetaNamespaceToolToolUnion` + + The function/custom tools available inside this namespace. + + - `type BetaNamespaceToolToolFunction struct{…}` + + - `Name string` + + - `Type Function` + + - `const FunctionFunction Function = "function"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaNamespaceToolToolFunctionAllowedCallerDirect BetaNamespaceToolToolFunctionAllowedCaller = "direct"` + + - `const BetaNamespaceToolToolFunctionAllowedCallerProgrammatic BetaNamespaceToolToolFunctionAllowedCaller = "programmatic"` + + - `DeferLoading bool` + + Whether this function should be deferred and discovered via tool search. + + - `Description string` + + - `OutputSchema map[string, any]` + + A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs. + + - `Parameters any` + + - `Strict bool` + + 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. + + - `type BetaCustomTool struct{…}` + + 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) + + - `Type Namespace` + + The type of the tool. Always `namespace`. + + - `const NamespaceNamespace Namespace = "namespace"` + + - `type BetaToolSearchTool struct{…}` + + Hosted or BYOT tool search configuration for deferred tools. + + - `Type ToolSearch` + + The type of the tool. Always `tool_search`. + + - `const ToolSearchToolSearch ToolSearch = "tool_search"` + + - `Description string` + + Description shown to the model for a client-executed tool search tool. + + - `Execution BetaToolSearchToolExecution` + + Whether tool search is executed by the server or by the client. + + - `const BetaToolSearchToolExecutionServer BetaToolSearchToolExecution = "server"` + + - `const BetaToolSearchToolExecutionClient BetaToolSearchToolExecution = "client"` + + - `Parameters any` + + Parameter schema for a client-executed tool search tool. + + - `type BetaWebSearchPreviewTool struct{…}` + + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `Type BetaWebSearchPreviewToolType` + + The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`. + + - `const BetaWebSearchPreviewToolTypeWebSearchPreview BetaWebSearchPreviewToolType = "web_search_preview"` + + - `const BetaWebSearchPreviewToolTypeWebSearchPreview2025_03_11 BetaWebSearchPreviewToolType = "web_search_preview_2025_03_11"` + + - `SearchContentTypes []string` + + - `const BetaWebSearchPreviewToolSearchContentTypeText BetaWebSearchPreviewToolSearchContentType = "text"` + + - `const BetaWebSearchPreviewToolSearchContentTypeImage BetaWebSearchPreviewToolSearchContentType = "image"` + + - `SearchContextSize BetaWebSearchPreviewToolSearchContextSize` + + High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. + + - `const BetaWebSearchPreviewToolSearchContextSizeLow BetaWebSearchPreviewToolSearchContextSize = "low"` + + - `const BetaWebSearchPreviewToolSearchContextSizeMedium BetaWebSearchPreviewToolSearchContextSize = "medium"` + + - `const BetaWebSearchPreviewToolSearchContextSizeHigh BetaWebSearchPreviewToolSearchContextSize = "high"` + + - `UserLocation BetaWebSearchPreviewToolUserLocation` + + The user's location. + + - `Type Approximate` + + The type of location approximation. Always `approximate`. + + - `const ApproximateApproximate Approximate = "approximate"` + + - `City string` + + Free text input for the city of the user, e.g. `San Francisco`. + + - `Country string` + + The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`. + + - `Region string` + + Free text input for the region of the user, e.g. `California`. + + - `Timezone string` + + The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`. + + - `type BetaApplyPatchTool struct{…}` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `Type ApplyPatch` + + The type of the tool. Always `apply_patch`. + + - `const ApplyPatchApplyPatch ApplyPatch = "apply_patch"` + + - `AllowedCallers []string` + + The tool invocation context(s). + + - `const BetaApplyPatchToolAllowedCallerDirect BetaApplyPatchToolAllowedCaller = "direct"` + + - `const BetaApplyPatchToolAllowedCallerProgrammatic BetaApplyPatchToolAllowedCaller = "programmatic"` + + - `Type ToolSearchOutput` + + The type of the item. Always `tool_search_output`. + + - `const ToolSearchOutputToolSearchOutput ToolSearchOutput = "tool_search_output"` + + - `Agent BetaResponseToolSearchOutputItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseItemAdditionalTools struct{…}` + + - `ID string` + + The unique ID of the additional tools item. + + - `Role string` + + The role that provided the additional tools. + + - `const BetaResponseItemAdditionalToolsRoleUnknown BetaResponseItemAdditionalToolsRole = "unknown"` + + - `const BetaResponseItemAdditionalToolsRoleUser BetaResponseItemAdditionalToolsRole = "user"` + + - `const BetaResponseItemAdditionalToolsRoleAssistant BetaResponseItemAdditionalToolsRole = "assistant"` + + - `const BetaResponseItemAdditionalToolsRoleSystem BetaResponseItemAdditionalToolsRole = "system"` + + - `const BetaResponseItemAdditionalToolsRoleCritic BetaResponseItemAdditionalToolsRole = "critic"` + + - `const BetaResponseItemAdditionalToolsRoleDiscriminator BetaResponseItemAdditionalToolsRole = "discriminator"` + + - `const BetaResponseItemAdditionalToolsRoleDeveloper BetaResponseItemAdditionalToolsRole = "developer"` + + - `const BetaResponseItemAdditionalToolsRoleTool BetaResponseItemAdditionalToolsRole = "tool"` + + - `Tools []BetaToolUnion` + + The additional tool definitions made available at this item. + + - `type BetaFunctionTool struct{…}` + + Defines a function in your own code the model can choose to call. Learn more about [function calling](https://platform.openai.com/docs/guides/function-calling). + + - `type BetaFileSearchTool struct{…}` + + 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). + + - `type BetaComputerTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type BetaComputerUsePreviewTool struct{…}` + + A tool that controls a virtual computer. Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use). + + - `type BetaWebSearchTool struct{…}` + + Search the Internet for sources related to the prompt. Learn more about the + [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type BetaToolMcp struct{…}` + + Give the model access to additional tools via remote Model Context Protocol + (MCP) servers. [Learn more about MCP](https://platform.openai.com/docs/guides/tools-remote-mcp). + + - `type BetaToolCodeInterpreter struct{…}` + + A tool that runs Python code to help generate a response to a prompt. + + - `type BetaToolProgrammaticToolCalling struct{…}` + + - `type BetaToolImageGeneration struct{…}` + + A tool that generates images using the GPT image models. + + - `type BetaToolLocalShell struct{…}` + + A tool that allows the model to execute shell commands in a local environment. + + - `type BetaFunctionShellTool struct{…}` + + A tool that allows the model to execute shell commands. + + - `type BetaCustomTool struct{…}` + + 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) + + - `type BetaNamespaceTool struct{…}` + + Groups function/custom tools under a shared namespace. + + - `type BetaToolSearchTool struct{…}` + + Hosted or BYOT tool search configuration for deferred tools. + + - `type BetaWebSearchPreviewTool struct{…}` + + This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://platform.openai.com/docs/guides/tools-web-search). + + - `type BetaApplyPatchTool struct{…}` + + Allows the assistant to create, delete, or update files using unified diffs. + + - `Type AdditionalTools` + + The type of the item. Always `additional_tools`. + + - `const AdditionalToolsAdditionalTools AdditionalTools = "additional_tools"` + + - `Agent BetaResponseItemAdditionalToolsAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseReasoningItem struct{…}` + + A description of the chain of thought used by a reasoning model while generating + a response. Be sure to include these items in your `input` to the Responses API + for subsequent turns of a conversation if you are manually + [managing context](https://platform.openai.com/docs/guides/conversation-state). + + - `ID string` + + The unique identifier of the reasoning content. + + - `Summary []BetaResponseReasoningItemSummary` + + Reasoning summary content. + + - `Text string` + + A summary of the reasoning output from the model so far. + + - `Type SummaryText` + + The type of the object. Always `summary_text`. + + - `const SummaryTextSummaryText SummaryText = "summary_text"` + + - `Type Reasoning` + + The type of the object. Always `reasoning`. + + - `const ReasoningReasoning Reasoning = "reasoning"` + + - `Agent BetaResponseReasoningItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Content []BetaResponseReasoningItemContent` + + Reasoning text content. + + - `Text string` + + The reasoning text from the model. + + - `Type ReasoningText` + + The type of the reasoning text. Always `reasoning_text`. + + - `const ReasoningTextReasoningText ReasoningText = "reasoning_text"` + + - `EncryptedContent string` + + The encrypted content of the reasoning item - populated when a response is + generated with `reasoning.encrypted_content` in the `include` parameter. + + - `Status BetaResponseReasoningItemStatus` + + The status of the item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseReasoningItemStatusInProgress BetaResponseReasoningItemStatus = "in_progress"` + + - `const BetaResponseReasoningItemStatusCompleted BetaResponseReasoningItemStatus = "completed"` + + - `const BetaResponseReasoningItemStatusIncomplete BetaResponseReasoningItemStatus = "incomplete"` + + - `type BetaResponseItemProgram struct{…}` + + - `ID string` + + The unique ID of the program item. + + - `CallID string` + + The stable call ID of the program item. + + - `Code string` + + The JavaScript source executed by programmatic tool calling. + + - `Fingerprint string` + + Opaque program replay fingerprint that must be round-tripped. + + - `Type Program` + + The type of the item. Always `program`. + + - `const ProgramProgram Program = "program"` + + - `Agent BetaResponseItemProgramAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseItemProgramOutput struct{…}` + + - `ID string` + + The unique ID of the program output item. + + - `CallID string` + + The call ID of the program item. + + - `Result string` + + The result produced by the program item. + + - `Status string` + + The terminal status of the program output item. + + - `const BetaResponseItemProgramOutputStatusCompleted BetaResponseItemProgramOutputStatus = "completed"` + + - `const BetaResponseItemProgramOutputStatusIncomplete BetaResponseItemProgramOutputStatus = "incomplete"` + + - `Type ProgramOutput` + + The type of the item. Always `program_output`. + + - `const ProgramOutputProgramOutput ProgramOutput = "program_output"` + + - `Agent BetaResponseItemProgramOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseCompactionItem struct{…}` + + A compaction item generated by the [`v1/responses/compact` API](https://platform.openai.com/docs/api-reference/responses/compact). + + - `ID string` + + The unique ID of the compaction item. + + - `EncryptedContent string` + + The encrypted content that was produced by compaction. + + - `Type Compaction` + + The type of the item. Always `compaction`. + + - `const CompactionCompaction Compaction = "compaction"` + + - `Agent BetaResponseCompactionItemAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseItemImageGenerationCall struct{…}` + + An image generation request made by the model. + + - `ID string` + + The unique ID of the image generation call. + + - `Result string` + + The generated image encoded in base64. + + - `Status string` + + The status of the image generation call. + + - `const BetaResponseItemImageGenerationCallStatusInProgress BetaResponseItemImageGenerationCallStatus = "in_progress"` + + - `const BetaResponseItemImageGenerationCallStatusCompleted BetaResponseItemImageGenerationCallStatus = "completed"` + + - `const BetaResponseItemImageGenerationCallStatusGenerating BetaResponseItemImageGenerationCallStatus = "generating"` + + - `const BetaResponseItemImageGenerationCallStatusFailed BetaResponseItemImageGenerationCallStatus = "failed"` + + - `Type ImageGenerationCall` + + The type of the image generation call. Always `image_generation_call`. + + - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"` + + - `Agent BetaResponseItemImageGenerationCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseCodeInterpreterToolCall struct{…}` + + A tool call to run code. + + - `ID string` + + The unique ID of the code interpreter tool call. + + - `Code string` + + The code to run, or null if not available. + + - `ContainerID string` + + The ID of the container used to run the code. + + - `Outputs []BetaResponseCodeInterpreterToolCallOutputUnion` + + The outputs generated by the code interpreter, such as logs or images. + Can be null if no outputs are available. + + - `type BetaResponseCodeInterpreterToolCallOutputLogs struct{…}` + + The logs output from the code interpreter. + + - `Logs string` + + The logs output from the code interpreter. + + - `Type Logs` + + The type of the output. Always `logs`. + + - `const LogsLogs Logs = "logs"` + + - `type BetaResponseCodeInterpreterToolCallOutputImage struct{…}` + + The image output from the code interpreter. + + - `Type Image` + + The type of the output. Always `image`. + + - `const ImageImage Image = "image"` + + - `URL string` + + The URL of the image output from the code interpreter. + + - `Status BetaResponseCodeInterpreterToolCallStatus` + + The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`. + + - `const BetaResponseCodeInterpreterToolCallStatusInProgress BetaResponseCodeInterpreterToolCallStatus = "in_progress"` + + - `const BetaResponseCodeInterpreterToolCallStatusCompleted BetaResponseCodeInterpreterToolCallStatus = "completed"` + + - `const BetaResponseCodeInterpreterToolCallStatusIncomplete BetaResponseCodeInterpreterToolCallStatus = "incomplete"` + + - `const BetaResponseCodeInterpreterToolCallStatusInterpreting BetaResponseCodeInterpreterToolCallStatus = "interpreting"` + + - `const BetaResponseCodeInterpreterToolCallStatusFailed BetaResponseCodeInterpreterToolCallStatus = "failed"` + + - `Type CodeInterpreterCall` + + The type of the code interpreter tool call. Always `code_interpreter_call`. + + - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"` + + - `Agent BetaResponseCodeInterpreterToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseItemLocalShellCall struct{…}` + + A tool call to run a command on the local shell. + + - `ID string` + + The unique ID of the local shell call. + + - `Action BetaResponseItemLocalShellCallAction` + + Execute a shell command on the server. + + - `Command []string` + + The command to run. + + - `Env map[string, string]` + + Environment variables to set for the command. + + - `Type Exec` + + The type of the local shell action. Always `exec`. + + - `const ExecExec Exec = "exec"` + + - `TimeoutMs int64` + + Optional timeout in milliseconds for the command. + + - `User string` + + Optional user to run the command as. + + - `WorkingDirectory string` + + Optional working directory to run the command in. + + - `CallID string` + + The unique ID of the local shell tool call generated by the model. + + - `Status string` + + The status of the local shell call. + + - `const BetaResponseItemLocalShellCallStatusInProgress BetaResponseItemLocalShellCallStatus = "in_progress"` + + - `const BetaResponseItemLocalShellCallStatusCompleted BetaResponseItemLocalShellCallStatus = "completed"` + + - `const BetaResponseItemLocalShellCallStatusIncomplete BetaResponseItemLocalShellCallStatus = "incomplete"` + + - `Type LocalShellCall` + + The type of the local shell call. Always `local_shell_call`. + + - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"` + + - `Agent BetaResponseItemLocalShellCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `type BetaResponseItemLocalShellCallOutput struct{…}` + + The output of a local shell tool call. + + - `ID string` + + The unique ID of the local shell tool call generated by the model. + + - `Output string` + + A JSON string of the output of the local shell tool call. + + - `Type LocalShellCallOutput` + + The type of the local shell tool call output. Always `local_shell_call_output`. + + - `const LocalShellCallOutputLocalShellCallOutput LocalShellCallOutput = "local_shell_call_output"` + + - `Agent BetaResponseItemLocalShellCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status string` + + The status of the item. One of `in_progress`, `completed`, or `incomplete`. + + - `const BetaResponseItemLocalShellCallOutputStatusInProgress BetaResponseItemLocalShellCallOutputStatus = "in_progress"` + + - `const BetaResponseItemLocalShellCallOutputStatusCompleted BetaResponseItemLocalShellCallOutputStatus = "completed"` + + - `const BetaResponseItemLocalShellCallOutputStatusIncomplete BetaResponseItemLocalShellCallOutputStatus = "incomplete"` + + - `type BetaResponseFunctionShellToolCall struct{…}` + + A tool call that executes one or more shell commands in a managed environment. + + - `ID string` + + The unique ID of the shell tool call. Populated when this item is returned via API. + + - `Action BetaResponseFunctionShellToolCallAction` + + The shell commands and limits that describe how to run the tool call. + + - `Commands []string` + + - `MaxOutputLength int64` + + Optional maximum number of characters to return from each command. + + - `TimeoutMs int64` + + Optional timeout in milliseconds for the commands. + + - `CallID string` + + The unique ID of the shell tool call generated by the model. + + - `Environment BetaResponseFunctionShellToolCallEnvironmentUnion` + + Represents the use of a local environment to perform shell actions. + + - `type BetaResponseLocalEnvironment struct{…}` + + Represents the use of a local environment to perform shell actions. + + - `Type Local` + + The environment type. Always `local`. + + - `const LocalLocal Local = "local"` + + - `type BetaResponseContainerReference struct{…}` + + Represents a container created with /v1/containers. + + - `ContainerID string` + + - `Type ContainerReference` + + The environment type. Always `container_reference`. + + - `const ContainerReferenceContainerReference ContainerReference = "container_reference"` + + - `Status BetaResponseFunctionShellToolCallStatus` + + The status of the shell call. One of `in_progress`, `completed`, or `incomplete`. + + - `const BetaResponseFunctionShellToolCallStatusInProgress BetaResponseFunctionShellToolCallStatus = "in_progress"` + + - `const BetaResponseFunctionShellToolCallStatusCompleted BetaResponseFunctionShellToolCallStatus = "completed"` + + - `const BetaResponseFunctionShellToolCallStatusIncomplete BetaResponseFunctionShellToolCallStatus = "incomplete"` + + - `Type ShellCall` + + The type of the item. Always `shell_call`. + + - `const ShellCallShellCall ShellCall = "shell_call"` + + - `Agent BetaResponseFunctionShellToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseFunctionShellToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseFunctionShellToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseFunctionShellToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `CreatedBy string` + + The ID of the entity that created this tool call. + + - `type BetaResponseFunctionShellToolCallOutput struct{…}` + + The output of a shell tool call that was emitted. + + - `ID string` + + The unique ID of the shell call output. Populated when this item is returned via API. + + - `CallID string` + + The unique ID of the shell tool call generated by the model. + + - `MaxOutputLength int64` + + The maximum length of the shell command output. This is generated by the model and should be passed back with the raw output. + + - `Output []BetaResponseFunctionShellToolCallOutputOutput` + + An array of shell call output contents + + - `Outcome BetaResponseFunctionShellToolCallOutputOutputOutcomeUnion` + + Represents either an exit outcome (with an exit code) or a timeout outcome for a shell call output chunk. + + - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeTimeout struct{…}` + + Indicates that the shell call exceeded its configured time limit. + + - `Type Timeout` + + The outcome type. Always `timeout`. + + - `const TimeoutTimeout Timeout = "timeout"` + + - `type BetaResponseFunctionShellToolCallOutputOutputOutcomeExit struct{…}` + + Indicates that the shell commands finished and returned an exit code. + + - `ExitCode int64` + + Exit code from the shell process. + + - `Type Exit` + + The outcome type. Always `exit`. + + - `const ExitExit Exit = "exit"` + + - `Stderr string` + + The standard error output that was captured. + + - `Stdout string` + + The standard output that was captured. + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `Status BetaResponseFunctionShellToolCallOutputStatus` + + The status of the shell call output. One of `in_progress`, `completed`, or `incomplete`. + + - `const BetaResponseFunctionShellToolCallOutputStatusInProgress BetaResponseFunctionShellToolCallOutputStatus = "in_progress"` + + - `const BetaResponseFunctionShellToolCallOutputStatusCompleted BetaResponseFunctionShellToolCallOutputStatus = "completed"` + + - `const BetaResponseFunctionShellToolCallOutputStatusIncomplete BetaResponseFunctionShellToolCallOutputStatus = "incomplete"` + + - `Type ShellCallOutput` + + The type of the shell call output. Always `shell_call_output`. + + - `const ShellCallOutputShellCallOutput ShellCallOutput = "shell_call_output"` + + - `Agent BetaResponseFunctionShellToolCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseFunctionShellToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseFunctionShellToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseFunctionShellToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `CreatedBy string` + + The identifier of the actor that created the item. + + - `type BetaResponseApplyPatchToolCall struct{…}` + + A tool call that applies file diffs by creating, deleting, or updating files. + + - `ID string` + + The unique ID of the apply patch tool call. Populated when this item is returned via API. + + - `CallID string` + + The unique ID of the apply patch tool call generated by the model. + + - `Operation BetaResponseApplyPatchToolCallOperationUnion` + + One of the create_file, delete_file, or update_file operations applied via apply_patch. + + - `type BetaResponseApplyPatchToolCallOperationCreateFile struct{…}` + + Instruction describing how to create a file via the apply_patch tool. + + - `Diff string` + + Diff to apply. + + - `Path string` + + Path of the file to create. + + - `Type CreateFile` + + Create a new file with the provided diff. + + - `const CreateFileCreateFile CreateFile = "create_file"` + + - `type BetaResponseApplyPatchToolCallOperationDeleteFile struct{…}` + + Instruction describing how to delete a file via the apply_patch tool. + + - `Path string` + + Path of the file to delete. + + - `Type DeleteFile` + + Delete the specified file. + + - `const DeleteFileDeleteFile DeleteFile = "delete_file"` + + - `type BetaResponseApplyPatchToolCallOperationUpdateFile struct{…}` + + Instruction describing how to update a file via the apply_patch tool. + + - `Diff string` + + Diff to apply. + + - `Path string` + + Path of the file to update. + + - `Type UpdateFile` + + Update an existing file with the provided diff. + + - `const UpdateFileUpdateFile UpdateFile = "update_file"` + + - `Status BetaResponseApplyPatchToolCallStatus` + + The status of the apply patch tool call. One of `in_progress` or `completed`. + + - `const BetaResponseApplyPatchToolCallStatusInProgress BetaResponseApplyPatchToolCallStatus = "in_progress"` + + - `const BetaResponseApplyPatchToolCallStatusCompleted BetaResponseApplyPatchToolCallStatus = "completed"` + + - `Type ApplyPatchCall` + + The type of the item. Always `apply_patch_call`. + + - `const ApplyPatchCallApplyPatchCall ApplyPatchCall = "apply_patch_call"` + + - `Agent BetaResponseApplyPatchToolCallAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseApplyPatchToolCallCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseApplyPatchToolCallCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseApplyPatchToolCallCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `CreatedBy string` + + The ID of the entity that created this tool call. + + - `type BetaResponseApplyPatchToolCallOutput struct{…}` + + The output emitted by an apply patch tool call. + + - `ID string` + + The unique ID of the apply patch tool call output. Populated when this item is returned via API. + + - `CallID string` + + The unique ID of the apply patch tool call generated by the model. + + - `Status BetaResponseApplyPatchToolCallOutputStatus` + + The status of the apply patch tool call output. One of `completed` or `failed`. + + - `const BetaResponseApplyPatchToolCallOutputStatusCompleted BetaResponseApplyPatchToolCallOutputStatus = "completed"` + + - `const BetaResponseApplyPatchToolCallOutputStatusFailed BetaResponseApplyPatchToolCallOutputStatus = "failed"` + + - `Type ApplyPatchCallOutput` + + The type of the item. Always `apply_patch_call_output`. + + - `const ApplyPatchCallOutputApplyPatchCallOutput ApplyPatchCallOutput = "apply_patch_call_output"` + + - `Agent BetaResponseApplyPatchToolCallOutputAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Caller BetaResponseApplyPatchToolCallOutputCallerUnion` + + The execution context that produced this tool call. + + - `type BetaResponseApplyPatchToolCallOutputCallerDirect struct{…}` + + - `Type Direct` + + - `const DirectDirect Direct = "direct"` + + - `type BetaResponseApplyPatchToolCallOutputCallerProgram struct{…}` + + - `CallerID string` + + The call ID of the program item that produced this tool call. + + - `Type Program` + + - `const ProgramProgram Program = "program"` + + - `CreatedBy string` + + The ID of the entity that created this tool call output. + + - `Output string` + + Optional textual output returned by the apply patch tool. + + - `type BetaResponseItemMcpListTools struct{…}` + + A list of tools available on an MCP server. + + - `ID string` + + The unique ID of the list. + + - `ServerLabel string` + + The label of the MCP server. + + - `Tools []BetaResponseItemMcpListToolsTool` The tools available on the server. @@ -91762,6 +99632,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -93135,7 +101007,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -93192,7 +101068,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -95326,6 +103206,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -96699,7 +104581,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -96756,7 +104642,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -98912,6 +106802,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -100285,7 +108177,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -100342,7 +108238,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -102490,823 +110390,829 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` -### Beta Response Output Refusal - -- `type BetaResponseOutputRefusal struct{…}` - - A refusal from the model. - - - `Refusal string` - - The refusal explanation from the model. - - - `Type Refusal` - - The type of the refusal. Always `refusal`. - - - `const RefusalRefusal Refusal = "refusal"` - -### Beta Response Output Text - -- `type BetaResponseOutputText struct{…}` - - A text output from the model. - - - `Annotations []BetaResponseOutputTextAnnotationUnion` - - The annotations of the text output. - - - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` - - A citation to a file. - - - `FileID string` - - The ID of the file. - - - `Filename string` - - The filename of the file cited. - - - `Index int64` - - The index of the file in the list of files. - - - `Type FileCitation` - - The type of the file citation. Always `file_citation`. - - - `const FileCitationFileCitation FileCitation = "file_citation"` - - - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` - - A citation for a web resource used to generate a model response. - - - `EndIndex int64` - - The index of the last character of the URL citation in the message. - - - `StartIndex int64` - - The index of the first character of the URL citation in the message. - - - `Title string` - - The title of the web resource. - - - `Type URLCitation` - - The type of the URL citation. Always `url_citation`. - - - `const URLCitationURLCitation URLCitation = "url_citation"` - - - `URL string` - - The URL of the web resource. - - - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` - - A citation for a container file used to generate a model response. - - - `ContainerID string` - - The ID of the container file. - - - `EndIndex int64` - - The index of the last character of the container file citation in the message. - - - `FileID string` - - The ID of the file. - - - `Filename string` - - The filename of the container file cited. - - - `StartIndex int64` - - The index of the first character of the container file citation in the message. - - - `Type ContainerFileCitation` - - The type of the container file citation. Always `container_file_citation`. - - - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` - - - `type BetaResponseOutputTextAnnotationFilePath struct{…}` - - A path to a file. - - - `FileID string` - - The ID of the file. - - - `Index int64` - - The index of the file in the list of files. - - - `Type FilePath` - - The type of the file path. Always `file_path`. - - - `const FilePathFilePath FilePath = "file_path"` - - - `Text string` - - The text output from the model. - - - `Type OutputText` - - The type of the output text. Always `output_text`. - - - `const OutputTextOutputText OutputText = "output_text"` - - - `Logprobs []BetaResponseOutputTextLogprob` - - - `Token string` - - - `Bytes []int64` - - - `Logprob float64` - - - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` - - - `Token string` - - - `Bytes []int64` - - - `Logprob float64` - -### Beta Response Output Text Annotation Added Event - -- `type BetaResponseOutputTextAnnotationAddedEvent struct{…}` - - Emitted when an annotation is added to output text content. - - - `Annotation any` - - The annotation object being added. (See annotation schema for details.) - - - `AnnotationIndex int64` - - The index of the annotation within the content part. - - - `ContentIndex int64` - - The index of the content part within the output item. - - - `ItemID string` - - The unique identifier of the item to which the annotation is being added. - - - `OutputIndex int64` - - The index of the output item in the response's output array. - - - `SequenceNumber int64` - - The sequence number of this event. - - - `Type ResponseOutputTextAnnotationAdded` - - The type of the event. Always 'response.output_text.annotation.added'. - - - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"` - - - `Agent BetaResponseOutputTextAnnotationAddedEventAgent` - - The agent that owns this multi-agent streaming event. - - - `AgentName string` - - The canonical name of the agent that produced this item. - -### Beta Response Prompt - -- `type BetaResponsePrompt struct{…}` - - Reference to a prompt template and its variables. - [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). - - - `ID string` - - The unique identifier of the prompt template to use. - - - `Variables map[string, BetaResponsePromptVariableUnion]` - - Optional map of values to substitute in for variables in your - prompt. The substitution values can either be strings, or other - Response input types like images or files. - - - `string` - - - `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` - - The content of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `Version string` - - Optional version of the prompt template. - -### Beta Response Queued Event - -- `type BetaResponseQueuedEvent struct{…}` - - Emitted when a response is queued and waiting to be processed. - - - `Response BetaResponse` - - The full response object that is queued. - - - `ID string` - - Unique identifier for this Response. - - - `CreatedAt float64` - - Unix timestamp (in seconds) of when this Response was created. - - - `Error BetaResponseError` - - An error object returned when the model fails to generate a Response. - - - `Code BetaResponseErrorCode` - - The error code for the response. - - - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"` - - - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"` - - - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"` - - - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"` - - - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"` - - - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"` - - - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"` - - - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"` - - - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"` - - - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"` - - - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"` - - - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"` - - - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"` - - - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"` - - - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"` - - - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"` - - - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"` - - - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"` - - - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"` - - - `Message string` - - A human-readable description of the error. - - - `IncompleteDetails BetaResponseIncompleteDetails` - - Details about why the response is incomplete. - - - `Reason string` - - The reason why the response is incomplete. - - - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"` - - - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"` - - - `Instructions BetaResponseInstructionsUnion` - - A system (or developer) message inserted into the model's context. - - When using along with `previous_response_id`, the instructions from a previous - response will not be carried over to the next response. This makes it simple - to swap out system (or developer) messages in new responses. - - - `string` - - - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion` - - A list of one or many input items to the model, containing - different content types. - - - `type BetaEasyInputMessage struct{…}` - - A message input to the model with a role indicating instruction following - hierarchy. Instructions given with the `developer` or `system` role take - precedence over instructions given with the `user` role. Messages with the - `assistant` role are presumed to have been generated by the model in previous - interactions. - - - `Content BetaEasyInputMessageContentUnion` - - Text, image, or audio input to the model, used to generate a response. - Can also contain previous assistant responses. - - - `string` - - - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` - - A list of one or many input items to the model, containing different content - types. - - - `type BetaResponseInputText struct{…}` - - A text input to the model. - - - `Text string` - - The text input to the model. - - - `Type InputText` - - The type of the input item. Always `input_text`. - - - `const InputTextInputText InputText = "input_text"` - - - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputImage struct{…}` - - An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). - - - `Detail BetaResponseInputImageDetail` - - The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. - - - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` - - - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` - - - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` - - - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` - - - `Type InputImage` - - The type of the input item. Always `input_image`. - - - `const InputImageInputImage InputImage = "input_image"` - - - `FileID string` - - The ID of the file to be sent to the model. - - - `ImageURL string` - - The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. - - - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `type BetaResponseInputFile struct{…}` - - A file input to the model. - - - `Type InputFile` - - The type of the input item. Always `input_file`. - - - `const InputFileInputFile InputFile = "input_file"` - - - `Detail BetaResponseInputFileDetail` - - 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`. - - - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` - - - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` - - - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` - - - `FileData string` - - The content of the file to be sent to the model. - - - `FileID string` - - The ID of the file to be sent to the model. - - - `FileURL string` - - The URL of the file to be sent to the model. - - - `Filename string` - - The name of the file to be sent to the model. - - - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` - - Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. - - - `Mode Explicit` - - The breakpoint mode. Always `explicit`. - - - `const ExplicitExplicit Explicit = "explicit"` - - - `Role BetaEasyInputMessageRole` - - The role of the message input. One of `user`, `assistant`, `system`, or - `developer`. - - - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"` - - - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"` - - - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"` - - - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"` - - - `Phase BetaEasyInputMessagePhase` - - Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). - For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend - phase on all assistant messages — dropping it can degrade performance. Not used for user messages. - - - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` - - - `Type BetaEasyInputMessageType` - - The type of the message input. Always `message`. - - - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"` - - - `type BetaResponseInputItemMessage struct{…}` - - A message input to the model with a role indicating instruction following - hierarchy. Instructions given with the `developer` or `system` role take - precedence over instructions given with the `user` role. - - - `Content BetaResponseInputMessageContentList` - - A list of one or many input items to the model, containing different content - types. - - - `Role string` - - The role of the message input. One of `user`, `system`, or `developer`. - - - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"` - - - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"` - - - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"` - - - `Agent BetaResponseInputItemMessageAgent` - - The agent that produced this item. - - - `AgentName string` - - The canonical name of the agent that produced this item. - - - `Status string` - - The status of item. One of `in_progress`, `completed`, or - `incomplete`. Populated when items are returned via API. - - - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"` - - - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"` - - - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"` - - - `Type string` - - The type of the message input. Always set to `message`. - - - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"` - - - `type BetaResponseOutputMessage struct{…}` - - An output message from the model. - - - `ID string` - - The unique ID of the output message. - - - `Content []BetaResponseOutputMessageContentUnion` - - The content of the output message. - - - `type BetaResponseOutputText struct{…}` - - A text output from the model. - - - `Annotations []BetaResponseOutputTextAnnotationUnion` - - The annotations of the text output. - - - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` - - A citation to a file. - - - `FileID string` - - The ID of the file. - - - `Filename string` - - The filename of the file cited. - - - `Index int64` - - The index of the file in the list of files. - - - `Type FileCitation` - - The type of the file citation. Always `file_citation`. - - - `const FileCitationFileCitation FileCitation = "file_citation"` - - - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` - - A citation for a web resource used to generate a model response. - - - `EndIndex int64` - - The index of the last character of the URL citation in the message. - - - `StartIndex int64` - - The index of the first character of the URL citation in the message. - - - `Title string` - - The title of the web resource. - - - `Type URLCitation` - - The type of the URL citation. Always `url_citation`. - - - `const URLCitationURLCitation URLCitation = "url_citation"` - - - `URL string` - - The URL of the web resource. - - - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` - - A citation for a container file used to generate a model response. - - - `ContainerID string` - - The ID of the container file. - - - `EndIndex int64` - - The index of the last character of the container file citation in the message. - - - `FileID string` - - The ID of the file. - - - `Filename string` - - The filename of the container file cited. - - - `StartIndex int64` - - The index of the first character of the container file citation in the message. - - - `Type ContainerFileCitation` - - The type of the container file citation. Always `container_file_citation`. - - - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` - - - `type BetaResponseOutputTextAnnotationFilePath struct{…}` - - A path to a file. - - - `FileID string` - - The ID of the file. - - - `Index int64` - - The index of the file in the list of files. - - - `Type FilePath` - - The type of the file path. Always `file_path`. - - - `const FilePathFilePath FilePath = "file_path"` - - - `Text string` - - The text output from the model. - - - `Type OutputText` - - The type of the output text. Always `output_text`. - - - `const OutputTextOutputText OutputText = "output_text"` - - - `Logprobs []BetaResponseOutputTextLogprob` - - - `Token string` - - - `Bytes []int64` - - - `Logprob float64` - - - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` - - - `Token string` - - - `Bytes []int64` - - - `Logprob float64` - - - `type BetaResponseOutputRefusal struct{…}` - - A refusal from the model. - - - `Refusal string` - - The refusal explanation from the model. - - - `Type Refusal` - - The type of the refusal. Always `refusal`. - - - `const RefusalRefusal Refusal = "refusal"` - - - `Role Assistant` - - The role of the output message. Always `assistant`. - - - `const AssistantAssistant Assistant = "assistant"` - - - `Status BetaResponseOutputMessageStatus` - - The status of the message input. One of `in_progress`, `completed`, or - `incomplete`. Populated when input items are returned via API. - - - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"` - - - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"` - - - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"` - - - `Type Message` - - The type of the output message. Always `message`. - - - `const MessageMessage Message = "message"` - - - `Agent BetaResponseOutputMessageAgent` - - The agent that produced this item. - - - `AgentName string` - - The canonical name of the agent that produced this item. - - - `Phase BetaResponseOutputMessagePhase` - - Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). - For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend - phase on all assistant messages — dropping it can degrade performance. Not used for user messages. - - - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + +### Beta Response Output Refusal + +- `type BetaResponseOutputRefusal struct{…}` + + A refusal from the model. + + - `Refusal string` + + The refusal explanation from the model. + + - `Type Refusal` + + The type of the refusal. Always `refusal`. + + - `const RefusalRefusal Refusal = "refusal"` + +### Beta Response Output Text + +- `type BetaResponseOutputText struct{…}` + + A text output from the model. + + - `Annotations []BetaResponseOutputTextAnnotationUnion` + + The annotations of the text output. + + - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` + + A citation to a file. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the file cited. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FileCitation` + + The type of the file citation. Always `file_citation`. + + - `const FileCitationFileCitation FileCitation = "file_citation"` + + - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` + + A citation for a web resource used to generate a model response. + + - `EndIndex int64` + + The index of the last character of the URL citation in the message. + + - `StartIndex int64` + + The index of the first character of the URL citation in the message. + + - `Title string` + + The title of the web resource. + + - `Type URLCitation` + + The type of the URL citation. Always `url_citation`. + + - `const URLCitationURLCitation URLCitation = "url_citation"` + + - `URL string` + + The URL of the web resource. + + - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` + + A citation for a container file used to generate a model response. + + - `ContainerID string` + + The ID of the container file. + + - `EndIndex int64` + + The index of the last character of the container file citation in the message. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the container file citation in the message. + + - `Type ContainerFileCitation` + + The type of the container file citation. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `type BetaResponseOutputTextAnnotationFilePath struct{…}` + + A path to a file. + + - `FileID string` + + The ID of the file. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FilePath` + + The type of the file path. Always `file_path`. + + - `const FilePathFilePath FilePath = "file_path"` + + - `Text string` + + The text output from the model. + + - `Type OutputText` + + The type of the output text. Always `output_text`. + + - `const OutputTextOutputText OutputText = "output_text"` + + - `Logprobs []BetaResponseOutputTextLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + +### Beta Response Output Text Annotation Added Event + +- `type BetaResponseOutputTextAnnotationAddedEvent struct{…}` + + Emitted when an annotation is added to output text content. + + - `Annotation any` + + The annotation object being added. (See annotation schema for details.) + + - `AnnotationIndex int64` + + The index of the annotation within the content part. + + - `ContentIndex int64` + + The index of the content part within the output item. + + - `ItemID string` + + The unique identifier of the item to which the annotation is being added. + + - `OutputIndex int64` + + The index of the output item in the response's output array. + + - `SequenceNumber int64` + + The sequence number of this event. + + - `Type ResponseOutputTextAnnotationAdded` + + The type of the event. Always 'response.output_text.annotation.added'. + + - `const ResponseOutputTextAnnotationAddedResponseOutputTextAnnotationAdded ResponseOutputTextAnnotationAdded = "response.output_text.annotation.added"` + + - `Agent BetaResponseOutputTextAnnotationAddedEventAgent` + + The agent that owns this multi-agent streaming event. + + - `AgentName string` + + The canonical name of the agent that produced this item. + +### Beta Response Prompt + +- `type BetaResponsePrompt struct{…}` + + Reference to a prompt template and its variables. + [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). + + - `ID string` + + The unique identifier of the prompt template to use. + + - `Variables map[string, BetaResponsePromptVariableUnion]` + + Optional map of values to substitute in for variables in your + prompt. The substitution values can either be strings, or other + Response input types like images or files. + + - `string` + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Version string` + + Optional version of the prompt template. + +### Beta Response Queued Event + +- `type BetaResponseQueuedEvent struct{…}` + + Emitted when a response is queued and waiting to be processed. + + - `Response BetaResponse` + + The full response object that is queued. + + - `ID string` + + Unique identifier for this Response. + + - `CreatedAt float64` + + Unix timestamp (in seconds) of when this Response was created. + + - `Error BetaResponseError` + + An error object returned when the model fails to generate a Response. + + - `Code BetaResponseErrorCode` + + The error code for the response. + + - `const BetaResponseErrorCodeServerError BetaResponseErrorCode = "server_error"` + + - `const BetaResponseErrorCodeRateLimitExceeded BetaResponseErrorCode = "rate_limit_exceeded"` + + - `const BetaResponseErrorCodeInvalidPrompt BetaResponseErrorCode = "invalid_prompt"` + + - `const BetaResponseErrorCodeBioPolicy BetaResponseErrorCode = "bio_policy"` + + - `const BetaResponseErrorCodeVectorStoreTimeout BetaResponseErrorCode = "vector_store_timeout"` + + - `const BetaResponseErrorCodeInvalidImage BetaResponseErrorCode = "invalid_image"` + + - `const BetaResponseErrorCodeInvalidImageFormat BetaResponseErrorCode = "invalid_image_format"` + + - `const BetaResponseErrorCodeInvalidBase64Image BetaResponseErrorCode = "invalid_base64_image"` + + - `const BetaResponseErrorCodeInvalidImageURL BetaResponseErrorCode = "invalid_image_url"` + + - `const BetaResponseErrorCodeImageTooLarge BetaResponseErrorCode = "image_too_large"` + + - `const BetaResponseErrorCodeImageTooSmall BetaResponseErrorCode = "image_too_small"` + + - `const BetaResponseErrorCodeImageParseError BetaResponseErrorCode = "image_parse_error"` + + - `const BetaResponseErrorCodeImageContentPolicyViolation BetaResponseErrorCode = "image_content_policy_violation"` + + - `const BetaResponseErrorCodeInvalidImageMode BetaResponseErrorCode = "invalid_image_mode"` + + - `const BetaResponseErrorCodeImageFileTooLarge BetaResponseErrorCode = "image_file_too_large"` + + - `const BetaResponseErrorCodeUnsupportedImageMediaType BetaResponseErrorCode = "unsupported_image_media_type"` + + - `const BetaResponseErrorCodeEmptyImageFile BetaResponseErrorCode = "empty_image_file"` + + - `const BetaResponseErrorCodeFailedToDownloadImage BetaResponseErrorCode = "failed_to_download_image"` + + - `const BetaResponseErrorCodeImageFileNotFound BetaResponseErrorCode = "image_file_not_found"` + + - `Message string` + + A human-readable description of the error. + + - `IncompleteDetails BetaResponseIncompleteDetails` + + Details about why the response is incomplete. + + - `Reason string` + + The reason why the response is incomplete. + + - `const BetaResponseIncompleteDetailsReasonMaxOutputTokens BetaResponseIncompleteDetailsReason = "max_output_tokens"` + + - `const BetaResponseIncompleteDetailsReasonContentFilter BetaResponseIncompleteDetailsReason = "content_filter"` + + - `Instructions BetaResponseInstructionsUnion` + + A system (or developer) message inserted into the model's context. + + When using along with `previous_response_id`, the instructions from a previous + response will not be carried over to the next response. This makes it simple + to swap out system (or developer) messages in new responses. + + - `string` + + - `type BetaResponseInstructionsInputItemList []BetaResponseInputItemUnion` + + A list of one or many input items to the model, containing + different content types. + + - `type BetaEasyInputMessage struct{…}` + + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. Messages with the + `assistant` role are presumed to have been generated by the model in previous + interactions. + + - `Content BetaEasyInputMessageContentUnion` + + Text, image, or audio input to the model, used to generate a response. + Can also contain previous assistant responses. + + - `string` + + - `type BetaResponseInputMessageContentList []BetaResponseInputContentUnion` + + A list of one or many input items to the model, containing different content + types. + + - `type BetaResponseInputText struct{…}` + + A text input to the model. + + - `Text string` + + The text input to the model. + + - `Type InputText` + + The type of the input item. Always `input_text`. + + - `const InputTextInputText InputText = "input_text"` + + - `PromptCacheBreakpoint BetaResponseInputTextPromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputImage struct{…}` + + An image input to the model. Learn about [image inputs](https://platform.openai.com/docs/guides/vision). + + - `Detail BetaResponseInputImageDetail` + + The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. + + - `const BetaResponseInputImageDetailLow BetaResponseInputImageDetail = "low"` + + - `const BetaResponseInputImageDetailHigh BetaResponseInputImageDetail = "high"` + + - `const BetaResponseInputImageDetailAuto BetaResponseInputImageDetail = "auto"` + + - `const BetaResponseInputImageDetailOriginal BetaResponseInputImageDetail = "original"` + + - `Type InputImage` + + The type of the input item. Always `input_image`. + + - `const InputImageInputImage InputImage = "input_image"` + + - `FileID string` + + The ID of the file to be sent to the model. + + - `ImageURL string` + + The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. + + - `PromptCacheBreakpoint BetaResponseInputImagePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `type BetaResponseInputFile struct{…}` + + A file input to the model. + + - `Type InputFile` + + The type of the input item. Always `input_file`. + + - `const InputFileInputFile InputFile = "input_file"` + + - `Detail BetaResponseInputFileDetail` + + 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`. + + - `const BetaResponseInputFileDetailAuto BetaResponseInputFileDetail = "auto"` + + - `const BetaResponseInputFileDetailLow BetaResponseInputFileDetail = "low"` + + - `const BetaResponseInputFileDetailHigh BetaResponseInputFileDetail = "high"` + + - `FileData string` + + The content of the file to be sent to the model. + + - `FileID string` + + The ID of the file to be sent to the model. + + - `FileURL string` + + The URL of the file to be sent to the model. + + - `Filename string` + + The name of the file to be sent to the model. + + - `PromptCacheBreakpoint BetaResponseInputFilePromptCacheBreakpoint` + + Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. + + - `Mode Explicit` + + The breakpoint mode. Always `explicit`. + + - `const ExplicitExplicit Explicit = "explicit"` + + - `Role BetaEasyInputMessageRole` + + The role of the message input. One of `user`, `assistant`, `system`, or + `developer`. + + - `const BetaEasyInputMessageRoleUser BetaEasyInputMessageRole = "user"` + + - `const BetaEasyInputMessageRoleAssistant BetaEasyInputMessageRole = "assistant"` + + - `const BetaEasyInputMessageRoleSystem BetaEasyInputMessageRole = "system"` + + - `const BetaEasyInputMessageRoleDeveloper BetaEasyInputMessageRole = "developer"` + + - `Phase BetaEasyInputMessagePhase` + + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + + - `Type BetaEasyInputMessageType` + + The type of the message input. Always `message`. + + - `const BetaEasyInputMessageTypeMessage BetaEasyInputMessageType = "message"` + + - `type BetaResponseInputItemMessage struct{…}` + + A message input to the model with a role indicating instruction following + hierarchy. Instructions given with the `developer` or `system` role take + precedence over instructions given with the `user` role. + + - `Content BetaResponseInputMessageContentList` + + A list of one or many input items to the model, containing different content + types. + + - `Role string` + + The role of the message input. One of `user`, `system`, or `developer`. + + - `const BetaResponseInputItemMessageRoleUser BetaResponseInputItemMessageRole = "user"` + + - `const BetaResponseInputItemMessageRoleSystem BetaResponseInputItemMessageRole = "system"` + + - `const BetaResponseInputItemMessageRoleDeveloper BetaResponseInputItemMessageRole = "developer"` + + - `Agent BetaResponseInputItemMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Status string` + + The status of item. One of `in_progress`, `completed`, or + `incomplete`. Populated when items are returned via API. + + - `const BetaResponseInputItemMessageStatusInProgress BetaResponseInputItemMessageStatus = "in_progress"` + + - `const BetaResponseInputItemMessageStatusCompleted BetaResponseInputItemMessageStatus = "completed"` + + - `const BetaResponseInputItemMessageStatusIncomplete BetaResponseInputItemMessageStatus = "incomplete"` + + - `Type string` + + The type of the message input. Always set to `message`. + + - `const BetaResponseInputItemMessageTypeMessage BetaResponseInputItemMessageType = "message"` + + - `type BetaResponseOutputMessage struct{…}` + + An output message from the model. + + - `ID string` + + The unique ID of the output message. + + - `Content []BetaResponseOutputMessageContentUnion` + + The content of the output message. + + - `type BetaResponseOutputText struct{…}` + + A text output from the model. + + - `Annotations []BetaResponseOutputTextAnnotationUnion` + + The annotations of the text output. + + - `type BetaResponseOutputTextAnnotationFileCitation struct{…}` + + A citation to a file. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the file cited. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FileCitation` + + The type of the file citation. Always `file_citation`. + + - `const FileCitationFileCitation FileCitation = "file_citation"` + + - `type BetaResponseOutputTextAnnotationURLCitation struct{…}` + + A citation for a web resource used to generate a model response. + + - `EndIndex int64` + + The index of the last character of the URL citation in the message. + + - `StartIndex int64` + + The index of the first character of the URL citation in the message. + + - `Title string` + + The title of the web resource. + + - `Type URLCitation` + + The type of the URL citation. Always `url_citation`. + + - `const URLCitationURLCitation URLCitation = "url_citation"` + + - `URL string` + + The URL of the web resource. + + - `type BetaResponseOutputTextAnnotationContainerFileCitation struct{…}` + + A citation for a container file used to generate a model response. + + - `ContainerID string` + + The ID of the container file. + + - `EndIndex int64` + + The index of the last character of the container file citation in the message. + + - `FileID string` + + The ID of the file. + + - `Filename string` + + The filename of the container file cited. + + - `StartIndex int64` + + The index of the first character of the container file citation in the message. + + - `Type ContainerFileCitation` + + The type of the container file citation. Always `container_file_citation`. + + - `const ContainerFileCitationContainerFileCitation ContainerFileCitation = "container_file_citation"` + + - `type BetaResponseOutputTextAnnotationFilePath struct{…}` + + A path to a file. + + - `FileID string` + + The ID of the file. + + - `Index int64` + + The index of the file in the list of files. + + - `Type FilePath` + + The type of the file path. Always `file_path`. + + - `const FilePathFilePath FilePath = "file_path"` + + - `Text string` + + The text output from the model. + + - `Type OutputText` + + The type of the output text. Always `output_text`. + + - `const OutputTextOutputText OutputText = "output_text"` + + - `Logprobs []BetaResponseOutputTextLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `TopLogprobs []BetaResponseOutputTextLogprobTopLogprob` + + - `Token string` + + - `Bytes []int64` + + - `Logprob float64` + + - `type BetaResponseOutputRefusal struct{…}` + + A refusal from the model. + + - `Refusal string` + + The refusal explanation from the model. + + - `Type Refusal` + + The type of the refusal. Always `refusal`. + + - `const RefusalRefusal Refusal = "refusal"` + + - `Role Assistant` + + The role of the output message. Always `assistant`. + + - `const AssistantAssistant Assistant = "assistant"` + + - `Status BetaResponseOutputMessageStatus` + + The status of the message input. One of `in_progress`, `completed`, or + `incomplete`. Populated when input items are returned via API. + + - `const BetaResponseOutputMessageStatusInProgress BetaResponseOutputMessageStatus = "in_progress"` + + - `const BetaResponseOutputMessageStatusCompleted BetaResponseOutputMessageStatus = "completed"` + + - `const BetaResponseOutputMessageStatusIncomplete BetaResponseOutputMessageStatus = "incomplete"` + + - `Type Message` + + The type of the output message. Always `message`. + + - `const MessageMessage Message = "message"` + + - `Agent BetaResponseOutputMessageAgent` + + The agent that produced this item. + + - `AgentName string` + + The canonical name of the agent that produced this item. + + - `Phase BetaResponseOutputMessagePhase` + + Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). + For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend + phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` - `type BetaResponseFileSearchToolCall struct{…}` @@ -104488,7 +112394,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -104545,7 +112455,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -110183,6 +118097,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -110430,6 +118346,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -111610,7 +119528,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -111667,7 +119589,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -118426,7 +126352,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -118483,7 +126413,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -119530,7 +127464,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -119587,7 +127525,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -120921,6 +128863,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -121168,6 +129112,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -122348,7 +130294,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -122405,7 +130355,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -125425,7 +133379,11 @@ func main() { A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). - - `BetaResponsesClientEventResponseInject` + - `type BetaResponseInjectEvent struct{…}` + + Injects input items into an active response over a WebSocket connection. + The items are validated and committed atomically. Currently, the server + accepts client-owned tool outputs that resume a waiting agent. - `Input []BetaResponseInputItemUnion` @@ -126084,6 +134042,8 @@ func main() { - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -126331,6 +134291,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -127511,7 +135473,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -127568,7 +135534,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -133911,7 +141881,10 @@ func main() { The canonical name of the agent that produced this item. - - `BetaResponsesServerEventResponseInjectCreated` + - `type BetaResponseInjectCreatedEvent struct{…}` + + Emitted when all injected input items were validated and committed to the + active response. - `ResponseID string` @@ -133932,9 +141905,13 @@ func main() { The multiplexed WebSocket stream that emitted the event. This field is present only when WebSocket multiplexing is enabled separately. - - `BetaResponsesServerEventResponseInjectFailed` + - `type BetaResponseInjectFailedEvent struct{…}` - - `Error BetaResponsesServerEventResponseInjectFailedError` + Emitted when injected input could not be committed to a response. The event + returns the uncommitted raw input so the client can retry it in another + response when appropriate. + + - `Error BetaResponseInjectFailedEventError` Information about why the input was not committed. @@ -133942,9 +141919,9 @@ func main() { A machine-readable error code. - - `const BetaResponsesServerEventResponseInjectFailedErrorCodeResponseAlreadyCompleted BetaResponsesServerEventResponseInjectFailedErrorCode = "response_already_completed"` + - `const BetaResponseInjectFailedEventErrorCodeResponseAlreadyCompleted BetaResponseInjectFailedEventErrorCode = "response_already_completed"` - - `const BetaResponsesServerEventResponseInjectFailedErrorCodeResponseNotFound BetaResponsesServerEventResponseInjectFailedErrorCode = "response_not_found"` + - `const BetaResponseInjectFailedEventErrorCodeResponseNotFound BetaResponseInjectFailedEventErrorCode = "response_not_found"` - `Message string` @@ -134243,7 +142220,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -134300,7 +142281,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -135540,13 +143525,13 @@ func main() { **get** `/responses/{response_id}/input_items?beta=true` -List input items +Returns a list of input items for a given response. ### Parameters - `responseID string` -- `params InputItemListParams` +- `params BetaResponseInputItemListParams` - `After param.Field[string]` @@ -135578,22 +143563,22 @@ List input items Query param: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - - `Order param.Field[InputItemListParamsOrder]` + - `Order param.Field[BetaResponseInputItemListParamsOrder]` Query param: The order to return the input items in. Default is `desc`. - `asc`: Return the input items in ascending order. - `desc`: Return the input items in descending order. - - `const InputItemListParamsOrderAsc InputItemListParamsOrder = "asc"` + - `const BetaResponseInputItemListParamsOrderAsc BetaResponseInputItemListParamsOrder = "asc"` - - `const InputItemListParamsOrderDesc InputItemListParamsOrder = "desc"` + - `const BetaResponseInputItemListParamsOrderDesc BetaResponseInputItemListParamsOrder = "desc"` - `Betas param.Field[[]string]` Header param: Optional beta features to enable for this request. - - `const InputItemListParamsOpenAIBetaResponsesMultiAgentV1 InputItemListParamsOpenAIBeta = "responses_multi_agent=v1"` + - `const BetaResponseInputItemListParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseInputItemListParamsOpenAIBeta = "responses_multi_agent=v1"` ### Returns @@ -135952,6 +143937,8 @@ List input items - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -137044,7 +145031,11 @@ List input items - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -137101,7 +145092,11 @@ List input items - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -139143,7 +147138,6 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { @@ -139153,7 +147147,7 @@ func main() { page, err := client.Beta.Responses.InputItems.List( context.TODO(), "response_id", - responses.InputItemListParams{ + openai.BetaResponseInputItemListParams{ }, ) @@ -139558,6 +147552,8 @@ func main() { - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -140650,7 +148646,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -140707,7 +148707,11 @@ func main() { - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -142760,17 +150764,19 @@ func main() { ## Get input token counts -`client.Beta.Responses.InputTokens.Count(ctx, params) (*InputTokenCountResponse, error)` +`client.Beta.Responses.InputTokens.Count(ctx, params) (*BetaResponseInputTokenCountResponse, error)` **post** `/responses/input_tokens?beta=true` -Get input token counts +Returns input token counts of the request. + +Returns an object with `object` set to `response.input_tokens` and an `input_tokens` count. ### Parameters -- `params InputTokenCountParams` +- `params BetaResponseInputTokenCountParams` - - `Conversation param.Field[InputTokenCountParamsConversationUnion]` + - `Conversation param.Field[BetaResponseInputTokenCountParamsConversationUnion]` Body param: The conversation that this response belongs to. Items from this conversation are prepended to `input_items` for this response request. Input items and output items from this response are automatically added to this conversation after this response completes. @@ -142785,13 +150791,13 @@ Get input token counts The unique ID of the conversation. - - `Input param.Field[InputTokenCountParamsInputUnion]` + - `Input param.Field[BetaResponseInputTokenCountParamsInputUnion]` Body param: Text, image, or file inputs to the model, used to generate a response - `string` - - `type InputTokenCountParamsInputArray []BetaResponseInputItemUnion` + - `type BetaResponseInputTokenCountParamsInputArray []BetaResponseInputItemUnion` A list of one or many input items to the model, containing different content types. @@ -142946,6 +150952,8 @@ Get input token counts - `const BetaEasyInputMessagePhaseCommentary BetaEasyInputMessagePhase = "commentary"` + - `const BetaEasyInputMessagePhaseFinalAnswer BetaEasyInputMessagePhase = "final_answer"` + - `Type BetaEasyInputMessageType` The type of the message input. Always `message`. @@ -143193,6 +151201,8 @@ Get input token counts - `const BetaResponseOutputMessagePhaseCommentary BetaResponseOutputMessagePhase = "commentary"` + - `const BetaResponseOutputMessagePhaseFinalAnswer BetaResponseOutputMessagePhase = "final_answer"` + - `type BetaResponseFileSearchToolCall struct{…}` The results of a file search tool call. See the @@ -144373,7 +152383,11 @@ Get input token counts - `bool` - - `type BetaFileSearchToolFiltersComparisonFilterValueArray []any` + - `type BetaFileSearchToolFiltersComparisonFilterValueArray []BetaFileSearchToolFiltersComparisonFilterValueArrayItemUnion` + + - `string` + + - `float64` - `type BetaFileSearchToolFiltersCompoundFilter struct{…}` @@ -144430,7 +152444,11 @@ Get input token counts - `bool` - - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []any` + - `type BetaFileSearchToolFiltersCompoundFilterFilterValueArray []BetaFileSearchToolFiltersCompoundFilterFilterValueArrayItemUnion` + + - `string` + + - `float64` - `Type string` @@ -146583,25 +154601,25 @@ Get input token counts Body param: Whether to allow the model to run tool calls in parallel. - - `Personality param.Field[InputTokenCountParamsPersonality]` + - `Personality param.Field[BetaResponseInputTokenCountParamsPersonality]` Body param: A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters. - `string` - - `type InputTokenCountParamsPersonality string` + - `type BetaResponseInputTokenCountParamsPersonality string` A model-owned style preset to apply to this request. Omit this parameter to use the model's default style. Supported values may expand over time. Values must be at most 64 characters. - - `const InputTokenCountParamsPersonalityFriendly InputTokenCountParamsPersonality = "friendly"` + - `const BetaResponseInputTokenCountParamsPersonalityFriendly BetaResponseInputTokenCountParamsPersonality = "friendly"` - - `const InputTokenCountParamsPersonalityPragmatic InputTokenCountParamsPersonality = "pragmatic"` + - `const BetaResponseInputTokenCountParamsPersonalityPragmatic BetaResponseInputTokenCountParamsPersonality = "pragmatic"` - `PreviousResponseID param.Field[string]` Body param: The unique ID of the previous response to the model. Use this to create multi-turn conversations. Learn more about [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - - `Reasoning param.Field[InputTokenCountParamsReasoning]` + - `Reasoning param.Field[BetaResponseInputTokenCountParamsReasoning]` Body param: **gpt-5 and o-series models only** Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning). @@ -146611,11 +154629,11 @@ Get input token counts When returned on a response, this is the effective reasoning context mode used for the response. - - `const InputTokenCountParamsReasoningContextAuto InputTokenCountParamsReasoningContext = "auto"` + - `const BetaResponseInputTokenCountParamsReasoningContextAuto BetaResponseInputTokenCountParamsReasoningContext = "auto"` - - `const InputTokenCountParamsReasoningContextCurrentTurn InputTokenCountParamsReasoningContext = "current_turn"` + - `const BetaResponseInputTokenCountParamsReasoningContextCurrentTurn BetaResponseInputTokenCountParamsReasoningContext = "current_turn"` - - `const InputTokenCountParamsReasoningContextAllTurns InputTokenCountParamsReasoningContext = "all_turns"` + - `const BetaResponseInputTokenCountParamsReasoningContextAllTurns BetaResponseInputTokenCountParamsReasoningContext = "all_turns"` - `Effort string` @@ -146627,19 +154645,19 @@ Get input token counts [reasoning guide](https://platform.openai.com/docs/guides/reasoning) for model-specific support. - - `const InputTokenCountParamsReasoningEffortNone InputTokenCountParamsReasoningEffort = "none"` + - `const BetaResponseInputTokenCountParamsReasoningEffortNone BetaResponseInputTokenCountParamsReasoningEffort = "none"` - - `const InputTokenCountParamsReasoningEffortMinimal InputTokenCountParamsReasoningEffort = "minimal"` + - `const BetaResponseInputTokenCountParamsReasoningEffortMinimal BetaResponseInputTokenCountParamsReasoningEffort = "minimal"` - - `const InputTokenCountParamsReasoningEffortLow InputTokenCountParamsReasoningEffort = "low"` + - `const BetaResponseInputTokenCountParamsReasoningEffortLow BetaResponseInputTokenCountParamsReasoningEffort = "low"` - - `const InputTokenCountParamsReasoningEffortMedium InputTokenCountParamsReasoningEffort = "medium"` + - `const BetaResponseInputTokenCountParamsReasoningEffortMedium BetaResponseInputTokenCountParamsReasoningEffort = "medium"` - - `const InputTokenCountParamsReasoningEffortHigh InputTokenCountParamsReasoningEffort = "high"` + - `const BetaResponseInputTokenCountParamsReasoningEffortHigh BetaResponseInputTokenCountParamsReasoningEffort = "high"` - - `const InputTokenCountParamsReasoningEffortXhigh InputTokenCountParamsReasoningEffort = "xhigh"` + - `const BetaResponseInputTokenCountParamsReasoningEffortXhigh BetaResponseInputTokenCountParamsReasoningEffort = "xhigh"` - - `const InputTokenCountParamsReasoningEffortMax InputTokenCountParamsReasoningEffort = "max"` + - `const BetaResponseInputTokenCountParamsReasoningEffortMax BetaResponseInputTokenCountParamsReasoningEffort = "max"` - `GenerateSummary string` @@ -146649,11 +154667,11 @@ Get input token counts useful for debugging and understanding the model's reasoning process. One of `auto`, `concise`, or `detailed`. - - `const InputTokenCountParamsReasoningGenerateSummaryAuto InputTokenCountParamsReasoningGenerateSummary = "auto"` + - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryAuto BetaResponseInputTokenCountParamsReasoningGenerateSummary = "auto"` - - `const InputTokenCountParamsReasoningGenerateSummaryConcise InputTokenCountParamsReasoningGenerateSummary = "concise"` + - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryConcise BetaResponseInputTokenCountParamsReasoningGenerateSummary = "concise"` - - `const InputTokenCountParamsReasoningGenerateSummaryDetailed InputTokenCountParamsReasoningGenerateSummary = "detailed"` + - `const BetaResponseInputTokenCountParamsReasoningGenerateSummaryDetailed BetaResponseInputTokenCountParamsReasoningGenerateSummary = "detailed"` - `Mode string` @@ -146665,9 +154683,9 @@ Get input token counts - `string` - - `const InputTokenCountParamsReasoningModeStandard InputTokenCountParamsReasoningMode = "standard"` + - `const BetaResponseInputTokenCountParamsReasoningModeStandard BetaResponseInputTokenCountParamsReasoningMode = "standard"` - - `const InputTokenCountParamsReasoningModePro InputTokenCountParamsReasoningMode = "pro"` + - `const BetaResponseInputTokenCountParamsReasoningModePro BetaResponseInputTokenCountParamsReasoningMode = "pro"` - `Summary string` @@ -146677,13 +154695,13 @@ Get input token counts `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`. - - `const InputTokenCountParamsReasoningSummaryAuto InputTokenCountParamsReasoningSummary = "auto"` + - `const BetaResponseInputTokenCountParamsReasoningSummaryAuto BetaResponseInputTokenCountParamsReasoningSummary = "auto"` - - `const InputTokenCountParamsReasoningSummaryConcise InputTokenCountParamsReasoningSummary = "concise"` + - `const BetaResponseInputTokenCountParamsReasoningSummaryConcise BetaResponseInputTokenCountParamsReasoningSummary = "concise"` - - `const InputTokenCountParamsReasoningSummaryDetailed InputTokenCountParamsReasoningSummary = "detailed"` + - `const BetaResponseInputTokenCountParamsReasoningSummaryDetailed BetaResponseInputTokenCountParamsReasoningSummary = "detailed"` - - `Text param.Field[InputTokenCountParamsText]` + - `Text param.Field[BetaResponseInputTokenCountParamsText]` Body param: Configuration options for a text response from the model. Can be plain text or structured JSON data. Learn more: @@ -146770,13 +154788,13 @@ Get input token counts more concise responses, while higher values will result in more verbose responses. Currently supported values are `low`, `medium`, and `high`. - - `const InputTokenCountParamsTextVerbosityLow InputTokenCountParamsTextVerbosity = "low"` + - `const BetaResponseInputTokenCountParamsTextVerbosityLow BetaResponseInputTokenCountParamsTextVerbosity = "low"` - - `const InputTokenCountParamsTextVerbosityMedium InputTokenCountParamsTextVerbosity = "medium"` + - `const BetaResponseInputTokenCountParamsTextVerbosityMedium BetaResponseInputTokenCountParamsTextVerbosity = "medium"` - - `const InputTokenCountParamsTextVerbosityHigh InputTokenCountParamsTextVerbosity = "high"` + - `const BetaResponseInputTokenCountParamsTextVerbosityHigh BetaResponseInputTokenCountParamsTextVerbosity = "high"` - - `ToolChoice param.Field[InputTokenCountParamsToolChoiceUnion]` + - `ToolChoice param.Field[BetaResponseInputTokenCountParamsToolChoiceUnion]` Body param: Controls which tool the model should use, if any. @@ -146916,7 +154934,7 @@ Get input token counts - `const CustomCustom Custom = "custom"` - - `type InputTokenCountParamsToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}` + - `type BetaResponseInputTokenCountParamsToolChoiceBetaSpecificProgrammaticToolCallingParam struct{…}` - `Type ProgrammaticToolCalling` @@ -147012,23 +155030,23 @@ Get input token counts Allows the assistant to create, delete, or update files using unified diffs. - - `Truncation param.Field[InputTokenCountParamsTruncation]` + - `Truncation param.Field[BetaResponseInputTokenCountParamsTruncation]` Body param: The truncation strategy to use for the model response. - `auto`: If the input to this Response exceeds the model's context window size, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation. - `disabled` (default): If the input size will exceed the context window size for a model, the request will fail with a 400 error. - - `const InputTokenCountParamsTruncationAuto InputTokenCountParamsTruncation = "auto"` + - `const BetaResponseInputTokenCountParamsTruncationAuto BetaResponseInputTokenCountParamsTruncation = "auto"` - - `const InputTokenCountParamsTruncationDisabled InputTokenCountParamsTruncation = "disabled"` + - `const BetaResponseInputTokenCountParamsTruncationDisabled BetaResponseInputTokenCountParamsTruncation = "disabled"` - `Betas param.Field[[]string]` Header param: Optional beta features to enable for this request. - - `const InputTokenCountParamsOpenAIBetaResponsesMultiAgentV1 InputTokenCountParamsOpenAIBeta = "responses_multi_agent=v1"` + - `const BetaResponseInputTokenCountParamsOpenAIBetaResponsesMultiAgentV1 BetaResponseInputTokenCountParamsOpenAIBeta = "responses_multi_agent=v1"` ### Returns -- `type InputTokenCountResponse struct{…}` +- `type BetaResponseInputTokenCountResponse struct{…}` - `InputTokens int64` @@ -147047,14 +155065,13 @@ import ( "github.com/openai/openai-go" "github.com/openai/openai-go/option" - "github.com/openai/openai-go/responses" ) func main() { client := openai.NewClient( option.WithAPIKey("My API Key"), ) - response, err := client.Beta.Responses.InputTokens.Count(context.TODO(), responses.InputTokenCountParams{ + response, err := client.Beta.Responses.InputTokens.Count(context.TODO(), openai.BetaResponseInputTokenCountParams{ }) if err != nil {