# Forks

## Connect

Fork a stored Live session over WebSocket. Send session.start with an overrides object (which may be empty), then wait for session.started. The model is inherited.

**WebSocket** `wss://api.openai.com/v1/live/sessions/{session_id}/fork`

### Example

```go
package main

import (
	"context"
	"fmt"
	openai "github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/live"
	"log"
	"time"
)

func main() {
	if err := observe(); err != nil {
		log.Fatal(err)
	}
}

func observe() error {
	// Stop waiting if the peer never sends the expected events.
	ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
	defer cancel()
	client := openai.NewClient()
	// Use the ID of a stored, closed session whose recording has finalized.
	connection, err := client.Live.Forks.Connect(ctx, "sess_123", live.ForkConnectionOptions{})
	if err != nil {
		return err
	}
	// Release the transport after the terminal event or an error.
	defer connection.Close()

	if err := connection.Send(ctx, live.ForkClientEventParamOfSessionStart(live.ForkSessionConfigParam{})); err != nil {
		return err
	}
	closeRequested := false
	for {
		received, err := connection.Recv(ctx)
		if err != nil {
			return fmt.Errorf("disconnected before session.closed; final usage unconfirmed: %w", err)
		}
		switch event := received.AsAny().(type) {
		case live.ErrorEvent:
			return fmt.Errorf("Live reported a session error.")
		case live.SessionStartedEvent:
			// Wait for startup before closing the session this example owns.
			fmt.Println("Session ready:", event.Session.ID, event.Session.Model)
			err = connection.Send(ctx, live.ForkClientEventUnionParam{OfSessionClose: &live.SessionCloseEventParam{}})
			closeRequested = err == nil
		case live.SessionClosedEvent:
			if !closeRequested || event.Reason != "close_requested" {
				return fmt.Errorf("session ended unexpectedly: %s; usage=%v", event.Reason, event.Usage)
			}
			fmt.Println("Final usage:", event.Usage)
			return nil
		}
		if err != nil {
			return err
		}
	}
}
```

## Domain Types

### Fork Client Event

- `type ForkClientEventUnion interface{…}`

  Client events for a Live fork WebSocket. First send session.start with an overrides object (which may be empty), then wait for session.started before sending other commands. The model and conversation are inherited from the stored session.

  - `type ForkSessionStartEvent struct{…}`

    Start a Live session after connecting to a stored session’s fork WebSocket. Send an empty `session` object to use the stored configuration.

    - `Session ForkSessionConfig`

      Overrides for a stored session after connecting to the fork WebSocket. An empty object inherits the stored configuration; do not supply a new model. audio.format applies only to the new WebSocket connection. client overrides are only supported for WebRTC forks.

      - `Audio ForkSessionConfigAudio`

        Audio format for a WebSocket fork. WebRTC forks negotiate their audio format and must omit this field.

        - `Format AudioFormatUnion`

          Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.

          - `AudioFormatAudioPCM`

            - `Rate int64`

              Audio sample rate in hertz. Live WebSocket PCM audio supports 16000 or 24000 Hz.

              `minimum: 16000`, `maximum: 24000`

              - `const AudioFormatAudioPCMRate16000 AudioFormatAudioPCMRate = 16000`

              - `const AudioFormatAudioPCMRate24000 AudioFormatAudioPCMRate = 24000`

            - `Type AudioPCM`

              The audio encoding. Always `audio/pcm`.

              - `const AudioPCMAudioPCM AudioPCM = "audio/pcm"`

          - `AudioFormatAudioPCMU`

            - `Rate int64`

              Audio sample rate in hertz. G.711 audio uses 8000 Hz.

              `minimum: 8000`, `maximum: 8000`

            - `Type AudioPCMU`

              The audio encoding. Always `audio/pcmu`.

              - `const AudioPCMUAudioPCMU AudioPCMU = "audio/pcmu"`

          - `AudioFormatAudioPCMA`

            - `Rate int64`

              Audio sample rate in hertz. G.711 audio uses 8000 Hz.

              `minimum: 8000`, `maximum: 8000`

            - `Type AudioPCMA`

              The audio encoding. Always `audio/pcma`.

              - `const AudioPCMAAudioPCMA AudioPCMA = "audio/pcma"`

      - `Client ClientConfig`

        Frontend data-channel permissions for a WebRTC fork. Omitted permissions inherit the stored values. Not supported for WebSocket forks.

        - `DataChannel DataChannelConfig`

          Client and server event permissions for the WebRTC frontend data channel.

          - `AllowedClientEvents DataChannelConfigAllowedClientEventsUnion`

            Client event types that the frontend data channel may send. Use 'all' to allow every client event; an empty array allows none. Omission preserves the existing allow-all behavior.

            - `All`

              - `const AllAll All = "all"`

            - `[]string`

          - `AllowedServerEvents DataChannelConfigAllowedServerEventsUnion`

            Server events that may be sent to the frontend data channel. Use 'all' to allow every server event; an empty array allows none. Omission preserves the existing allow-all behavior. Responses events use an object with type 'response.event' and a response_event selector.

            - `All`

              - `const AllAll All = "all"`

            - `[]ServerEventSelector`

              - `Type string`

                The outer Live server event type. Use 'response.event' for Responses events.

                `minLength: 1`, `maxLength: 256`

              - `ResponseEvent string`

                The nested Responses event type. Required when type is 'response.event'; forbidden for other event types.

                `minLength: 1`, `maxLength: 256`

      - `Delegation ForkSessionConfigDelegation`

        Overrides for the stored session’s Responses backend. Only supported when the stored session already uses Responses delegation; the delegation type cannot change.

        - `Type Responses`

          The delegation owner. Always `responses` for tasks handled by the Responses API.

          - `const ResponsesResponses Responses = "responses"`

        - `AcknowledgementDelayMs int64`

          Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

          `minimum: 0`, `maximum: 800`

        - `Responses ResponsesDelegationUpdateConfig`

          Responses backend settings to update. Omitted settings keep their existing values.

          - `Instructions string`

            Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).

          - `MaxOutputTokens int64`

            Maximum number of output tokens for each delegated response.

            `minimum: 16`

          - `Model string`

            The Responses backend model to use for subsequent delegated requests. Omit to keep the current backend model.

          - `ParallelToolCalls bool`

            Whether the delegated Responses model may request multiple tool calls in a single response.

          - `Reasoning ResponsesDelegationUpdateConfigReasoning`

            Reasoning settings passed to each delegated Responses request.

            - `Effort string`

              How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.

              - `const ResponsesDelegationUpdateConfigReasoningEffortNone ResponsesDelegationUpdateConfigReasoningEffort = "none"`

              - `const ResponsesDelegationUpdateConfigReasoningEffortMinimal ResponsesDelegationUpdateConfigReasoningEffort = "minimal"`

              - `const ResponsesDelegationUpdateConfigReasoningEffortLow ResponsesDelegationUpdateConfigReasoningEffort = "low"`

              - `const ResponsesDelegationUpdateConfigReasoningEffortMedium ResponsesDelegationUpdateConfigReasoningEffort = "medium"`

              - `const ResponsesDelegationUpdateConfigReasoningEffortHigh ResponsesDelegationUpdateConfigReasoningEffort = "high"`

              - `const ResponsesDelegationUpdateConfigReasoningEffortXhigh ResponsesDelegationUpdateConfigReasoningEffort = "xhigh"`

            - `Summary string`

              The reasoning summary to request from the delegated Responses model, when supported.

              - `const ResponsesDelegationUpdateConfigReasoningSummaryConcise ResponsesDelegationUpdateConfigReasoningSummary = "concise"`

              - `const ResponsesDelegationUpdateConfigReasoningSummaryDetailed ResponsesDelegationUpdateConfigReasoningSummary = "detailed"`

              - `const ResponsesDelegationUpdateConfigReasoningSummaryAuto ResponsesDelegationUpdateConfigReasoningSummary = "auto"`

          - `ServiceTier ResponsesDelegationUpdateConfigServiceTier`

            Service tier for delegated Responses requests.

            - `const ResponsesDelegationUpdateConfigServiceTierAuto ResponsesDelegationUpdateConfigServiceTier = "auto"`

            - `const ResponsesDelegationUpdateConfigServiceTierDefault ResponsesDelegationUpdateConfigServiceTier = "default"`

            - `const ResponsesDelegationUpdateConfigServiceTierFastTierTempPilot ResponsesDelegationUpdateConfigServiceTier = "fast_tier_temp_pilot"`

            - `const ResponsesDelegationUpdateConfigServiceTierFlex ResponsesDelegationUpdateConfigServiceTier = "flex"`

            - `const ResponsesDelegationUpdateConfigServiceTierPriority ResponsesDelegationUpdateConfigServiceTier = "priority"`

            - `const ResponsesDelegationUpdateConfigServiceTierUltrafast ResponsesDelegationUpdateConfigServiceTier = "ultrafast"`

          - `Text ResponsesDelegationUpdateConfigText`

            Text generation settings passed to each delegated Responses request.

            - `Verbosity string`

              The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.

              - `const ResponsesDelegationUpdateConfigTextVerbosityLow ResponsesDelegationUpdateConfigTextVerbosity = "low"`

              - `const ResponsesDelegationUpdateConfigTextVerbosityMedium ResponsesDelegationUpdateConfigTextVerbosity = "medium"`

              - `const ResponsesDelegationUpdateConfigTextVerbosityHigh ResponsesDelegationUpdateConfigTextVerbosity = "high"`

          - `ToolChoice ResponsesDelegationUpdateConfigToolChoiceUnion`

            Controls which tool the Responses backend uses when handling a task delegated by the Live model.

            - `string`

              - `const ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnumAuto ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnum = "auto"`

              - `const ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnumNone ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnum = "none"`

              - `const ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnumRequired ResponsesDelegationUpdateConfigToolChoiceLiveToolChoiceEnum = "required"`

            - `ResponsesDelegationUpdateConfigToolChoiceLiveFunctionToolChoiceParam`

              - `Name string`

                `minLength: 1`, `maxLength: 64`

              - `Type Function`

                - `const FunctionFunction Function = "function"`

            - `ResponsesDelegationUpdateConfigToolChoiceLiveMcpToolChoiceParam`

              - `Name string`

                `minLength: 1`, `maxLength: 64`

              - `ServerLabel string`

                `minLength: 1`, `maxLength: 64`

              - `Type Mcp`

                - `const McpMcp Mcp = "mcp"`

          - `Tools []ResponsesDelegationUpdateConfigToolUnion`

            Tools available to the Responses backend while it handles tasks delegated by the Live model.

            - `type FunctionTool struct{…}`

              A function tool available to the Responses backend when the Live model delegates a task.

              - `Name string`

                The name the delegated Responses model uses when calling this function.

              - `Type Function`

                The tool type. Always `function`.

                - `const FunctionFunction Function = "function"`

              - `Description string`

                What the function does and when the delegated Responses model should call it.

              - `Parameters map[string, any]`

                A JSON Schema object describing the arguments accepted by the function.

              - `Strict bool`

                Whether the delegated Responses model must follow the function’s parameter schema exactly.

            - `ResponsesDelegationUpdateConfigToolWebSearch`

              - `Type WebSearch`

                The tool type. Always `web_search`.

                - `const WebSearchWebSearch WebSearch = "web_search"`

      - `Store bool`

        Whether to store the forked session. Omission inherits the stored session's setting.

    - `Type SessionStart`

      The Live client event type. Always `session.start`.

      - `const SessionStartSessionStart SessionStart = "session.start"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type SessionUpdateEvent struct{…}`

    Update the delegation settings or transcript triggers of an active Live session. The server acknowledges accepted changes with `session.updated`.

    - `Session SessionUpdateConfig`

      Sparse delegation and trigger updates. Omitted settings retain their values. The delegation type cannot change. Model, frontend instructions, audio, and startup input are immutable.

      - `Delegation SessionUpdateConfigDelegationUnion`

        Delegation settings to update. The delegation type must match the current session; omitted settings retain their values.

        - `type ClientDelegation struct{…}`

          Delegate tasks to your application. The Live session emits delegation events that your backend handles.

          - `Type Client`

            The delegation owner. Always `client` for tasks handled by your application.

            - `const ClientClient Client = "client"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

        - `SessionUpdateConfigDelegationResponses`

          - `Type Responses`

            The delegation owner. Always `responses` for tasks handled by the Responses API.

            - `const ResponsesResponses Responses = "responses"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

          - `Responses ResponsesDelegationUpdateConfig`

            Responses backend settings to update. Omitted settings keep their existing values.

        - `SessionUpdateConfigDelegationDecisions`

          - `Type Decisions`

            - `const DecisionsDecisions Decisions = "decisions"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

          - `Decisions DecisionsDelegationUpdateConfig`

            - `Model string`

              `minLength: 1`

            - `Questions []DecisionsDelegationUpdateConfigQuestionUnion`

              Native Decision API questions evaluated together, in order.

              `minItems: 1`, `maxItems: 64`

              - `DecisionsDelegationUpdateConfigQuestionPredicate`

                - `Instructions DecisionsDelegationUpdateConfigQuestionPredicateInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                      - `Text string`

                        `minLength: 0`, `maxLength: 10485760`

                      - `Type InputText`

                        - `const InputTextInputText InputText = "input_text"`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                      - `ImageURL string`

                        A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.

                        `minLength: 0`, `maxLength: 1073741824`

                      - `Type InputImage`

                        - `const InputImageInputImage InputImage = "input_image"`

                      - `Detail DecisionQuestionInputImageDetail`

                        The image detail level, using the selected model's image profile. Defaults to auto.

                        - `const DecisionQuestionInputImageDetailLow DecisionQuestionInputImageDetail = "low"`

                        - `const DecisionQuestionInputImageDetailHigh DecisionQuestionInputImageDetail = "high"`

                        - `const DecisionQuestionInputImageDetailAuto DecisionQuestionInputImageDetail = "auto"`

                        - `const DecisionQuestionInputImageDetailOriginal DecisionQuestionInputImageDetail = "original"`

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                      - `Data DecisionInputJSONDataUnion`

                        - `map[string, any]`

                        - `[]map[string, any]`

                      - `Type InputJSON`

                        - `const InputJSONInputJSON InputJSON = "input_json"`

                - `Type Predicate`

                  The type of the object. Always `predicate`.

                  - `const PredicatePredicate Predicate = "predicate"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

              - `DecisionsDelegationUpdateConfigQuestionChoice`

                - `Choices []DecisionsDelegationUpdateConfigQuestionChoiceChoice`

                  Provide between 2 and 255 choices. Each choice must be unique.

                  `minItems: 2`, `maxItems: 255`

                  - `Value DecisionsDelegationUpdateConfigQuestionChoiceChoiceValueUnion`

                    Choice values are typed: a string and a boolean with the same text are distinct.

                    - `string`

                    - `bool`

                  - `Description string`

                    `minLength: 0`, `maxLength: 1048576`

                - `Instructions DecisionsDelegationUpdateConfigQuestionChoiceInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                - `Type Choice`

                  The type of the object. Always `choice`.

                  - `const ChoiceChoice Choice = "choice"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

              - `DecisionsDelegationUpdateConfigQuestionScore`

                - `Instructions DecisionsDelegationUpdateConfigQuestionScoreInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                - `Levels []DecisionsDelegationUpdateConfigQuestionScoreLevel`

                  `minItems: 2`, `maxItems: 10`

                  - `Label string`

                    `minLength: 0`, `maxLength: 1048576`

                  - `Description string`

                    `minLength: 0`, `maxLength: 1048576`

                - `Type Score`

                  The type of the object. Always `score`.

                  - `const ScoreScore Score = "score"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

      - `Triggers []DecisionTrigger`

        At most one Decisions trigger per transcript event type. Triggers run independently of delegation. On update, omit triggers to keep the current configuration, send a list to replace it, or send an empty list to disable triggers.

        `maxItems: 2`

        - `Decisions DecisionTriggerDecisions`

          Questions evaluated using the current transcript and the session's shared Decision items.

          - `Questions []DecisionTriggerDecisionsQuestionUnion`

            Native Decision API questions evaluated together, in order.

            `minItems: 1`, `maxItems: 64`

            - `DecisionTriggerDecisionsQuestionPredicate`

              - `Instructions DecisionTriggerDecisionsQuestionPredicateInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Type Predicate`

                The type of the object. Always `predicate`.

                - `const PredicatePredicate Predicate = "predicate"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

            - `DecisionTriggerDecisionsQuestionChoice`

              - `Choices []DecisionTriggerDecisionsQuestionChoiceChoice`

                Provide between 2 and 255 choices. Each choice must be unique.

                `minItems: 2`, `maxItems: 255`

                - `Value DecisionTriggerDecisionsQuestionChoiceChoiceValueUnion`

                  Choice values are typed: a string and a boolean with the same text are distinct.

                  - `string`

                  - `bool`

                - `Description string`

                  `minLength: 0`, `maxLength: 1048576`

              - `Instructions DecisionTriggerDecisionsQuestionChoiceInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Type Choice`

                The type of the object. Always `choice`.

                - `const ChoiceChoice Choice = "choice"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

            - `DecisionTriggerDecisionsQuestionScore`

              - `Instructions DecisionTriggerDecisionsQuestionScoreInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Levels []DecisionTriggerDecisionsQuestionScoreLevel`

                `minItems: 2`, `maxItems: 10`

                - `Label string`

                  `minLength: 0`, `maxLength: 1048576`

                - `Description string`

                  `minLength: 0`, `maxLength: 1048576`

              - `Type Score`

                The type of the object. Always `score`.

                - `const ScoreScore Score = "score"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

        - `EventType DecisionTriggerEventType`

          - `const DecisionTriggerEventTypeSessionInputTranscriptDelta DecisionTriggerEventType = "session.input_transcript.delta"`

          - `const DecisionTriggerEventTypeSessionOutputTranscriptDelta DecisionTriggerEventType = "session.output_transcript.delta"`

        - `Type Decisions`

          - `const DecisionsDecisions Decisions = "decisions"`

    - `Type SessionUpdate`

      The Live client event type. Always `session.update`.

      - `const SessionUpdateSessionUpdate SessionUpdate = "session.update"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type InputAudioAppendEvent struct{…}`

    Send audio to a Live session over its primary WebSocket. WebRTC and SIP sessions send audio over their media transport.

    - `Audio string`

      Base64-encoded raw audio in the startup-selected format, without a WAV or other container header. Primary WebSocket only; media transports use their audio track. Audio appends have no acknowledgment. Reflected sideband server events reuse this event type and audio key, with no timestamps or event_id; their audio is always mono PCM16LE at 24 kHz.

      `minLength: 1`

    - `Type SessionInputAudioAppend`

      The Live client event type. Always `session.input_audio.append`.

      - `const SessionInputAudioAppendSessionInputAudioAppend SessionInputAudioAppend = "session.input_audio.append"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type InputAudioMuteEvent struct{…}`

    Mute audio input to the Live model without closing the session. The server acknowledges with `session.input_audio.muted`.

    - `Type SessionInputAudioMute`

      The Live client event type. Always `session.input_audio.mute`.

      - `const SessionInputAudioMuteSessionInputAudioMute SessionInputAudioMute = "session.input_audio.mute"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type InputAudioUnmuteEvent struct{…}`

    Resume audio input to a Live model after muting it. The server acknowledges with `session.input_audio.unmuted`. An active audio fixture still pauses inference until playback finishes.

    - `Type SessionInputAudioUnmute`

      The Live client event type. Always `session.input_audio.unmute`.

      - `const SessionInputAudioUnmuteSessionInputAudioUnmute SessionInputAudioUnmute = "session.input_audio.unmute"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type OutputAudioFixturePlayEvent struct{…}`

    Play one complete audio fixture through the session output. Send this event over the primary WebSocket or a server sideband. Audio must be raw mono PCM16 little-endian at 24 kHz, regardless of the session audio format, and at most 30 seconds. The entire payload is validated before model speech is interrupted and input is muted. Only one fixture can be active. fixture.playing acknowledges acceptance and fixture.played reports server mixer drain. These notifications are not exact transport-media boundaries. Input arriving during playback is dropped and not replayed.

    - `Audio string`

      Base64-encoded raw mono PCM16 audio, little-endian, at 24 kHz. Do not include a WAV or other container header.

      `minLength: 1`, `maxLength: 1920000`

    - `Type SessionOutputAudioFixturePlay`

      - `const SessionOutputAudioFixturePlaySessionOutputAudioFixturePlay SessionOutputAudioFixturePlay = "session.output_audio.fixture.play"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type InstructionsAppendEvent struct{…}`

    Append developer instructions to the Live conversation while it is running, optionally associating them with an existing client delegation. Rejected while an audio fixture is active. These instructions remain in conversation history through compaction and are included in future backend delegations. For external audio, describe content already delivered so the assistant does not repeat it.

    - `Content string`

      Instruction text to append, limited to 500 tokens. This is a plain string, not an array of content parts.

    - `DelegationID string`

      Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation.

      `minLength: 1`

    - `Type SessionInstructionsAppend`

      The Live client event type. Always `session.instructions.append`.

      - `const SessionInstructionsAppendSessionInstructionsAppend SessionInstructionsAppend = "session.instructions.append"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type ThinkingAppendEvent struct{…}`

    Provide silent reasoning or progress context to the Live model, optionally for an existing client delegation. Rejected while an audio fixture is active.

    - `Content string`

      Silent reasoning or progress context, limited to 500 tokens. It does not directly request speech, but can influence later speech and is not a secrecy boundary.

    - `DelegationID string`

      Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation.

      `minLength: 1`

    - `Type SessionThinkingAppend`

      The Live client event type. Always `session.thinking.append`.

      - `const SessionThinkingAppendSessionThinkingAppend SessionThinkingAppend = "session.thinking.append"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type CommentaryAppendEvent struct{…}`

    Provide context the Live model can communicate to the user, optionally for an existing client delegation. Rejected while an audio fixture is active.

    - `Content string`

      Speakable context for the Live model, limited to 500 tokens. Use this for a result the model should communicate; use session.thinking.append for silent context.

    - `DelegationID string`

      Required, nullable. Set null for general session context, or use the ID from session.delegation.created for an existing client delegation. Non-null IDs are not accepted with Responses delegation.

      `minLength: 1`

    - `Type SessionCommentaryAppend`

      The Live client event type. Always `session.commentary.append`.

      - `const SessionCommentaryAppendSessionCommentaryAppend SessionCommentaryAppend = "session.commentary.append"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type DecisionCreateEvent struct{…}`

    Evaluate the configured questions using the current conversation and Decision inputs. Reusing an event_id is rejected for the lifetime of the session.

    - `EventID string`

      `minLength: 1`, `maxLength: 256`

    - `Type DecisionCreate`

      - `const DecisionCreateDecisionCreate DecisionCreate = "decision.create"`

  - `type DecisionItemCreateEvent struct{…}`

    Append an input item for future decisions without starting an evaluation or changing Live voice context.

    - `Item DecisionItemCreateEventItem`

      - `Content DecisionItemCreateEventItemContentUnion`

        The required content of a message item. Tool call and output items omit content.

        - `string`

        - `[]DecisionItemCreateEventItemContentPartsItemUnion`

          - `DecisionItemCreateEventItemContentPartInputText`

            - `Text string`

              The text input to the model.

              `maxLength: 10485760`

            - `Type InputText`

              - `const InputTextInputText InputText = "input_text"`

          - `DecisionItemCreateEventItemContentPartInputImage`

            - `ImageURL string`

              A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.

              `maxLength: 20971520`

            - `Type InputImage`

              - `const InputImageInputImage InputImage = "input_image"`

            - `Detail string`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `const DecisionItemCreateEventItemContentPartInputImageDetailLow DecisionItemCreateEventItemContentPartInputImageDetail = "low"`

              - `const DecisionItemCreateEventItemContentPartInputImageDetailHigh DecisionItemCreateEventItemContentPartInputImageDetail = "high"`

              - `const DecisionItemCreateEventItemContentPartInputImageDetailAuto DecisionItemCreateEventItemContentPartInputImageDetail = "auto"`

              - `const DecisionItemCreateEventItemContentPartInputImageDetailOriginal DecisionItemCreateEventItemContentPartInputImageDetail = "original"`

      - `Role User`

        The role on a message item, defaulting to user. Tool call and output items omit role.

        - `const UserUser User = "user"`

      - `ID string`

        The unique ID of this message item.

      - `Type string`

        The item type. An omitted type denotes a message. Tool call and output items have their corresponding tool type.

        - `const DecisionItemCreateEventItemTypeMessage DecisionItemCreateEventItemType = "message"`

    - `Type DecisionItemCreate`

      - `const DecisionItemCreateDecisionItemCreate DecisionItemCreate = "decision.item.create"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type DecisionItemDeleteEvent struct{…}`

    Delete an input item from future decisions without starting an evaluation or changing Live voice context.

    - `ItemID string`

      `minLength: 1`

    - `Type DecisionItemDelete`

      - `const DecisionItemDeleteDecisionItemDelete DecisionItemDelete = "decision.item.delete"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type ResponseItemCreateEvent struct{…}`

    Add an input item to the Live session’s Responses backend. Requires Responses delegation; use `response.create` to request a response.

    - `Item ResponseInputItemUnion`

      An input item to append to the Responses backend conversation, such as a user message or a function tool result.

      - `type EasyInputMessage 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 EasyInputMessageContentUnion`

          Text, image, or audio input to the model, used to generate a response.
          Can also contain previous assistant responses.

          - `string`

          - `type ResponseInputMessageContentList []ResponseInputContentUnion`

            A list of one or many input items to the model, containing different content
            types.

            - `type ResponseInputText 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 ResponseInputTextPromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputTextPromptCacheBreakpointTtl30m ResponseInputTextPromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputTextPromptCacheBreakpointTtl12h ResponseInputTextPromptCacheBreakpointTtl = "12h"`

            - `type ResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).

              - `Detail ResponseInputImageDetail`

                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                - `const ResponseInputImageDetailLow ResponseInputImageDetail = "low"`

                - `const ResponseInputImageDetailHigh ResponseInputImageDetail = "high"`

                - `const ResponseInputImageDetailAuto ResponseInputImageDetail = "auto"`

                - `const ResponseInputImageDetailOriginal ResponseInputImageDetail = "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.

                `format: uri`

              - `PromptCacheBreakpoint ResponseInputImagePromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputImagePromptCacheBreakpointTtl30m ResponseInputImagePromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputImagePromptCacheBreakpointTtl12h ResponseInputImagePromptCacheBreakpointTtl = "12h"`

            - `type ResponseInputFile struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail ResponseInputFileDetail`

                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 ResponseInputFileDetailAuto ResponseInputFileDetail = "auto"`

                - `const ResponseInputFileDetailLow ResponseInputFileDetail = "low"`

                - `const ResponseInputFileDetailHigh ResponseInputFileDetail = "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.

                `format: uri`

              - `Filename string`

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

              - `PromptCacheBreakpoint ResponseInputFilePromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputFilePromptCacheBreakpointTtl30m ResponseInputFilePromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputFilePromptCacheBreakpointTtl12h ResponseInputFilePromptCacheBreakpointTtl = "12h"`

        - `Role EasyInputMessageRole`

          The role of the message input. One of `user`, `assistant`, `system`, or
          `developer`.

          - `const EasyInputMessageRoleUser EasyInputMessageRole = "user"`

          - `const EasyInputMessageRoleAssistant EasyInputMessageRole = "assistant"`

          - `const EasyInputMessageRoleSystem EasyInputMessageRole = "system"`

          - `const EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"`

        - `Phase EasyInputMessagePhase`

          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 EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"`

          - `const EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"`

        - `Type EasyInputMessageType`

          The type of the message input. Always `message`.

          - `const EasyInputMessageTypeMessage EasyInputMessageType = "message"`

      - `type ResponseInputItemMessage 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 ResponseInputMessageContentList`

          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 ResponseInputItemMessageRoleUser ResponseInputItemMessageRole = "user"`

          - `const ResponseInputItemMessageRoleSystem ResponseInputItemMessageRole = "system"`

          - `const ResponseInputItemMessageRoleDeveloper ResponseInputItemMessageRole = "developer"`

        - `Status string`

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

          - `const ResponseInputItemMessageStatusInProgress ResponseInputItemMessageStatus = "in_progress"`

          - `const ResponseInputItemMessageStatusCompleted ResponseInputItemMessageStatus = "completed"`

          - `const ResponseInputItemMessageStatusIncomplete ResponseInputItemMessageStatus = "incomplete"`

        - `Type string`

          The type of the message input. Always set to `message`.

          - `const ResponseInputItemMessageTypeMessage ResponseInputItemMessageType = "message"`

      - `type ResponseOutputMessage struct{…}`

        An output message from the model.

        - `ID string`

          The unique ID of the output message.

        - `Content []ResponseOutputMessageContentUnion`

          The content of the output message.

          - `type ResponseOutputText struct{…}`

            A text output from the model.

            - `Annotations []ResponseOutputTextAnnotationUnion`

              The annotations of the text output.

              - `type ResponseOutputTextAnnotationFileCitation 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 in the output text at which to insert the file citation.

                - `Type FileCitation`

                  The type of the file citation. Always `file_citation`.

                  - `const FileCitationFileCitation FileCitation = "file_citation"`

              - `type ResponseOutputTextAnnotationURLCitation 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.

                  `format: uri`

              - `type ResponseOutputTextAnnotationContainerFileCitation 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 ResponseOutputTextAnnotationFilePath 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 []ResponseOutputTextLogprob`

              - `Token string`

              - `Bytes []int64`

              - `Logprob float64`

              - `TopLogprobs []ResponseOutputTextLogprobTopLogprob`

                - `Token string`

                - `Bytes []int64`

                - `Logprob float64`

          - `type ResponseOutputRefusal 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 ResponseOutputMessageStatus`

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

          - `const ResponseOutputMessageStatusInProgress ResponseOutputMessageStatus = "in_progress"`

          - `const ResponseOutputMessageStatusCompleted ResponseOutputMessageStatus = "completed"`

          - `const ResponseOutputMessageStatusIncomplete ResponseOutputMessageStatus = "incomplete"`

        - `Type Message`

          The type of the output message. Always `message`.

          - `const MessageMessage Message = "message"`

        - `Phase ResponseOutputMessagePhase`

          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 ResponseOutputMessagePhaseCommentary ResponseOutputMessagePhase = "commentary"`

          - `const ResponseOutputMessagePhaseFinalAnswer ResponseOutputMessagePhase = "final_answer"`

      - `type ResponseFileSearchToolCall struct{…}`

        The results of a file search tool call. See the
        [file search guide](/api/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 ResponseFileSearchToolCallStatus`

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

          - `const ResponseFileSearchToolCallStatusInProgress ResponseFileSearchToolCallStatus = "in_progress"`

          - `const ResponseFileSearchToolCallStatusSearching ResponseFileSearchToolCallStatus = "searching"`

          - `const ResponseFileSearchToolCallStatusCompleted ResponseFileSearchToolCallStatus = "completed"`

          - `const ResponseFileSearchToolCallStatusIncomplete ResponseFileSearchToolCallStatus = "incomplete"`

          - `const ResponseFileSearchToolCallStatusFailed ResponseFileSearchToolCallStatus = "failed"`

        - `Type FileSearchCall`

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

          - `const FileSearchCallFileSearchCall FileSearchCall = "file_search_call"`

        - `Results []ResponseFileSearchToolCallResult`

          The results of the file search tool call.

          - `Attributes map[string, ResponseFileSearchToolCallResultAttributeUnion]`

            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.

            `format: float`

          - `Text string`

            The text that was retrieved from the file.

      - `type ResponseComputerToolCall struct{…}`

        A tool call to a computer use tool. See the
        [computer use guide](/api/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 []ResponseComputerToolCallPendingSafetyCheck`

          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 ResponseComputerToolCallStatus`

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

          - `const ResponseComputerToolCallStatusInProgress ResponseComputerToolCallStatus = "in_progress"`

          - `const ResponseComputerToolCallStatusCompleted ResponseComputerToolCallStatus = "completed"`

          - `const ResponseComputerToolCallStatusIncomplete ResponseComputerToolCallStatus = "incomplete"`

        - `Type ResponseComputerToolCallType`

          The type of the computer call. Always `computer_call`.

          - `const ResponseComputerToolCallTypeComputerCall ResponseComputerToolCallType = "computer_call"`

        - `Action ResponseComputerToolCallActionUnion`

          A click action.

          - `type ResponseComputerToolCallActionClick struct{…}`

            A click action.

            - `Button string`

              Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.

              - `const ResponseComputerToolCallActionClickButtonLeft ResponseComputerToolCallActionClickButton = "left"`

              - `const ResponseComputerToolCallActionClickButtonRight ResponseComputerToolCallActionClickButton = "right"`

              - `const ResponseComputerToolCallActionClickButtonWheel ResponseComputerToolCallActionClickButton = "wheel"`

              - `const ResponseComputerToolCallActionClickButtonBack ResponseComputerToolCallActionClickButton = "back"`

              - `const ResponseComputerToolCallActionClickButtonForward ResponseComputerToolCallActionClickButton = "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 ResponseComputerToolCallActionDoubleClick 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 ResponseComputerToolCallActionDrag struct{…}`

            A drag action.

            - `Path []ResponseComputerToolCallActionDragPath`

              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 ResponseComputerToolCallActionKeypress 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 ResponseComputerToolCallActionMove 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 ResponseComputerToolCallActionScreenshot 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 ResponseComputerToolCallActionScroll 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 ResponseComputerToolCallActionType 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 ResponseComputerToolCallActionWait 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 ComputerActionList`

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

          - `type ComputerActionClick struct{…}`

            A click action.

            - `Button string`

              Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.

              - `const ComputerActionClickButtonLeft ComputerActionClickButton = "left"`

              - `const ComputerActionClickButtonRight ComputerActionClickButton = "right"`

              - `const ComputerActionClickButtonWheel ComputerActionClickButton = "wheel"`

              - `const ComputerActionClickButtonBack ComputerActionClickButton = "back"`

              - `const ComputerActionClickButtonForward ComputerActionClickButton = "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 ComputerActionDoubleClick 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 ComputerActionDrag struct{…}`

            A drag action.

            - `Path []ComputerActionDragPath`

              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 ComputerActionKeypress 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 ComputerActionMove 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 ComputerActionScreenshot 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 ComputerActionScroll 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 ComputerActionType 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 ComputerActionWait 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"`

      - `type ResponseInputItemComputerCallOutput struct{…}`

        The output of a computer tool call.

        - `CallID string`

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

          `minLength: 1`, `maxLength: 64`

        - `Output ResponseComputerToolCallOutputScreenshot`

          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.

            `format: uri`

        - `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 []ResponseInputItemComputerCallOutputAcknowledgedSafetyCheck`

          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.

        - `Status string`

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

          - `const ResponseInputItemComputerCallOutputStatusInProgress ResponseInputItemComputerCallOutputStatus = "in_progress"`

          - `const ResponseInputItemComputerCallOutputStatusCompleted ResponseInputItemComputerCallOutputStatus = "completed"`

          - `const ResponseInputItemComputerCallOutputStatusIncomplete ResponseInputItemComputerCallOutputStatus = "incomplete"`

      - `type ResponseFunctionWebSearch struct{…}`

        The results of a web search tool call. See the
        [web search guide](/api/docs/guides/tools-web-search) for more information.

        - `ID string`

          The unique ID of the web search tool call.

        - `Action ResponseFunctionWebSearchActionUnion`

          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 ResponseFunctionWebSearchActionSearch 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 []ResponseFunctionWebSearchActionSearchSource`

              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.

                `format: uri`

          - `type ResponseFunctionWebSearchActionOpenPage 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.

              `format: uri`

          - `type ResponseFunctionWebSearchActionFind 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.

              `format: uri`

        - `Status ResponseFunctionWebSearchStatus`

          The status of the web search tool call.

          - `const ResponseFunctionWebSearchStatusInProgress ResponseFunctionWebSearchStatus = "in_progress"`

          - `const ResponseFunctionWebSearchStatusSearching ResponseFunctionWebSearchStatus = "searching"`

          - `const ResponseFunctionWebSearchStatusCompleted ResponseFunctionWebSearchStatus = "completed"`

          - `const ResponseFunctionWebSearchStatusFailed ResponseFunctionWebSearchStatus = "failed"`

          - `const ResponseFunctionWebSearchStatusIncomplete ResponseFunctionWebSearchStatus = "incomplete"`

        - `Type WebSearchCall`

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

          - `const WebSearchCallWebSearchCall WebSearchCall = "web_search_call"`

      - `type ResponseFunctionToolCall struct{…}`

        A tool call to run a function. See the
        [function calling guide](/api/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.

        - `Async bool`

          Whether the function tool call runs asynchronously.

        - `Caller ResponseFunctionToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseFunctionToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type ResponseFunctionToolCallCallerProgram 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 ResponseFunctionToolCallStatus`

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

          - `const ResponseFunctionToolCallStatusInProgress ResponseFunctionToolCallStatus = "in_progress"`

          - `const ResponseFunctionToolCallStatusCompleted ResponseFunctionToolCallStatus = "completed"`

          - `const ResponseFunctionToolCallStatusIncomplete ResponseFunctionToolCallStatus = "incomplete"`

      - `type ResponseInputItemFunctionCallOutput struct{…}`

        The output of a function tool call.

        - `Output ResponseInputItemFunctionCallOutputOutputUnion`

          Text, image, or file output of the function tool call.

          - `string`

          - `type ResponseFunctionCallOutputItemList []ResponseFunctionCallOutputItemUnion`

            An array of content outputs (text, image, file) for the function tool call.

            - `type ResponseInputTextContent struct{…}`

              A text input to the model.

              - `Text string`

                The text input to the model.

                `maxLength: 10485760`

              - `Type InputText`

                The type of the input item. Always `input_text`.

                - `const InputTextInputText InputText = "input_text"`

              - `PromptCacheBreakpoint ResponseInputTextContentPromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputTextContentPromptCacheBreakpointTtl30m ResponseInputTextContentPromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputTextContentPromptCacheBreakpointTtl12h ResponseInputTextContentPromptCacheBreakpointTtl = "12h"`

            - `type ResponseInputImageContent struct{…}`

              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision)

              - `Type InputImage`

                The type of the input item. Always `input_image`.

                - `const InputImageInputImage InputImage = "input_image"`

              - `Detail ResponseInputImageContentDetail`

                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

                - `const ResponseInputImageContentDetailLow ResponseInputImageContentDetail = "low"`

                - `const ResponseInputImageContentDetailHigh ResponseInputImageContentDetail = "high"`

                - `const ResponseInputImageContentDetailAuto ResponseInputImageContentDetail = "auto"`

                - `const ResponseInputImageContentDetailOriginal ResponseInputImageContentDetail = "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.

                `maxLength: 20971520`, `format: uri`

              - `PromptCacheBreakpoint ResponseInputImageContentPromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputImageContentPromptCacheBreakpointTtl30m ResponseInputImageContentPromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputImageContentPromptCacheBreakpointTtl12h ResponseInputImageContentPromptCacheBreakpointTtl = "12h"`

            - `type ResponseInputFileContent struct{…}`

              A file input to the model.

              - `Type InputFile`

                The type of the input item. Always `input_file`.

                - `const InputFileInputFile InputFile = "input_file"`

              - `Detail ResponseInputFileContentDetail`

                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 ResponseInputFileContentDetailAuto ResponseInputFileContentDetail = "auto"`

                - `const ResponseInputFileContentDetailLow ResponseInputFileContentDetail = "low"`

                - `const ResponseInputFileContentDetailHigh ResponseInputFileContentDetail = "high"`

              - `FileData string`

                The base64-encoded data of the file to be sent to the model.

                `maxLength: 73400320`

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

                `format: uri`

              - `Filename string`

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

              - `PromptCacheBreakpoint ResponseInputFileContentPromptCacheBreakpoint`

                Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits 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"`

                - `Ttl string`

                  The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

                  - `const ResponseInputFileContentPromptCacheBreakpointTtl30m ResponseInputFileContentPromptCacheBreakpointTtl = "30m"`

                  - `const ResponseInputFileContentPromptCacheBreakpointTtl12h ResponseInputFileContentPromptCacheBreakpointTtl = "12h"`

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

        - `CallID string`

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

          `minLength: 1`, `maxLength: 64`

        - `Caller ResponseInputItemFunctionCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseInputItemFunctionCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseInputItemFunctionCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Name string`

          The name of the tool that produced the output.

          `minLength: 1`, `maxLength: 128`

        - `Namespace string`

          The namespace of the tool that produced the output.

          `minLength: 1`, `maxLength: 64`

        - `Status string`

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

          - `const ResponseInputItemFunctionCallOutputStatusInProgress ResponseInputItemFunctionCallOutputStatus = "in_progress"`

          - `const ResponseInputItemFunctionCallOutputStatusCompleted ResponseInputItemFunctionCallOutputStatus = "completed"`

          - `const ResponseInputItemFunctionCallOutputStatusIncomplete ResponseInputItemFunctionCallOutputStatus = "incomplete"`

      - `type ResponseInputItemToolSearchCall 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.

        - `CallID string`

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

          `minLength: 1`, `maxLength: 64`

        - `Execution string`

          Whether tool search was executed by the server or by the client.

          - `const ResponseInputItemToolSearchCallExecutionServer ResponseInputItemToolSearchCallExecution = "server"`

          - `const ResponseInputItemToolSearchCallExecutionClient ResponseInputItemToolSearchCallExecution = "client"`

        - `Status string`

          The status of the tool search call.

          - `const ResponseInputItemToolSearchCallStatusInProgress ResponseInputItemToolSearchCallStatus = "in_progress"`

          - `const ResponseInputItemToolSearchCallStatusCompleted ResponseInputItemToolSearchCallStatus = "completed"`

          - `const ResponseInputItemToolSearchCallStatusIncomplete ResponseInputItemToolSearchCallStatus = "incomplete"`

      - `type ResponseToolSearchOutputItemParamResp struct{…}`

        - `Tools []ResponseToolSearchOutputItemParamToolUnionResp`

          The loaded tool definitions returned by the tool search output.

          - `type FunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/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 FunctionToolAllowedCallerDirect FunctionToolAllowedCaller = "direct"`

              - `const FunctionToolAllowedCallerProgrammatic FunctionToolAllowedCaller = "programmatic"`

            - `Async bool`

            - `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 FileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/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 FileSearchToolFiltersUnion`

              A filter to apply.

              - `type ComparisonFilter 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 ComparisonFilterType`

                  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 ComparisonFilterTypeEq ComparisonFilterType = "eq"`

                  - `const ComparisonFilterTypeNe ComparisonFilterType = "ne"`

                  - `const ComparisonFilterTypeGt ComparisonFilterType = "gt"`

                  - `const ComparisonFilterTypeGte ComparisonFilterType = "gte"`

                  - `const ComparisonFilterTypeLt ComparisonFilterType = "lt"`

                  - `const ComparisonFilterTypeLte ComparisonFilterType = "lte"`

                  - `const ComparisonFilterTypeIn ComparisonFilterType = "in"`

                  - `const ComparisonFilterTypeNin ComparisonFilterType = "nin"`

                - `Value ComparisonFilterValueUnion`

                  The value to compare against the attribute key; supports string, number, or boolean types.

                  - `string`

                  - `float64`

                  - `bool`

                  - `type ComparisonFilterValueArray []ComparisonFilterValueArrayItemUnion`

                    - `string`

                    - `float64`

              - `type CompoundFilter struct{…}`

                Combine multiple filters using `and` or `or`.

                - `Filters []ComparisonFilter`

                  Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.

                  - `Key string`

                    The key to compare against the value.

                  - `Type ComparisonFilterType`

                    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

                  - `Value ComparisonFilterValueUnion`

                    The value to compare against the attribute key; supports string, number, or boolean types.

                - `Type CompoundFilterType`

                  Type of operation: `and` or `or`.

                  - `const CompoundFilterTypeAnd CompoundFilterType = "and"`

                  - `const CompoundFilterTypeOr CompoundFilterType = "or"`

            - `MaxNumResults int64`

              The maximum number of results to return. This number should be between 1 and 50 inclusive.

            - `RankingOptions FileSearchToolRankingOptions`

              Ranking options for search.

              - `HybridSearch FileSearchToolRankingOptionsHybridSearch`

                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 FileSearchToolRankingOptionsRankerAuto FileSearchToolRankingOptionsRanker = "auto"`

                - `const FileSearchToolRankingOptionsRankerDefault2024_11_15 FileSearchToolRankingOptionsRanker = "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 ComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).

            - `Type Computer`

              The type of the computer tool. Always `computer`.

              - `const ComputerComputer Computer = "computer"`

          - `type ComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).

            - `DisplayHeight int64`

              The height of the computer display.

            - `DisplayWidth int64`

              The width of the computer display.

            - `Environment ComputerUsePreviewToolEnvironment`

              The type of computer environment to control.

              - `const ComputerUsePreviewToolEnvironmentWindows ComputerUsePreviewToolEnvironment = "windows"`

              - `const ComputerUsePreviewToolEnvironmentMac ComputerUsePreviewToolEnvironment = "mac"`

              - `const ComputerUsePreviewToolEnvironmentLinux ComputerUsePreviewToolEnvironment = "linux"`

              - `const ComputerUsePreviewToolEnvironmentUbuntu ComputerUsePreviewToolEnvironment = "ubuntu"`

              - `const ComputerUsePreviewToolEnvironmentBrowser ComputerUsePreviewToolEnvironment = "browser"`

            - `Type ComputerUsePreview`

              The type of the computer use tool. Always `computer_use_preview`.

              - `const ComputerUsePreviewComputerUsePreview ComputerUsePreview = "computer_use_preview"`

          - `type WebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](/api/docs/guides/tools-web-search).

            - `Type WebSearchToolType`

              The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.

              - `const WebSearchToolTypeWebSearch WebSearchToolType = "web_search"`

              - `const WebSearchToolTypeWebSearch2025_08_26 WebSearchToolType = "web_search_2025_08_26"`

            - `ExternalWebAccess bool`

              Allow live internet access for web search. Defaults to true when omitted. When false, the web search tool runs in offline/cache-only mode and will not fetch new external content.

            - `Filters WebSearchToolFilters`

              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 WebSearchToolSearchContextSize`

              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 WebSearchToolSearchContextSizeLow WebSearchToolSearchContextSize = "low"`

              - `const WebSearchToolSearchContextSizeMedium WebSearchToolSearchContextSize = "medium"`

              - `const WebSearchToolSearchContextSizeHigh WebSearchToolSearchContextSize = "high"`

            - `UserLocation WebSearchToolUserLocation`

              The approximate location of the user. If omitted or null, defaults to the
              United States. To avoid this fallback, pass `{"type": "approximate"}` without
              location fields. To localize results, provide the relevant location fields.

              - `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 WebSearchToolUserLocationTypeApproximate WebSearchToolUserLocationType = "approximate"`

          - `type ResponseToolSearchOutputItemParamToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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).

              `minItems: 1`

              - `const ResponseToolSearchOutputItemParamToolMcpAllowedCallerDirect ResponseToolSearchOutputItemParamToolMcpAllowedCaller = "direct"`

              - `const ResponseToolSearchOutputItemParamToolMcpAllowedCallerProgrammatic ResponseToolSearchOutputItemParamToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools ResponseToolSearchOutputItemParamToolMcpAllowedToolsUnionResp`

              List of allowed tool names or a filter object.

              - `type ResponseToolSearchOutputItemParamToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type ResponseToolSearchOutputItemParamToolMcpAllowedToolsMcpToolFilter 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](/api/docs/guides/tools-connectors-mcp#connectors).

              This field is deprecated for models released after September 1, 2026.
              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to
              connect through a Secure MCP Tunnel.

              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 ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorDropbox ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_dropbox"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorGmail ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_gmail"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorGooglecalendar ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_googlecalendar"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorGoogledrive ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_googledrive"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorMicrosoftteams ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_microsoftteams"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorOutlookcalendar ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_outlookcalendar"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorOutlookemail ResponseToolSearchOutputItemParamToolMcpConnectorID = "connector_outlookemail"`

              - `const ResponseToolSearchOutputItemParamToolMcpConnectorIDConnectorSharepoint ResponseToolSearchOutputItemParamToolMcpConnectorID = "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 ResponseToolSearchOutputItemParamToolMcpRequireApprovalUnionResp`

              Specify which of the MCP server's tools require approval.

              - `type ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalFilter 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 ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalFilterAlwaysResp`

                  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 ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalFilterNeverResp`

                  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 ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalSetting 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 ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalSettingAlways ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalSettingNever ResponseToolSearchOutputItemParamToolMcpRequireApprovalMcpToolApprovalSetting = "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.

              `format: uri`

            - `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 ResponseToolSearchOutputItemParamToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container ResponseToolSearchOutputItemParamToolCodeInterpreterContainerUnionResp`

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

                  `maxItems: 50`

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy ResponseToolSearchOutputItemParamToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnionResp`

                  Network access policy for the container.

                  - `type ContainerNetworkPolicyDisabled struct{…}`

                    - `Type Disabled`

                      Disable outbound network access. Always `disabled`.

                      - `const DisabledDisabled Disabled = "disabled"`

                  - `type ContainerNetworkPolicyAllowlist struct{…}`

                    - `AllowedDomains []string`

                      A list of allowed domains when type is `allowlist`.

                      `minItems: 1`

                    - `Type Allowlist`

                      Allow outbound network access only to specified domains. Always `allowlist`.

                      - `const AllowlistAllowlist Allowlist = "allowlist"`

                    - `DomainSecrets []ContainerNetworkPolicyDomainSecret`

                      Optional domain-scoped secrets for allowlisted domains.

                      `minItems: 1`

                      - `Domain string`

                        The domain associated with the secret.

                        `minLength: 1`

                      - `Name string`

                        The name of the secret to inject for the domain.

                        `minLength: 1`

                      - `Value string`

                        The secret value to inject for the domain.

                        `minLength: 1`, `maxLength: 10485760`

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              `minItems: 1`

              - `const ResponseToolSearchOutputItemParamToolCodeInterpreterAllowedCallerDirect ResponseToolSearchOutputItemParamToolCodeInterpreterAllowedCaller = "direct"`

              - `const ResponseToolSearchOutputItemParamToolCodeInterpreterAllowedCallerProgrammatic ResponseToolSearchOutputItemParamToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type ResponseToolSearchOutputItemParamToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type ResponseToolSearchOutputItemParamToolImageGeneration 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 ResponseToolSearchOutputItemParamToolImageGenerationActionGenerate ResponseToolSearchOutputItemParamToolImageGenerationAction = "generate"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationActionEdit ResponseToolSearchOutputItemParamToolImageGenerationAction = "edit"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationActionAuto ResponseToolSearchOutputItemParamToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s). 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.5-sunburst` and `gpt-image-2.5-flare`, including their
              `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds.
              Transparent backgrounds are available for supported GPT Image models. For
              `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When
              using `transparent`, set the output format to `png` or `webp`.

              - `const ResponseToolSearchOutputItemParamToolImageGenerationBackgroundTransparent ResponseToolSearchOutputItemParamToolImageGenerationBackground = "transparent"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationBackgroundOpaque ResponseToolSearchOutputItemParamToolImageGenerationBackground = "opaque"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationBackgroundAuto ResponseToolSearchOutputItemParamToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supports `high` and `low` on `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.

              - `const ResponseToolSearchOutputItemParamToolImageGenerationInputFidelityHigh ResponseToolSearchOutputItemParamToolImageGenerationInputFidelity = "high"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationInputFidelityLow ResponseToolSearchOutputItemParamToolImageGenerationInputFidelity = "low"`

            - `InputImageMask ResponseToolSearchOutputItemParamToolImageGenerationInputImageMaskResp`

              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. One of `gpt-image-1-mini`,
              `gpt-image-1.5`, `gpt-image-2`,
              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
              `gpt-image-2`.

              `gpt-image-1` was shut down on October 23, 2026. Use
              `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.

              - `string`

              - `string`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage1 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-1"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage1Mini ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-1-mini"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2_2026_04_21 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2_5Sunburst ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2.5-sunburst"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2_5Sunburst2026_09_08 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2.5-sunburst-2026-09-08"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2_5Flare ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2.5-flare"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage2_5Flare2026_09_08 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-2.5-flare-2026-09-08"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelGPTImage1_5 ResponseToolSearchOutputItemParamToolImageGenerationModel = "gpt-image-1.5"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationModelChatgptImageLatest ResponseToolSearchOutputItemParamToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const ResponseToolSearchOutputItemParamToolImageGenerationModerationAuto ResponseToolSearchOutputItemParamToolImageGenerationModeration = "auto"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationModerationLow ResponseToolSearchOutputItemParamToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

              `minimum: 0`, `maximum: 100`

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const ResponseToolSearchOutputItemParamToolImageGenerationOutputFormatPNG ResponseToolSearchOutputItemParamToolImageGenerationOutputFormat = "png"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationOutputFormatWebP ResponseToolSearchOutputItemParamToolImageGenerationOutputFormat = "webp"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationOutputFormatJPEG ResponseToolSearchOutputItemParamToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              `minimum: 0`, `maximum: 3`

            - `Quality string`

              The quality of the generated image. The GPT image models support `low`,
              `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
              including their `2026-09-08` snapshots, also support `xhigh` and `max`.
              Default: `auto`.

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityLow ResponseToolSearchOutputItemParamToolImageGenerationQuality = "low"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityMedium ResponseToolSearchOutputItemParamToolImageGenerationQuality = "medium"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityHigh ResponseToolSearchOutputItemParamToolImageGenerationQuality = "high"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityXhigh ResponseToolSearchOutputItemParamToolImageGenerationQuality = "xhigh"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityMax ResponseToolSearchOutputItemParamToolImageGenerationQuality = "max"`

              - `const ResponseToolSearchOutputItemParamToolImageGenerationQualityAuto ResponseToolSearchOutputItemParamToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, 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.

              - `string`

              - `string`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationSize1024x1024 ResponseToolSearchOutputItemParamToolImageGenerationSize = "1024x1024"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationSize1024x1536 ResponseToolSearchOutputItemParamToolImageGenerationSize = "1024x1536"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationSize1536x1024 ResponseToolSearchOutputItemParamToolImageGenerationSize = "1536x1024"`

                - `const ResponseToolSearchOutputItemParamToolImageGenerationSizeAuto ResponseToolSearchOutputItemParamToolImageGenerationSize = "auto"`

          - `type ResponseToolSearchOutputItemParamToolLocalShell 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 FunctionShellTool 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).

              `minItems: 1`

              - `const FunctionShellToolAllowedCallerDirect FunctionShellToolAllowedCaller = "direct"`

              - `const FunctionShellToolAllowedCallerProgrammatic FunctionShellToolAllowedCaller = "programmatic"`

            - `Environment FunctionShellToolEnvironmentUnion`

              - `type ContainerAuto 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.

                  `maxItems: 50`

                - `MemoryLimit ContainerAutoMemoryLimit`

                  The memory limit for the container.

                  - `const ContainerAutoMemoryLimit1g ContainerAutoMemoryLimit = "1g"`

                  - `const ContainerAutoMemoryLimit4g ContainerAutoMemoryLimit = "4g"`

                  - `const ContainerAutoMemoryLimit16g ContainerAutoMemoryLimit = "16g"`

                  - `const ContainerAutoMemoryLimit64g ContainerAutoMemoryLimit = "64g"`

                - `NetworkPolicy ContainerAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type ContainerNetworkPolicyDisabled struct{…}`

                  - `type ContainerNetworkPolicyAllowlist struct{…}`

                - `Skills []ContainerAutoSkillUnion`

                  An optional list of skills referenced by id or inline data.

                  `maxItems: 200`

                  - `type SkillReference struct{…}`

                    - `SkillID string`

                      The ID of the referenced skill.

                      `minLength: 1`, `maxLength: 64`

                    - `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 InlineSkill struct{…}`

                    - `Description string`

                      The description of the skill.

                    - `Name string`

                      The name of the skill.

                    - `Source InlineSkillSource`

                      Inline skill payload

                      - `Data string`

                        Base64-encoded skill zip bundle.

                        `minLength: 1`, `maxLength: 70254592`

                      - `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 LocalEnvironment struct{…}`

                - `Type Local`

                  Use a local computer environment.

                  - `const LocalLocal Local = "local"`

                - `Skills []LocalSkill`

                  An optional list of skills.

                  `maxItems: 200`

                  - `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 ContainerReference 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 CustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/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).

              `minItems: 1`

              - `const CustomToolAllowedCallerDirect CustomToolAllowedCaller = "direct"`

              - `const CustomToolAllowedCallerProgrammatic CustomToolAllowedCaller = "programmatic"`

            - `Async bool`

              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

            - `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 CustomToolInputFormatUnion`

              The input format for the custom tool. Default is unconstrained text.

              - `type CustomToolInputFormatText struct{…}`

                Unconstrained free-form text.

                - `Type Text`

                  Unconstrained text format. Always `text`.

                  - `const TextText Text = "text"`

              - `type CustomToolInputFormatGrammar 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 CustomToolInputFormatGrammarSyntaxLark CustomToolInputFormatGrammarSyntax = "lark"`

                  - `const CustomToolInputFormatGrammarSyntaxRegex CustomToolInputFormatGrammarSyntax = "regex"`

                - `Type Grammar`

                  Grammar format. Always `grammar`.

                  - `const GrammarGrammar Grammar = "grammar"`

          - `type ToolSearchOutputNamespaceTool 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`).

              `minLength: 1`

            - `Tools []ToolSearchOutputNamespaceToolToolUnion`

              The function/custom tools loaded inside this namespace.

              `minItems: 1`

              - `type ToolSearchOutputNamespaceToolToolFunction struct{…}`

                - `Name string`

                  The name of the loaded function tool.

                  `minLength: 1`, `maxLength: 128`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  `minItems: 1`

                  - `const ToolSearchOutputNamespaceToolToolFunctionAllowedCallerDirect ToolSearchOutputNamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const ToolSearchOutputNamespaceToolToolFunctionAllowedCallerProgrammatic ToolSearchOutputNamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `Async bool`

                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

                - `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 CustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type ToolSearchTool 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 ToolSearchToolExecution`

              Whether tool search is executed by the server or by the client.

              - `const ToolSearchToolExecutionServer ToolSearchToolExecution = "server"`

              - `const ToolSearchToolExecutionClient ToolSearchToolExecution = "client"`

            - `Parameters any`

              Parameter schema for a client-executed tool search tool.

          - `type WebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).

            - `Type WebSearchPreviewToolType`

              The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.

              - `const WebSearchPreviewToolTypeWebSearchPreview WebSearchPreviewToolType = "web_search_preview"`

              - `const WebSearchPreviewToolTypeWebSearchPreview2025_03_11 WebSearchPreviewToolType = "web_search_preview_2025_03_11"`

            - `SearchContentTypes []string`

              - `const WebSearchPreviewToolSearchContentTypeText WebSearchPreviewToolSearchContentType = "text"`

              - `const WebSearchPreviewToolSearchContentTypeImage WebSearchPreviewToolSearchContentType = "image"`

            - `SearchContextSize WebSearchPreviewToolSearchContextSize`

              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 WebSearchPreviewToolSearchContextSizeLow WebSearchPreviewToolSearchContextSize = "low"`

              - `const WebSearchPreviewToolSearchContextSizeMedium WebSearchPreviewToolSearchContextSize = "medium"`

              - `const WebSearchPreviewToolSearchContextSizeHigh WebSearchPreviewToolSearchContextSize = "high"`

            - `UserLocation WebSearchPreviewToolUserLocation`

              The approximate location of the user. If omitted or null, defaults to the United States. To avoid this fallback, pass `{"type": "approximate"}` without location fields. To localize results, provide the relevant location fields.

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

              `minItems: 1`

              - `const ApplyPatchToolAllowedCallerDirect ApplyPatchToolAllowedCaller = "direct"`

              - `const ApplyPatchToolAllowedCallerProgrammatic ApplyPatchToolAllowedCaller = "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.

        - `CallID string`

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

          `minLength: 1`, `maxLength: 64`

        - `Execution ResponseToolSearchOutputItemParamExecution`

          Whether tool search was executed by the server or by the client.

          - `const ResponseToolSearchOutputItemParamExecutionServer ResponseToolSearchOutputItemParamExecution = "server"`

          - `const ResponseToolSearchOutputItemParamExecutionClient ResponseToolSearchOutputItemParamExecution = "client"`

        - `Status ResponseToolSearchOutputItemParamStatus`

          The status of the tool search output.

          - `const ResponseToolSearchOutputItemParamStatusInProgress ResponseToolSearchOutputItemParamStatus = "in_progress"`

          - `const ResponseToolSearchOutputItemParamStatusCompleted ResponseToolSearchOutputItemParamStatus = "completed"`

          - `const ResponseToolSearchOutputItemParamStatusIncomplete ResponseToolSearchOutputItemParamStatus = "incomplete"`

      - `type ResponseInputItemAdditionalTools struct{…}`

        - `Role Developer`

          The role that provided the additional tools. Only `developer` is supported.

          - `const DeveloperDeveloper Developer = "developer"`

        - `Tools []ToolUnion`

          A list of additional tools made available at this item.

          - `type FunctionTool struct{…}`

            Defines a function in your own code the model can choose to call. Learn more about [function calling](/api/docs/guides/function-calling).

          - `type FileSearchTool struct{…}`

            A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](/api/docs/guides/tools-file-search).

          - `type ComputerTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).

          - `type ComputerUsePreviewTool struct{…}`

            A tool that controls a virtual computer. Learn more about the [computer tool](/api/docs/guides/tools-computer-use).

          - `type WebSearchTool struct{…}`

            Search the Internet for sources related to the prompt. Learn more about the
            [web search tool](/api/docs/guides/tools-web-search).

          - `type ToolMcp struct{…}`

            Give the model access to additional tools via remote Model Context Protocol
            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-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).

              `minItems: 1`

              - `const ToolMcpAllowedCallerDirect ToolMcpAllowedCaller = "direct"`

              - `const ToolMcpAllowedCallerProgrammatic ToolMcpAllowedCaller = "programmatic"`

            - `AllowedTools ToolMcpAllowedToolsUnion`

              List of allowed tool names or a filter object.

              - `type ToolMcpAllowedToolsMcpAllowedTools []string`

                A string array of allowed tool names

              - `type ToolMcpAllowedToolsMcpToolFilter 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](/api/docs/guides/tools-connectors-mcp#connectors).

              This field is deprecated for models released after September 1, 2026.
              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to
              connect through a Secure MCP Tunnel.

              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 ToolMcpConnectorIDConnectorDropbox ToolMcpConnectorID = "connector_dropbox"`

              - `const ToolMcpConnectorIDConnectorGmail ToolMcpConnectorID = "connector_gmail"`

              - `const ToolMcpConnectorIDConnectorGooglecalendar ToolMcpConnectorID = "connector_googlecalendar"`

              - `const ToolMcpConnectorIDConnectorGoogledrive ToolMcpConnectorID = "connector_googledrive"`

              - `const ToolMcpConnectorIDConnectorMicrosoftteams ToolMcpConnectorID = "connector_microsoftteams"`

              - `const ToolMcpConnectorIDConnectorOutlookcalendar ToolMcpConnectorID = "connector_outlookcalendar"`

              - `const ToolMcpConnectorIDConnectorOutlookemail ToolMcpConnectorID = "connector_outlookemail"`

              - `const ToolMcpConnectorIDConnectorSharepoint ToolMcpConnectorID = "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 ToolMcpRequireApprovalUnion`

              Specify which of the MCP server's tools require approval.

              - `type ToolMcpRequireApprovalMcpToolApprovalFilter 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 ToolMcpRequireApprovalMcpToolApprovalFilterAlways`

                  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 ToolMcpRequireApprovalMcpToolApprovalFilterNever`

                  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 ToolMcpRequireApprovalMcpToolApprovalSetting 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 ToolMcpRequireApprovalMcpToolApprovalSettingAlways ToolMcpRequireApprovalMcpToolApprovalSetting = "always"`

                - `const ToolMcpRequireApprovalMcpToolApprovalSettingNever ToolMcpRequireApprovalMcpToolApprovalSetting = "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.

              `format: uri`

            - `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 ToolCodeInterpreter struct{…}`

            A tool that runs Python code to help generate a response to a prompt.

            - `Container ToolCodeInterpreterContainerUnion`

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

                  `maxItems: 50`

                - `MemoryLimit string`

                  The memory limit for the code interpreter container.

                  - `const ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit1g ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "1g"`

                  - `const ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit4g ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "4g"`

                  - `const ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit16g ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "16g"`

                  - `const ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit64g ToolCodeInterpreterContainerCodeInterpreterToolAutoMemoryLimit = "64g"`

                - `NetworkPolicy ToolCodeInterpreterContainerCodeInterpreterToolAutoNetworkPolicyUnion`

                  Network access policy for the container.

                  - `type ContainerNetworkPolicyDisabled struct{…}`

                  - `type ContainerNetworkPolicyAllowlist struct{…}`

            - `Type CodeInterpreter`

              The type of the code interpreter tool. Always `code_interpreter`.

              - `const CodeInterpreterCodeInterpreter CodeInterpreter = "code_interpreter"`

            - `AllowedCallers []string`

              The tool invocation context(s).

              `minItems: 1`

              - `const ToolCodeInterpreterAllowedCallerDirect ToolCodeInterpreterAllowedCaller = "direct"`

              - `const ToolCodeInterpreterAllowedCallerProgrammatic ToolCodeInterpreterAllowedCaller = "programmatic"`

          - `type ToolProgrammaticToolCalling struct{…}`

            - `Type ProgrammaticToolCalling`

              The type of the tool. Always `programmatic_tool_calling`.

              - `const ProgrammaticToolCallingProgrammaticToolCalling ProgrammaticToolCalling = "programmatic_tool_calling"`

          - `type ToolImageGeneration 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 ToolImageGenerationActionGenerate ToolImageGenerationAction = "generate"`

              - `const ToolImageGenerationActionEdit ToolImageGenerationAction = "edit"`

              - `const ToolImageGenerationActionAuto ToolImageGenerationAction = "auto"`

            - `Background string`

              Allows to set transparency for the background of the generated image(s). 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.5-sunburst` and `gpt-image-2.5-flare`, including their
              `2026-09-08` snapshots, support `opaque` and `transparent` backgrounds.
              Transparent backgrounds are available for supported GPT Image models. For
              `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in preview. When
              using `transparent`, set the output format to `png` or `webp`.

              - `const ToolImageGenerationBackgroundTransparent ToolImageGenerationBackground = "transparent"`

              - `const ToolImageGenerationBackgroundOpaque ToolImageGenerationBackground = "opaque"`

              - `const ToolImageGenerationBackgroundAuto ToolImageGenerationBackground = "auto"`

            - `InputFidelity string`

              Control how much effort the model will exert to match the style and features, especially facial features, of input images. Supports `high` and `low` on `gpt-image-1.5`; `gpt-image-1-mini` supports only `low`. For `gpt-image-2`, omit this parameter. Defaults to `low` on supported models.

              - `const ToolImageGenerationInputFidelityHigh ToolImageGenerationInputFidelity = "high"`

              - `const ToolImageGenerationInputFidelityLow ToolImageGenerationInputFidelity = "low"`

            - `InputImageMask ToolImageGenerationInputImageMask`

              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. One of `gpt-image-1-mini`,
              `gpt-image-1.5`, `gpt-image-2`,
              `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
              `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
              `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:
              `gpt-image-2`.

              `gpt-image-1` was shut down on October 23, 2026. Use
              `gpt-image-2.5-sunburst` or `gpt-image-2.5-flare` instead.

              - `string`

              - `string`

                - `const ToolImageGenerationModelGPTImage1 ToolImageGenerationModel = "gpt-image-1"`

                - `const ToolImageGenerationModelGPTImage1Mini ToolImageGenerationModel = "gpt-image-1-mini"`

                - `const ToolImageGenerationModelGPTImage2 ToolImageGenerationModel = "gpt-image-2"`

                - `const ToolImageGenerationModelGPTImage2_2026_04_21 ToolImageGenerationModel = "gpt-image-2-2026-04-21"`

                - `const ToolImageGenerationModelGPTImage2_5Sunburst ToolImageGenerationModel = "gpt-image-2.5-sunburst"`

                - `const ToolImageGenerationModelGPTImage2_5Sunburst2026_09_08 ToolImageGenerationModel = "gpt-image-2.5-sunburst-2026-09-08"`

                - `const ToolImageGenerationModelGPTImage2_5Flare ToolImageGenerationModel = "gpt-image-2.5-flare"`

                - `const ToolImageGenerationModelGPTImage2_5Flare2026_09_08 ToolImageGenerationModel = "gpt-image-2.5-flare-2026-09-08"`

                - `const ToolImageGenerationModelGPTImage1_5 ToolImageGenerationModel = "gpt-image-1.5"`

                - `const ToolImageGenerationModelChatgptImageLatest ToolImageGenerationModel = "chatgpt-image-latest"`

            - `Moderation string`

              Moderation level for the generated image. Default: `auto`.

              - `const ToolImageGenerationModerationAuto ToolImageGenerationModeration = "auto"`

              - `const ToolImageGenerationModerationLow ToolImageGenerationModeration = "low"`

            - `OutputCompression int64`

              Compression level for the output image. Default: 100.

              `minimum: 0`, `maximum: 100`

            - `OutputFormat string`

              The output format of the generated image. One of `png`, `webp`, or
              `jpeg`. Default: `png`.

              - `const ToolImageGenerationOutputFormatPNG ToolImageGenerationOutputFormat = "png"`

              - `const ToolImageGenerationOutputFormatWebP ToolImageGenerationOutputFormat = "webp"`

              - `const ToolImageGenerationOutputFormatJPEG ToolImageGenerationOutputFormat = "jpeg"`

            - `PartialImages int64`

              Number of partial images to generate in streaming mode, from 0 (default value) to 3.

              `minimum: 0`, `maximum: 3`

            - `Quality string`

              The quality of the generated image. The GPT image models support `low`,
              `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
              including their `2026-09-08` snapshots, also support `xhigh` and `max`.
              Default: `auto`.

              - `const ToolImageGenerationQualityLow ToolImageGenerationQuality = "low"`

              - `const ToolImageGenerationQualityMedium ToolImageGenerationQuality = "medium"`

              - `const ToolImageGenerationQualityHigh ToolImageGenerationQuality = "high"`

              - `const ToolImageGenerationQualityXhigh ToolImageGenerationQuality = "xhigh"`

              - `const ToolImageGenerationQualityMax ToolImageGenerationQuality = "max"`

              - `const ToolImageGenerationQualityAuto ToolImageGenerationQuality = "auto"`

            - `Size string`

              The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, 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.

              - `string`

              - `string`

                - `const ToolImageGenerationSize1024x1024 ToolImageGenerationSize = "1024x1024"`

                - `const ToolImageGenerationSize1024x1536 ToolImageGenerationSize = "1024x1536"`

                - `const ToolImageGenerationSize1536x1024 ToolImageGenerationSize = "1536x1024"`

                - `const ToolImageGenerationSizeAuto ToolImageGenerationSize = "auto"`

          - `type ToolLocalShell 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 FunctionShellTool struct{…}`

            A tool that allows the model to execute shell commands.

          - `type CustomTool struct{…}`

            A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)

          - `type NamespaceTool 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`).

              `minLength: 1`

            - `Tools []NamespaceToolToolUnion`

              The function/custom tools available inside this namespace.

              `minItems: 1`

              - `type NamespaceToolToolFunction struct{…}`

                - `Name string`

                  `minLength: 1`, `maxLength: 128`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

                - `AllowedCallers []string`

                  The tool invocation context(s).

                  `minItems: 1`

                  - `const NamespaceToolToolFunctionAllowedCallerDirect NamespaceToolToolFunctionAllowedCaller = "direct"`

                  - `const NamespaceToolToolFunctionAllowedCallerProgrammatic NamespaceToolToolFunctionAllowedCaller = "programmatic"`

                - `Async bool`

                  Whether the tool response can be returned asynchronously versus immediately returned on next response creation.

                - `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 CustomTool struct{…}`

                A custom tool that processes input using a specified format. Learn more about   [custom tools](/api/docs/guides/function-calling#custom-tools)

            - `Type Namespace`

              The type of the tool. Always `namespace`.

              - `const NamespaceNamespace Namespace = "namespace"`

          - `type ToolSearchTool struct{…}`

            Hosted or BYOT tool search configuration for deferred tools.

          - `type WebSearchPreviewTool struct{…}`

            This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](/api/docs/guides/tools-web-search).

          - `type ApplyPatchTool 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.

      - `type ResponseConfigurationUpdateItemParamResp struct{…}`

        An update to the conversation's response configuration. Supply reasoning,
        text, or both. Each setting stays in effect until a later update replaces it.

        - `Type ConfigurationUpdate`

          The item type. Always `configuration_update`.

          - `const ConfigurationUpdateConfigurationUpdate ConfigurationUpdate = "configuration_update"`

        - `ID string`

          The unique ID of the configuration update item.

        - `Reasoning ResponseConfigurationUpdateItemParamReasoningResp`

          Updates to reasoning configuration. Only effort is supported.

          - `Effort ReasoningEffort`

            The reasoning effort to use for subsequent responses until another
            configuration update replaces it.

            - `const ReasoningEffortNone ReasoningEffort = "none"`

            - `const ReasoningEffortMinimal ReasoningEffort = "minimal"`

            - `const ReasoningEffortLow ReasoningEffort = "low"`

            - `const ReasoningEffortMedium ReasoningEffort = "medium"`

            - `const ReasoningEffortHigh ReasoningEffort = "high"`

            - `const ReasoningEffortXhigh ReasoningEffort = "xhigh"`

            - `const ReasoningEffortMax ReasoningEffort = "max"`

        - `Text ResponseConfigurationUpdateItemParamTextResp`

          The text output configuration for subsequent responses.

          - `Format ResponseConfigurationUpdateItemParamTextFormatUnionResp`

            Use a JSON schema for structured output or text to return to plain text.

            - `type ResponseFormatText struct{…}`

              Default response format. Used to generate text responses.

              - `Type Text`

                The type of response format being defined. Always `text`.

                - `const TextText Text = "text"`

            - `type ResponseFormatTextJSONSchemaConfig struct{…}`

              JSON Schema response format. Used to generate structured JSON responses.
              Learn more about [Structured Outputs](/api/docs/guides/structured-outputs).

              - `Name string`

                The name of the response format. Must be a-z, A-Z, 0-9, or contain
                underscores and dashes, with a maximum length of 64.

              - `Schema map[string, any]`

                The schema for the response format, described as a JSON Schema object.
                Learn how to build JSON schemas [here](https://json-schema.org/).

              - `Type JSONSchema`

                The type of response format being defined. Always `json_schema`.

                - `const JSONSchemaJSONSchema JSONSchema = "json_schema"`

              - `Description string`

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

              - `Strict bool`

                Whether to enable strict schema adherence when generating the output.
                If set to true, the model will always follow the exact schema defined
                in the `schema` field. Only a subset of JSON Schema is supported when
                `strict` is `true`. To learn more, read the [Structured Outputs
                guide](/api/docs/guides/structured-outputs).

      - `type ResponseReasoningItem 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](/api/docs/guides/conversation-state).

        - `ID string`

          The unique identifier of the reasoning content.

        - `Summary []ResponseReasoningItemSummary`

          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"`

        - `Content []ResponseReasoningItemContent`

          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. This is populated by default
          for reasoning items returned by `POST /v1/responses` and WebSocket
          `response.create` requests.

          When streaming, use the completed reasoning item and its
          `encrypted_content` from the `response.output_item.done` event in
          subsequent requests. The `encrypted_content` in
          `response.output_item.added` may be incomplete. This is especially
          important when `store` is `false` or when using Zero Data Retention.

        - `Status ResponseReasoningItemStatus`

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

          - `const ResponseReasoningItemStatusInProgress ResponseReasoningItemStatus = "in_progress"`

          - `const ResponseReasoningItemStatusCompleted ResponseReasoningItemStatus = "completed"`

          - `const ResponseReasoningItemStatusIncomplete ResponseReasoningItemStatus = "incomplete"`

      - `type ResponseCompactionItemParamResp struct{…}`

        A compaction item generated by the [`v1/responses/compact` API](/api/reference/resources/responses/methods/compact).

        - `EncryptedContent string`

          The encrypted content of the compaction summary.

          `maxLength: 104857600`

        - `Type Compaction`

          The type of the item. Always `compaction`.

          - `const CompactionCompaction Compaction = "compaction"`

        - `ID string`

          The ID of the compaction item.

      - `type ResponseInputItemImageGenerationCall 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 ResponseInputItemImageGenerationCallStatusInProgress ResponseInputItemImageGenerationCallStatus = "in_progress"`

          - `const ResponseInputItemImageGenerationCallStatusCompleted ResponseInputItemImageGenerationCallStatus = "completed"`

          - `const ResponseInputItemImageGenerationCallStatusGenerating ResponseInputItemImageGenerationCallStatus = "generating"`

          - `const ResponseInputItemImageGenerationCallStatusFailed ResponseInputItemImageGenerationCallStatus = "failed"`

        - `Type ImageGenerationCall`

          The type of the image generation call. Always `image_generation_call`.

          - `const ImageGenerationCallImageGenerationCall ImageGenerationCall = "image_generation_call"`

        - `Action string`

          The action used for image generation.

          - `const ResponseInputItemImageGenerationCallActionGenerate ResponseInputItemImageGenerationCallAction = "generate"`

          - `const ResponseInputItemImageGenerationCallActionEdit ResponseInputItemImageGenerationCallAction = "edit"`

          - `const ResponseInputItemImageGenerationCallActionAuto ResponseInputItemImageGenerationCallAction = "auto"`

        - `Background string`

          The background setting used for generation.

          - `const ResponseInputItemImageGenerationCallBackgroundTransparent ResponseInputItemImageGenerationCallBackground = "transparent"`

          - `const ResponseInputItemImageGenerationCallBackgroundOpaque ResponseInputItemImageGenerationCallBackground = "opaque"`

          - `const ResponseInputItemImageGenerationCallBackgroundAuto ResponseInputItemImageGenerationCallBackground = "auto"`

        - `Error ResponseInputItemImageGenerationCallError`

          Details of a moderation failure, when available.

          - `Code string`

            The error code.

          - `Message string`

            A description of the error.

          - `Param string`

            The related request parameter.

          - `Type string`

            The error type.

          - `ModerationDetails ResponseInputItemImageGenerationCallErrorModerationDetails`

            Public details for a `moderation_blocked` error, when available.

            - `Categories []string`

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

            - `ModerationStage string`

              The stage where moderation blocked the image generation call.

              - `const ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStageInput ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStage = "input"`

              - `const ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStageOutput ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStage = "output"`

              - `const ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStageUnknown ResponseInputItemImageGenerationCallErrorModerationDetailsModerationStage = "unknown"`

        - `OutputFormat string`

          The output format used for generation.

          - `const ResponseInputItemImageGenerationCallOutputFormatPNG ResponseInputItemImageGenerationCallOutputFormat = "png"`

          - `const ResponseInputItemImageGenerationCallOutputFormatWebP ResponseInputItemImageGenerationCallOutputFormat = "webp"`

          - `const ResponseInputItemImageGenerationCallOutputFormatJPEG ResponseInputItemImageGenerationCallOutputFormat = "jpeg"`

        - `Quality string`

          The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.

          - `const ResponseInputItemImageGenerationCallQualityLow ResponseInputItemImageGenerationCallQuality = "low"`

          - `const ResponseInputItemImageGenerationCallQualityMedium ResponseInputItemImageGenerationCallQuality = "medium"`

          - `const ResponseInputItemImageGenerationCallQualityHigh ResponseInputItemImageGenerationCallQuality = "high"`

          - `const ResponseInputItemImageGenerationCallQualityXhigh ResponseInputItemImageGenerationCallQuality = "xhigh"`

          - `const ResponseInputItemImageGenerationCallQualityMax ResponseInputItemImageGenerationCallQuality = "max"`

          - `const ResponseInputItemImageGenerationCallQualityAuto ResponseInputItemImageGenerationCallQuality = "auto"`

        - `RevisedPrompt string`

          The prompt that was used after any model prompt rewriting.

        - `Size string`

          The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.

          - `string`

          - `string`

            - `const ResponseInputItemImageGenerationCallSize1024x1024 ResponseInputItemImageGenerationCallSize = "1024x1024"`

            - `const ResponseInputItemImageGenerationCallSize1024x1536 ResponseInputItemImageGenerationCallSize = "1024x1536"`

            - `const ResponseInputItemImageGenerationCallSize1536x1024 ResponseInputItemImageGenerationCallSize = "1536x1024"`

      - `type ResponseCodeInterpreterToolCall 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 []ResponseCodeInterpreterToolCallOutputUnion`

          The outputs generated by the code interpreter, such as logs or images.
          Can be null if no outputs are available.

          - `type ResponseCodeInterpreterToolCallOutputLogs 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 ResponseCodeInterpreterToolCallOutputImage 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.

              `format: uri`

        - `Status ResponseCodeInterpreterToolCallStatus`

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

          - `const ResponseCodeInterpreterToolCallStatusInProgress ResponseCodeInterpreterToolCallStatus = "in_progress"`

          - `const ResponseCodeInterpreterToolCallStatusCompleted ResponseCodeInterpreterToolCallStatus = "completed"`

          - `const ResponseCodeInterpreterToolCallStatusIncomplete ResponseCodeInterpreterToolCallStatus = "incomplete"`

          - `const ResponseCodeInterpreterToolCallStatusInterpreting ResponseCodeInterpreterToolCallStatus = "interpreting"`

          - `const ResponseCodeInterpreterToolCallStatusFailed ResponseCodeInterpreterToolCallStatus = "failed"`

        - `Type CodeInterpreterCall`

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

          - `const CodeInterpreterCallCodeInterpreterCall CodeInterpreterCall = "code_interpreter_call"`

      - `type ResponseInputItemLocalShellCall struct{…}`

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

        - `ID string`

          The unique ID of the local shell call.

        - `Action ResponseInputItemLocalShellCallAction`

          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 ResponseInputItemLocalShellCallStatusInProgress ResponseInputItemLocalShellCallStatus = "in_progress"`

          - `const ResponseInputItemLocalShellCallStatusCompleted ResponseInputItemLocalShellCallStatus = "completed"`

          - `const ResponseInputItemLocalShellCallStatusIncomplete ResponseInputItemLocalShellCallStatus = "incomplete"`

        - `Type LocalShellCall`

          The type of the local shell call. Always `local_shell_call`.

          - `const LocalShellCallLocalShellCall LocalShellCall = "local_shell_call"`

      - `type ResponseInputItemLocalShellCallOutput 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"`

        - `Status string`

          The status of the item. One of `in_progress`, `completed`, or `incomplete`.

          - `const ResponseInputItemLocalShellCallOutputStatusInProgress ResponseInputItemLocalShellCallOutputStatus = "in_progress"`

          - `const ResponseInputItemLocalShellCallOutputStatusCompleted ResponseInputItemLocalShellCallOutputStatus = "completed"`

          - `const ResponseInputItemLocalShellCallOutputStatusIncomplete ResponseInputItemLocalShellCallOutputStatus = "incomplete"`

      - `type ResponseInputItemShellCall struct{…}`

        A tool representing a request to execute one or more shell commands.

        - `Action ResponseInputItemShellCallAction`

          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.

          `minLength: 1`, `maxLength: 64`

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

        - `Caller ResponseInputItemShellCallCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseInputItemShellCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseInputItemShellCallCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

        - `Environment ResponseInputItemShellCallEnvironmentUnion`

          The environment to execute the shell commands in.

          - `type LocalEnvironment struct{…}`

          - `type ContainerReference struct{…}`

        - `Status string`

          The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.

          - `const ResponseInputItemShellCallStatusInProgress ResponseInputItemShellCallStatus = "in_progress"`

          - `const ResponseInputItemShellCallStatusCompleted ResponseInputItemShellCallStatus = "completed"`

          - `const ResponseInputItemShellCallStatusIncomplete ResponseInputItemShellCallStatus = "incomplete"`

      - `type ResponseInputItemShellCallOutput 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.

          `minLength: 1`, `maxLength: 64`

        - `Output []ResponseFunctionShellCallOutputContent`

          Captured chunks of stdout and stderr output, along with their associated outcomes.

          - `Outcome ResponseFunctionShellCallOutputContentOutcomeUnion`

            The exit or timeout outcome associated with this shell call.

            - `type ResponseFunctionShellCallOutputContentOutcomeTimeout struct{…}`

              Indicates that the shell call exceeded its configured time limit.

              - `Type Timeout`

                The outcome type. Always `timeout`.

                - `const TimeoutTimeout Timeout = "timeout"`

            - `type ResponseFunctionShellCallOutputContentOutcomeExit 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.

            `maxLength: 10485760`

          - `Stdout string`

            Captured stdout output for the shell call.

            `maxLength: 10485760`

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

        - `Caller ResponseInputItemShellCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseInputItemShellCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseInputItemShellCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

            - `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 ResponseInputItemShellCallOutputStatusInProgress ResponseInputItemShellCallOutputStatus = "in_progress"`

          - `const ResponseInputItemShellCallOutputStatusCompleted ResponseInputItemShellCallOutputStatus = "completed"`

          - `const ResponseInputItemShellCallOutputStatusIncomplete ResponseInputItemShellCallOutputStatus = "incomplete"`

      - `type ResponseInputItemApplyPatchCall 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.

          `minLength: 1`, `maxLength: 64`

        - `Operation ResponseInputItemApplyPatchCallOperationUnion`

          The specific create, delete, or update instruction for the apply_patch tool call.

          - `type ResponseInputItemApplyPatchCallOperationCreateFile struct{…}`

            Instruction for creating a new file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply when creating the file.

              `maxLength: 10485760`

            - `Path string`

              Path of the file to create relative to the workspace root.

              `minLength: 1`

            - `Type CreateFile`

              The operation type. Always `create_file`.

              - `const CreateFileCreateFile CreateFile = "create_file"`

          - `type ResponseInputItemApplyPatchCallOperationDeleteFile 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.

              `minLength: 1`

            - `Type DeleteFile`

              The operation type. Always `delete_file`.

              - `const DeleteFileDeleteFile DeleteFile = "delete_file"`

          - `type ResponseInputItemApplyPatchCallOperationUpdateFile struct{…}`

            Instruction for updating an existing file via the apply_patch tool.

            - `Diff string`

              Unified diff content to apply to the existing file.

              `maxLength: 10485760`

            - `Path string`

              Path of the file to update relative to the workspace root.

              `minLength: 1`

            - `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 ResponseInputItemApplyPatchCallStatusInProgress ResponseInputItemApplyPatchCallStatus = "in_progress"`

          - `const ResponseInputItemApplyPatchCallStatusCompleted ResponseInputItemApplyPatchCallStatus = "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.

        - `Caller ResponseInputItemApplyPatchCallCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseInputItemApplyPatchCallCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseInputItemApplyPatchCallCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type ResponseInputItemApplyPatchCallOutput 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.

          `minLength: 1`, `maxLength: 64`

        - `Status string`

          The status of the apply patch tool call output. One of `completed` or `failed`.

          - `const ResponseInputItemApplyPatchCallOutputStatusCompleted ResponseInputItemApplyPatchCallOutputStatus = "completed"`

          - `const ResponseInputItemApplyPatchCallOutputStatusFailed ResponseInputItemApplyPatchCallOutputStatus = "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.

        - `Caller ResponseInputItemApplyPatchCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseInputItemApplyPatchCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseInputItemApplyPatchCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

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

          `maxLength: 10485760`

      - `type ResponseInputItemMcpListTools 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 []ResponseInputItemMcpListToolsTool`

          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"`

        - `Error string`

          Error message if the server could not list tools.

      - `type ResponseInputItemMcpApprovalRequest 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"`

      - `type ResponseInputItemMcpApprovalResponse 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

        - `Reason string`

          Optional reason for the decision.

      - `type ResponseInputItemMcpCall 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"`

        - `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 McpToolCallErrorUnion`

          The error from the tool call, if any.

          - `type McpToolCallErrorMcpProtocolError struct{…}`

            - `Code int64`

            - `Message string`

            - `Type McpProtocolError`

              - `const McpProtocolErrorMcpProtocolError McpProtocolError = "mcp_protocol_error"`

          - `type McpToolCallErrorMcpToolExecutionError struct{…}`

            - `Content any`

            - `Type McpToolExecutionError`

              - `const McpToolExecutionErrorMcpToolExecutionError McpToolExecutionError = "mcp_tool_execution_error"`

          - `type McpToolCallErrorHTTPError struct{…}`

            - `Code int64`

            - `Message string`

            - `Type HTTPError`

              - `const HTTPErrorHTTPError HTTPError = "http_error"`

        - `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 ResponseInputItemMcpCallStatusInProgress ResponseInputItemMcpCallStatus = "in_progress"`

          - `const ResponseInputItemMcpCallStatusCompleted ResponseInputItemMcpCallStatus = "completed"`

          - `const ResponseInputItemMcpCallStatusIncomplete ResponseInputItemMcpCallStatus = "incomplete"`

          - `const ResponseInputItemMcpCallStatusCalling ResponseInputItemMcpCallStatus = "calling"`

          - `const ResponseInputItemMcpCallStatusFailed ResponseInputItemMcpCallStatus = "failed"`

      - `type ResponseCustomToolCallOutput 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 ResponseCustomToolCallOutputOutputUnion`

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

          - `string`

          - `type ResponseCustomToolCallOutputOutputOutputContentList []ResponseCustomToolCallOutputOutputOutputContentListItemUnion`

            Text, image, or file output of the custom tool call.

            - `type ResponseInputText struct{…}`

              A text input to the model.

            - `type ResponseInputImage struct{…}`

              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).

            - `type ResponseInputFile 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.

        - `Caller ResponseCustomToolCallOutputCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseCustomToolCallOutputCallerDirect struct{…}`

            - `Type Direct`

              The caller type. Always `direct`.

              - `const DirectDirect Direct = "direct"`

          - `type ResponseCustomToolCallOutputCallerProgram struct{…}`

            - `CallerID string`

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

              `minLength: 1`, `maxLength: 64`

            - `Type Program`

              The caller type. Always `program`.

              - `const ProgramProgram Program = "program"`

      - `type ResponseCustomToolCall 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.

        - `Async bool`

          Whether the custom tool call runs asynchronously.

        - `Caller ResponseCustomToolCallCallerUnion`

          The execution context that produced this tool call.

          - `type ResponseCustomToolCallCallerDirect struct{…}`

            - `Type Direct`

              - `const DirectDirect Direct = "direct"`

          - `type ResponseCustomToolCallCallerProgram 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 ResponseInputItemCompactionTrigger 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"`

        - `ID string`

          The unique ID of this compaction trigger.

      - `type ResponseInputItemItemReference struct{…}`

        An internal identifier for an item to reference.

        - `ID string`

          The ID of the item to reference.

        - `Type string`

          The type of item to reference. Always `item_reference`.

          - `const ResponseInputItemItemReferenceTypeItemReference ResponseInputItemItemReferenceType = "item_reference"`

      - `type ResponseInputItemProgram struct{…}`

        - `ID string`

          The unique ID of this program item.

        - `CallID string`

          The stable call ID of the program item.

          `minLength: 1`, `maxLength: 64`

        - `Code string`

          The JavaScript source executed by programmatic tool calling.

          `maxLength: 10485760`

        - `Fingerprint string`

          Opaque program replay fingerprint that must be round-tripped.

          `maxLength: 10485760`

        - `Type Program`

          The item type. Always `program`.

          - `const ProgramProgram Program = "program"`

      - `type ResponseInputItemProgramOutput struct{…}`

        - `ID string`

          The unique ID of this program output item.

        - `CallID string`

          The call ID of the program item.

          `minLength: 1`, `maxLength: 64`

        - `Result string`

          The result produced by the program item.

          `maxLength: 10485760`

        - `Status string`

          The terminal status of the program output.

          - `const ResponseInputItemProgramOutputStatusCompleted ResponseInputItemProgramOutputStatus = "completed"`

          - `const ResponseInputItemProgramOutputStatusIncomplete ResponseInputItemProgramOutputStatus = "incomplete"`

        - `Type ProgramOutput`

          The item type. Always `program_output`.

          - `const ProgramOutputProgramOutput ProgramOutput = "program_output"`

    - `Type ResponseItemCreate`

      The Live client event type. Always `response.item.create`.

      - `const ResponseItemCreateResponseItemCreate ResponseItemCreate = "response.item.create"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type ResponseCreateEvent struct{…}`

    Request a response from the Live session’s Responses backend, or continue a delegated response waiting for tool results. Requires Responses delegation.

    - `Type ResponseCreate`

      The Live client event type. Always `response.create`.

      - `const ResponseCreateResponseCreate ResponseCreate = "response.create"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

  - `type SessionCloseEvent struct{…}`

    Request that the Live session close. The terminal `session.closed` event contains the close reason and final usage.

    - `Type SessionClose`

      The Live client event type. Always `session.close`.

      - `const SessionCloseSessionClose SessionClose = "session.close"`

    - `EventID string`

      Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.

      `maxLength: 512`

### Fork Server Event

- `type ForkServerEventUnion interface{…}`

  Server events for Live. Response lifecycle events are wrapped inside response.event; dispatch the nested event by its full type and tolerate new response event types. Follow the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting) when designing the conversation and delegation policy.

  - `type SessionStartedEvent struct{…}`

    Returned when a Live session has started. Contains the resolved session configuration, including server defaults.

    - `EventID string`

      The unique ID of the Live server event.

    - `Session SessionResource`

      The resolved Live session configuration and server-assigned session metadata.

      - `ID string`

        The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download.

      - `ExpiresAt int64`

        The Unix timestamp, in seconds, at which the Live session expires.

      - `Model SessionResourceModel`

        The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.

        - `string`

        - `SessionResourceModel`

          - `const SessionResourceModelGPTLive1 SessionResourceModel = "gpt-live-1"`

      - `Status Active`

        The status of the session snapshot. Always `active`, including the final snapshot in session.closed; use the event type to determine that the session has closed.

        - `const ActiveActive Active = "active"`

      - `Audio SessionResourceAudio`

        Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.

        - `Format AudioFormatUnion`

          Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.

          - `AudioFormatAudioPCM`

            - `Rate int64`

              Audio sample rate in hertz. Live WebSocket PCM audio supports 16000 or 24000 Hz.

              `minimum: 16000`, `maximum: 24000`

              - `const AudioFormatAudioPCMRate16000 AudioFormatAudioPCMRate = 16000`

              - `const AudioFormatAudioPCMRate24000 AudioFormatAudioPCMRate = 24000`

            - `Type AudioPCM`

              The audio encoding. Always `audio/pcm`.

              - `const AudioPCMAudioPCM AudioPCM = "audio/pcm"`

          - `AudioFormatAudioPCMU`

            - `Rate int64`

              Audio sample rate in hertz. G.711 audio uses 8000 Hz.

              `minimum: 8000`, `maximum: 8000`

            - `Type AudioPCMU`

              The audio encoding. Always `audio/pcmu`.

              - `const AudioPCMUAudioPCMU AudioPCMU = "audio/pcmu"`

          - `AudioFormatAudioPCMA`

            - `Rate int64`

              Audio sample rate in hertz. G.711 audio uses 8000 Hz.

              `minimum: 8000`, `maximum: 8000`

            - `Type AudioPCMA`

              The audio encoding. Always `audio/pcma`.

              - `const AudioPCMAAudioPCMA AudioPCMA = "audio/pcma"`

        - `Output SessionResourceAudioOutput`

          The voice used for speech generated by the Live model.

          - `Voice SessionResourceAudioOutputVoiceUnion`

            The voice used for Live speech, as a built-in voice name or a custom voice object containing its ID. Defaults to `marin` and cannot change after startup.

            - `string`

            - `type BuiltInVoice string`

              A built-in voice available for Live speech.

              - `const BuiltInVoiceAlloy BuiltInVoice = "alloy"`

              - `const BuiltInVoiceAsh BuiltInVoice = "ash"`

              - `const BuiltInVoiceBallad BuiltInVoice = "ballad"`

              - `const BuiltInVoiceBeacon BuiltInVoice = "beacon"`

              - `const BuiltInVoiceBossa BuiltInVoice = "bossa"`

              - `const BuiltInVoiceCedar BuiltInVoice = "cedar"`

              - `const BuiltInVoiceCinder BuiltInVoice = "cinder"`

              - `const BuiltInVoiceCoral BuiltInVoice = "coral"`

              - `const BuiltInVoiceDelta BuiltInVoice = "delta"`

              - `const BuiltInVoiceEcho BuiltInVoice = "echo"`

              - `const BuiltInVoiceGleam BuiltInVoice = "gleam"`

              - `const BuiltInVoiceMarin BuiltInVoice = "marin"`

              - `const BuiltInVoiceMeridian BuiltInVoice = "meridian"`

              - `const BuiltInVoiceQuartz BuiltInVoice = "quartz"`

              - `const BuiltInVoiceRipple BuiltInVoice = "ripple"`

              - `const BuiltInVoiceSage BuiltInVoice = "sage"`

              - `const BuiltInVoiceShida BuiltInVoice = "shida"`

              - `const BuiltInVoiceShimmer BuiltInVoice = "shimmer"`

              - `const BuiltInVoiceStone BuiltInVoice = "stone"`

              - `const BuiltInVoiceTempo BuiltInVoice = "tempo"`

              - `const BuiltInVoiceVerse BuiltInVoice = "verse"`

              - `const BuiltInVoiceVesper BuiltInVoice = "vesper"`

              - `const BuiltInVoiceWillow BuiltInVoice = "willow"`

            - `type CustomVoice struct{…}`

              - `ID string`

                `minLength: 1`, `maxLength: 128`

      - `Client ClientConfig`

        Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.

        - `DataChannel DataChannelConfig`

          Client and server event permissions for the WebRTC frontend data channel.

          - `AllowedClientEvents DataChannelConfigAllowedClientEventsUnion`

            Client event types that the frontend data channel may send. Use 'all' to allow every client event; an empty array allows none. Omission preserves the existing allow-all behavior.

            - `All`

              - `const AllAll All = "all"`

            - `[]string`

          - `AllowedServerEvents DataChannelConfigAllowedServerEventsUnion`

            Server events that may be sent to the frontend data channel. Use 'all' to allow every server event; an empty array allows none. Omission preserves the existing allow-all behavior. Responses events use an object with type 'response.event' and a response_event selector.

            - `All`

              - `const AllAll All = "all"`

            - `[]ServerEventSelector`

              - `Type string`

                The outer Live server event type. Use 'response.event' for Responses events.

                `minLength: 1`, `maxLength: 256`

              - `ResponseEvent string`

                The nested Responses event type. Required when type is 'response.event'; forbidden for other event types.

                `minLength: 1`, `maxLength: 256`

      - `Delegation SessionResourceDelegationUnion`

        Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` or `decisions` to delegate to the corresponding API.

        - `type ClientDelegation struct{…}`

          Delegate tasks to your application. The Live session emits delegation events that your backend handles.

          - `Type Client`

            The delegation owner. Always `client` for tasks handled by your application.

            - `const ClientClient Client = "client"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

        - `SessionResourceDelegationResponses`

          - `Responses ResponsesDelegationConfig`

            Backend model, prompt, and tools used when the Live session delegates a task to Responses.

            - `Model string`

              The model used for server-owned Responses delegations.

            - `Instructions string`

              Instructions for the delegated Responses model, separate from Live instructions. See [backend prompting](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt).

            - `MaxOutputTokens int64`

              Maximum number of output tokens for each delegated response.

              `minimum: 16`

            - `ParallelToolCalls bool`

              Whether the delegated Responses model may request multiple tool calls in a single response.

            - `Reasoning ResponsesDelegationConfigReasoning`

              Reasoning settings passed to each delegated Responses request.

              - `Effort string`

                How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.

                - `const ResponsesDelegationConfigReasoningEffortNone ResponsesDelegationConfigReasoningEffort = "none"`

                - `const ResponsesDelegationConfigReasoningEffortMinimal ResponsesDelegationConfigReasoningEffort = "minimal"`

                - `const ResponsesDelegationConfigReasoningEffortLow ResponsesDelegationConfigReasoningEffort = "low"`

                - `const ResponsesDelegationConfigReasoningEffortMedium ResponsesDelegationConfigReasoningEffort = "medium"`

                - `const ResponsesDelegationConfigReasoningEffortHigh ResponsesDelegationConfigReasoningEffort = "high"`

                - `const ResponsesDelegationConfigReasoningEffortXhigh ResponsesDelegationConfigReasoningEffort = "xhigh"`

              - `Summary string`

                The reasoning summary to request from the delegated Responses model, when supported.

                - `const ResponsesDelegationConfigReasoningSummaryConcise ResponsesDelegationConfigReasoningSummary = "concise"`

                - `const ResponsesDelegationConfigReasoningSummaryDetailed ResponsesDelegationConfigReasoningSummary = "detailed"`

                - `const ResponsesDelegationConfigReasoningSummaryAuto ResponsesDelegationConfigReasoningSummary = "auto"`

            - `ServiceTier ResponsesDelegationConfigServiceTier`

              Service tier for delegated Responses requests.

              - `const ResponsesDelegationConfigServiceTierAuto ResponsesDelegationConfigServiceTier = "auto"`

              - `const ResponsesDelegationConfigServiceTierDefault ResponsesDelegationConfigServiceTier = "default"`

              - `const ResponsesDelegationConfigServiceTierFastTierTempPilot ResponsesDelegationConfigServiceTier = "fast_tier_temp_pilot"`

              - `const ResponsesDelegationConfigServiceTierFlex ResponsesDelegationConfigServiceTier = "flex"`

              - `const ResponsesDelegationConfigServiceTierPriority ResponsesDelegationConfigServiceTier = "priority"`

              - `const ResponsesDelegationConfigServiceTierUltrafast ResponsesDelegationConfigServiceTier = "ultrafast"`

            - `Text ResponsesDelegationConfigText`

              Text generation settings passed to each delegated Responses request.

              - `Verbosity string`

                The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.

                - `const ResponsesDelegationConfigTextVerbosityLow ResponsesDelegationConfigTextVerbosity = "low"`

                - `const ResponsesDelegationConfigTextVerbosityMedium ResponsesDelegationConfigTextVerbosity = "medium"`

                - `const ResponsesDelegationConfigTextVerbosityHigh ResponsesDelegationConfigTextVerbosity = "high"`

            - `ToolChoice ResponsesDelegationConfigToolChoiceUnion`

              Controls which tool the Responses backend uses when handling a task delegated by the Live model.

              - `string`

                - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumAuto ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "auto"`

                - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumNone ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "none"`

                - `const ResponsesDelegationConfigToolChoiceLiveToolChoiceEnumRequired ResponsesDelegationConfigToolChoiceLiveToolChoiceEnum = "required"`

              - `ResponsesDelegationConfigToolChoiceLiveFunctionToolChoiceParam`

                - `Name string`

                  `minLength: 1`, `maxLength: 64`

                - `Type Function`

                  - `const FunctionFunction Function = "function"`

              - `ResponsesDelegationConfigToolChoiceLiveMcpToolChoiceParam`

                - `Name string`

                  `minLength: 1`, `maxLength: 64`

                - `ServerLabel string`

                  `minLength: 1`, `maxLength: 64`

                - `Type Mcp`

                  - `const McpMcp Mcp = "mcp"`

            - `Tools []ResponsesDelegationConfigToolUnion`

              Tools available to the Responses backend while it handles tasks delegated by the Live model.

              - `type FunctionTool struct{…}`

                A function tool available to the Responses backend when the Live model delegates a task.

                - `Name string`

                  The name the delegated Responses model uses when calling this function.

                - `Type Function`

                  The tool type. Always `function`.

                  - `const FunctionFunction Function = "function"`

                - `Description string`

                  What the function does and when the delegated Responses model should call it.

                - `Parameters map[string, any]`

                  A JSON Schema object describing the arguments accepted by the function.

                - `Strict bool`

                  Whether the delegated Responses model must follow the function’s parameter schema exactly.

              - `ResponsesDelegationConfigToolWebSearch`

                - `Type WebSearch`

                  The tool type. Always `web_search`.

                  - `const WebSearchWebSearch WebSearch = "web_search"`

          - `Type Responses`

            The delegation owner. Always `responses` for tasks handled by the Responses API.

            - `const ResponsesResponses Responses = "responses"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400 for Decisions sessions and 0 (request immediately) for other sessions. Omission in a session update preserves the current value. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

        - `SessionResourceDelegationDecisions`

          - `Decisions DecisionsDelegationConfig`

            - `Model string`

              `minLength: 1`

            - `Questions []DecisionsDelegationConfigQuestionUnion`

              Native Decision API questions evaluated together, in order.

              `minItems: 1`, `maxItems: 64`

              - `DecisionsDelegationConfigQuestionPredicate`

                - `Instructions DecisionsDelegationConfigQuestionPredicateInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                      - `Text string`

                        `minLength: 0`, `maxLength: 10485760`

                      - `Type InputText`

                        - `const InputTextInputText InputText = "input_text"`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                      - `ImageURL string`

                        A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL.

                        `minLength: 0`, `maxLength: 1073741824`

                      - `Type InputImage`

                        - `const InputImageInputImage InputImage = "input_image"`

                      - `Detail DecisionQuestionInputImageDetail`

                        The image detail level, using the selected model's image profile. Defaults to auto.

                        - `const DecisionQuestionInputImageDetailLow DecisionQuestionInputImageDetail = "low"`

                        - `const DecisionQuestionInputImageDetailHigh DecisionQuestionInputImageDetail = "high"`

                        - `const DecisionQuestionInputImageDetailAuto DecisionQuestionInputImageDetail = "auto"`

                        - `const DecisionQuestionInputImageDetailOriginal DecisionQuestionInputImageDetail = "original"`

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                      - `Data DecisionInputJSONDataUnion`

                        - `map[string, any]`

                        - `[]map[string, any]`

                      - `Type InputJSON`

                        - `const InputJSONInputJSON InputJSON = "input_json"`

                - `Type Predicate`

                  The type of the object. Always `predicate`.

                  - `const PredicatePredicate Predicate = "predicate"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

              - `DecisionsDelegationConfigQuestionChoice`

                - `Choices []DecisionsDelegationConfigQuestionChoiceChoice`

                  Provide between 2 and 255 choices. Each choice must be unique.

                  `minItems: 2`, `maxItems: 255`

                  - `Value DecisionsDelegationConfigQuestionChoiceChoiceValueUnion`

                    Choice values are typed: a string and a boolean with the same text are distinct.

                    - `string`

                    - `bool`

                  - `Description string`

                    `minLength: 0`, `maxLength: 1048576`

                - `Instructions DecisionsDelegationConfigQuestionChoiceInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                - `Type Choice`

                  The type of the object. Always `choice`.

                  - `const ChoiceChoice Choice = "choice"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

              - `DecisionsDelegationConfigQuestionScore`

                - `Instructions DecisionsDelegationConfigQuestionScoreInstructionsUnion`

                  - `string`

                  - `[]DecisionQuestionInputPartUnion`

                    - `type DecisionQuestionInputText struct{…}`

                    - `type DecisionQuestionInputImage struct{…}`

                      An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                    - `type DecisionInputJSON struct{…}`

                      A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

                - `Levels []DecisionsDelegationConfigQuestionScoreLevel`

                  `minItems: 2`, `maxItems: 10`

                  - `Label string`

                    `minLength: 0`, `maxLength: 1048576`

                  - `Description string`

                    `minLength: 0`, `maxLength: 1048576`

                - `Type Score`

                  The type of the object. Always `score`.

                  - `const ScoreScore Score = "score"`

                - `Name string`

                  `minLength: 0`, `maxLength: 1048576`

          - `Type Decisions`

            - `const DecisionsDecisions Decisions = "decisions"`

          - `AcknowledgementDelayMs int64`

            Milliseconds to wait before requesting an automatic spoken acknowledgement for a delegation. The model may still speak before this delay. Any commentary or thinking appended to the session cancels all pending acknowledgements, including those for other delegations. Defaults to 400. Updates apply to subsequent delegations.

            `minimum: 0`, `maximum: 800`

      - `Input []InitialItemUnion`

        Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and a configured rendered-token limit (8,192 by default).

        `maxItems: 128`

        - `InitialItemDeveloper`

          - `Content []InitialItemDeveloperContent`

            The message content. Supply exactly one text part for the initial Live conversation history.

            `minItems: 1`, `maxItems: 1`

            - `Text string`

              The message text to include in the Live session’s initial conversation history.

            - `Type string`

              The text content type. Always `input_text`.

              - `const InitialItemDeveloperContentTypeInputText InitialItemDeveloperContentType = "input_text"`

          - `Role Developer`

            The author of this history message. Always `developer`.

            - `const DeveloperDeveloper Developer = "developer"`

          - `ID string`

            An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

          - `Status string`

            The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

            - `const InitialItemDeveloperStatusIncomplete InitialItemDeveloperStatus = "incomplete"`

            - `const InitialItemDeveloperStatusCompleted InitialItemDeveloperStatus = "completed"`

          - `Type string`

            The history item type. Always `message`.

            - `const InitialItemDeveloperTypeMessage InitialItemDeveloperType = "message"`

        - `InitialItemUser`

          - `Content []InitialItemUserContent`

            The message content. Supply exactly one text part for the initial Live conversation history.

            `minItems: 1`, `maxItems: 1`

            - `Text string`

              The message text to include in the Live session’s initial conversation history.

            - `Type string`

              The text content type. Always `input_text`.

              - `const InitialItemUserContentTypeInputText InitialItemUserContentType = "input_text"`

          - `Role User`

            The author of this history message. Always `user`.

            - `const UserUser User = "user"`

          - `ID string`

            An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

          - `Status string`

            The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

            - `const InitialItemUserStatusIncomplete InitialItemUserStatus = "incomplete"`

            - `const InitialItemUserStatusCompleted InitialItemUserStatus = "completed"`

          - `Type string`

            The history item type. Always `message`.

            - `const InitialItemUserTypeMessage InitialItemUserType = "message"`

        - `InitialItemAssistant`

          - `Content []InitialItemAssistantContentUnion`

            The message content. Supply exactly one text part for the initial Live conversation history.

            `minItems: 1`, `maxItems: 1`

            - `InitialItemAssistantContentText`

              - `Text string`

                The message text to include in the Live session’s initial conversation history.

              - `Type string`

                The text content type. Always `text`.

                - `const InitialItemAssistantContentTextTypeText InitialItemAssistantContentTextType = "text"`

            - `InitialItemAssistantContentOutputText`

              - `Text string`

                The message text to include in the Live session’s initial conversation history.

              - `Type OutputText`

                The text content type. Always `output_text`.

                - `const OutputTextOutputText OutputText = "output_text"`

          - `Role Assistant`

            The author of this history message. Always `assistant`.

            - `const AssistantAssistant Assistant = "assistant"`

          - `ID string`

            An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.

          - `Status string`

            The supplied message’s status. Live uses its text as history and does not resume an incomplete message.

            - `const InitialItemAssistantStatusIncomplete InitialItemAssistantStatus = "incomplete"`

            - `const InitialItemAssistantStatusCompleted InitialItemAssistantStatus = "completed"`

          - `Type string`

            The history item type. Always `message`.

            - `const InitialItemAssistantTypeMessage InitialItemAssistantType = "message"`

      - `Instructions string`

        Frontend instructions for voice, conversation, interruptions, and when to delegate. Start with the [Live prompting guide](https://developers.openai.com/api/docs/guides/live-prompting); put business rules and tool workflows in a separate [backend prompt](https://developers.openai.com/api/docs/guides/live-delegation#start-with-your-existing-backend-prompt). Limited to 16,384 client-supplied tokens. Omitted or blank instructions use server defaults. Immutable after startup.

      - `Store bool`

        Whether to store the session for later forking and recording download. Defaults to false for new sessions.

      - `Triggers []DecisionTrigger`

        At most one Decisions trigger per transcript event type. Triggers run independently of delegation. On update, omit triggers to keep the current configuration, send a list to replace it, or send an empty list to disable triggers.

        `maxItems: 2`

        - `Decisions DecisionTriggerDecisions`

          Questions evaluated using the current transcript and the session's shared Decision items.

          - `Questions []DecisionTriggerDecisionsQuestionUnion`

            Native Decision API questions evaluated together, in order.

            `minItems: 1`, `maxItems: 64`

            - `DecisionTriggerDecisionsQuestionPredicate`

              - `Instructions DecisionTriggerDecisionsQuestionPredicateInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Type Predicate`

                The type of the object. Always `predicate`.

                - `const PredicatePredicate Predicate = "predicate"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

            - `DecisionTriggerDecisionsQuestionChoice`

              - `Choices []DecisionTriggerDecisionsQuestionChoiceChoice`

                Provide between 2 and 255 choices. Each choice must be unique.

                `minItems: 2`, `maxItems: 255`

                - `Value DecisionTriggerDecisionsQuestionChoiceChoiceValueUnion`

                  Choice values are typed: a string and a boolean with the same text are distinct.

                  - `string`

                  - `bool`

                - `Description string`

                  `minLength: 0`, `maxLength: 1048576`

              - `Instructions DecisionTriggerDecisionsQuestionChoiceInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Type Choice`

                The type of the object. Always `choice`.

                - `const ChoiceChoice Choice = "choice"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

            - `DecisionTriggerDecisionsQuestionScore`

              - `Instructions DecisionTriggerDecisionsQuestionScoreInstructionsUnion`

                - `string`

                - `[]DecisionQuestionInputPartUnion`

                  - `type DecisionQuestionInputText struct{…}`

                  - `type DecisionQuestionInputImage struct{…}`

                    An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.

                  - `type DecisionInputJSON struct{…}`

                    A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON.

              - `Levels []DecisionTriggerDecisionsQuestionScoreLevel`

                `minItems: 2`, `maxItems: 10`

                - `Label string`

                  `minLength: 0`, `maxLength: 1048576`

                - `Description string`

                  `minLength: 0`, `maxLength: 1048576`

              - `Type Score`

                The type of the object. Always `score`.

                - `const ScoreScore Score = "score"`

              - `Name string`

                `minLength: 0`, `maxLength: 1048576`

        - `EventType DecisionTriggerEventType`

          - `const DecisionTriggerEventTypeSessionInputTranscriptDelta DecisionTriggerEventType = "session.input_transcript.delta"`

          - `const DecisionTriggerEventTypeSessionOutputTranscriptDelta DecisionTriggerEventType = "session.output_transcript.delta"`

        - `Type Decisions`

          - `const DecisionsDecisions Decisions = "decisions"`

    - `Type SessionStarted`

      The event type, always `session.started`.

      - `const SessionStartedSessionStarted SessionStarted = "session.started"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type SessionUpdatedEvent struct{…}`

    Returned when a Live session update is accepted. Contains the resolved session configuration after the update.

    - `EventID string`

      The unique ID of the Live server event.

    - `Session SessionResource`

      The resolved Live session configuration and server-assigned session metadata.

    - `Type SessionUpdated`

      The event type, always `session.updated`.

      - `const SessionUpdatedSessionUpdated SessionUpdated = "session.updated"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type InputAudioMutedEvent struct{…}`

    Acknowledges a session.input_audio.mute command. An independent input mute sends silence to the model and preserves sideband audio reflection. Fixture playback does not emit this event.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type SessionInputAudioMuted`

      The event type, always `session.input_audio.muted`.

      - `const SessionInputAudioMutedSessionInputAudioMuted SessionInputAudioMuted = "session.input_audio.muted"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type InputAudioUnmutedEvent struct{…}`

    Acknowledges a session.input_audio.unmute command, removing the independent input mute. An active audio fixture still pauses inference until playback finishes. Fixture playback does not emit this event.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type SessionInputAudioUnmuted`

      The event type, always `session.input_audio.unmuted`.

      - `const SessionInputAudioUnmutedSessionInputAudioUnmuted SessionInputAudioUnmuted = "session.input_audio.unmuted"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type OutputAudioFixturePlayingEvent struct{…}`

    The existing playback path has accepted the validated audio fixture. This acknowledgment does not identify when the listener receives the first sample. The optional client_event_id echoes the play command.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type SessionOutputAudioFixturePlaying`

      - `const SessionOutputAudioFixturePlayingSessionOutputAudioFixturePlaying SessionOutputAudioFixturePlaying = "session.output_audio.fixture.playing"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type OutputAudioFixturePlayedEvent struct{…}`

    The complete audio fixture has drained from the server mixer and normal inference has resumed. Transport buffers may still contain audio; this event does not prove listener-side completion. The optional client_event_id echoes the play command. This event is not emitted for canceled or failed playback.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type SessionOutputAudioFixturePlayed`

      - `const SessionOutputAudioFixturePlayedSessionOutputAudioFixturePlayed SessionOutputAudioFixturePlayed = "session.output_audio.fixture.played"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type InstructionsAppendedEvent struct{…}`

    Returned when a session.instructions.append command is accepted into the Live session timeline. Acknowledges the appended instructions without guaranteeing that the model has acted on them.

    - `EndMs int64`

      The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms.

    - `EventID string`

      The unique ID of the Live server event.

    - `StartMs int64`

      The start of this event on the Live session timeline, in milliseconds from the beginning of the session.

    - `Type SessionInstructionsAppended`

      The event type, always `session.instructions.appended`.

      - `const SessionInstructionsAppendedSessionInstructionsAppended SessionInstructionsAppended = "session.instructions.appended"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type ThinkingAppendedEvent struct{…}`

    Returned when a session.thinking.append command is accepted into the Live session timeline. Acknowledges the added reasoning context without guaranteeing any spoken output.

    - `EndMs int64`

      The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms.

    - `EventID string`

      The unique ID of the Live server event.

    - `StartMs int64`

      The start of this event on the Live session timeline, in milliseconds from the beginning of the session.

    - `Type SessionThinkingAppended`

      The event type, always `session.thinking.appended`.

      - `const SessionThinkingAppendedSessionThinkingAppended SessionThinkingAppended = "session.thinking.appended"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type CommentaryAppendedEvent struct{…}`

    Returned when a session.commentary.append command is accepted into the Live session timeline. Acknowledges the added commentary without guaranteeing exact wording or completed audio playback.

    - `EndMs int64`

      The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms.

    - `EventID string`

      The unique ID of the Live server event.

    - `StartMs int64`

      The start of this event on the Live session timeline, in milliseconds from the beginning of the session.

    - `Type SessionCommentaryAppended`

      The event type, always `session.commentary.appended`.

      - `const SessionCommentaryAppendedSessionCommentaryAppended SessionCommentaryAppended = "session.commentary.appended"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `ForkServerEventSessionInputAudioAppend`

    - `Audio string`

      Base64-encoded raw mono PCM16LE at 24 kHz received from the primary transport, reflected to the sideband before model-input muting. This server event uses the same audio key as the client command, but is not an acknowledgment of it.

    - `Type SessionInputAudioAppend`

      The event type, always `session.input_audio.append`.

      - `const SessionInputAudioAppendSessionInputAudioAppend SessionInputAudioAppend = "session.input_audio.append"`

  - `type OutputAudioDeltaEvent struct{…}`

    An audio chunk generated by the Live model. Decode and play primary WebSocket chunks in delivery order using the configured session audio format. Sideband connections receive reflected output audio with timestamps.

    - `Delta string`

      Base64-encoded raw audio. Primary WebSocket events use the session's configured format; reflected sideband events use mono PCM16LE at 24 kHz.

    - `Type SessionOutputAudioDelta`

      The event type, always `session.output_audio.delta`.

      - `const SessionOutputAudioDeltaSessionOutputAudioDelta SessionOutputAudioDelta = "session.output_audio.delta"`

    - `EndMs int64`

      Exclusive session-relative end in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket. Dropped output frames leave gaps between reflected ranges.

    - `StartMs int64`

      Inclusive session-relative start in milliseconds. Required on reflected sideband events; omitted on the primary WebSocket.

  - `type InputTranscriptDeltaEvent struct{…}`

    A transcript fragment for user input audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.

    - `Delta string`

      The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript.

    - `EndMs int64`

      The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms.

    - `EventID string`

      The unique ID of the Live server event.

    - `StartMs int64`

      The start of this event on the Live session timeline, in milliseconds from the beginning of the session.

    - `Type SessionInputTranscriptDelta`

      The event type, always `session.input_transcript.delta`.

      - `const SessionInputTranscriptDeltaSessionInputTranscriptDelta SessionInputTranscriptDelta = "session.input_transcript.delta"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type OutputTranscriptDeltaEvent struct{…}`

    A transcript fragment for assistant output audio in the Live session. Accumulate fragments in delivery order; these events do not define complete turns or include a transcript-done event.

    - `Delta string`

      The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript.

    - `EndMs int64`

      The end of this event on the Live session timeline, in milliseconds from the beginning of the session. For appended context, this can equal start_ms.

    - `EventID string`

      The unique ID of the Live server event.

    - `StartMs int64`

      The start of this event on the Live session timeline, in milliseconds from the beginning of the session.

    - `Type SessionOutputTranscriptDelta`

      The event type, always `session.output_transcript.delta`.

      - `const SessionOutputTranscriptDeltaSessionOutputTranscriptDelta SessionOutputTranscriptDelta = "session.output_transcript.delta"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type DelegationCreatedEvent struct{…}`

    Returned when the Live model delegates work to your application, Responses, or Decisions. Contains delegation metadata and the position on the session timeline where the work was delegated.

    - `Delegation DelegationCreatedEventDelegation`

      The delegated work identifier and destination. This object contains metadata, not the task text.

      - `ID string`

        The unique ID of the delegation. Use this as delegation_id when replying to client-owned work or correlating backend events.

      - `Target string`

        Where the Live model delegated the work: `client`, `responses`, or `decisions`.

        - `string`

          - `const DelegationCreatedEventDelegationTargetStringClient DelegationCreatedEventDelegationTargetString = "client"`

          - `const DelegationCreatedEventDelegationTargetStringResponses DelegationCreatedEventDelegationTargetString = "responses"`

          - `const DelegationCreatedEventDelegationTargetStringDecisions DelegationCreatedEventDelegationTargetString = "decisions"`

      - `Type Delegation`

        The object type, always `delegation`.

        - `const DelegationDelegation Delegation = "delegation"`

      - `ResponseID string`

        The ID of the Responses API response associated with a Responses delegation. Omitted for client delegations.

    - `EventID string`

      The unique ID of the Live server event.

    - `OffsetMs int64`

      The position on the Live session timeline where the delegation was created, in milliseconds from the beginning of the session.

    - `Type SessionDelegationCreated`

      The event type, always `session.delegation.created`.

      - `const SessionDelegationCreatedSessionDelegationCreated SessionDelegationCreated = "session.delegation.created"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type DecisionEvent struct{…}`

    A Decision API event for a Live delegation or transcript trigger. For a trigger, source_event_id identifies the transcript delta that caused this evaluation.

    - `DelegationID string`

      The Live delegation ID, or null for a transcript trigger.

    - `Event DecisionEventEvent`

      - `Decision Decision`

        The native Decision API response, including its model, ordered answers, and token usage.

        - `Answers []DecisionAnswerUnion`

          Answers in question order. Any question can return a refusal instead of an answer; other questions can still receive answers. A refusal has `type: "refusal"` and the question's `name`, or `null` if it was unnamed.

          `minItems: 0`, `maxItems: 2000`

          - `DecisionAnswerPredicate`

            - `Name string`

              `minLength: 0`

            - `Probability float64`

            - `Type Predicate`

              The type of the object. Always `predicate`.

              - `const PredicatePredicate Predicate = "predicate"`

          - `DecisionAnswerChoice`

            - `Choice DecisionAnswerChoiceChoiceUnion`

              Choice values are typed: a string and a boolean with the same text are distinct.

              - `string`

              - `bool`

            - `Confidence float64`

            - `Name string`

              `minLength: 0`

            - `Probabilities []DecisionAnswerChoiceProbability`

              `minItems: 0`, `maxItems: 2000`

              - `Probability float64`

              - `Value DecisionAnswerChoiceProbabilityValueUnion`

                Choice values are typed: a string and a boolean with the same text are distinct.

                - `string`

                - `bool`

            - `Type Choice`

              The type of the object. Always `choice`.

              - `const ChoiceChoice Choice = "choice"`

          - `DecisionAnswerScore`

            - `Confidence float64`

            - `Name string`

              `minLength: 0`

            - `Probabilities []DecisionAnswerScoreProbability`

              `minItems: 0`, `maxItems: 2000`

              - `Label string`

                `minLength: 0`

              - `Probability float64`

              - `Value int64`

                `format: int64`

            - `Score float64`

            - `Type Score`

              The type of the object. Always `score`.

              - `const ScoreScore Score = "score"`

          - `DecisionAnswerRefusal`

            - `Name string`

              `minLength: 0`

            - `Type Refusal`

              The type of the object. Always `refusal`.

              - `const RefusalRefusal Refusal = "refusal"`

        - `Model string`

          The model used.

          `minLength: 0`

        - `Usage DecisionUsage`

          Token usage for the request.

          - `InputTokens int64`

            `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

          - `InputTokensDetails DecisionUsageInputTokensDetails`

            - `CacheWriteTokens int64`

              `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

            - `CachedTokens int64`

              `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

          - `OutputTokens int64`

            `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

          - `OutputTokensDetails DecisionUsageOutputTokensDetails`

            - `ReasoningTokens int64`

              `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

          - `TotalTokens int64`

            `format: int64`, `minimum: -2147483648`, `maximum: 2147483647`

      - `Type DecisionCompleted`

        - `const DecisionCompletedDecisionCompleted DecisionCompleted = "decision.completed"`

    - `EventID string`

      The unique ID of this Live server event.

    - `SourceEventID string`

      The event_id of the transcript delta that fired this trigger, or null for a delegation.

    - `SourceEventType DecisionEventSourceEventTypeString`

      - `string`

        - `const DecisionEventSourceEventTypeStringSessionInputTranscriptDelta DecisionEventSourceEventTypeString = "session.input_transcript.delta"`

        - `const DecisionEventSourceEventTypeStringSessionOutputTranscriptDelta DecisionEventSourceEventTypeString = "session.output_transcript.delta"`

    - `TriggerID string`

      The Live-assigned ID of this trigger firing, or null for a delegation.

    - `Type DecisionEvent`

      - `const DecisionEventDecisionEvent DecisionEvent = "decision.event"`

  - `type DecisionItemCreatedEvent struct{…}`

    An input item was appended for future decisions.

    - `EventID string`

      The unique ID of the Live server event.

    - `Item DecisionItemCreatedEventItem`

      - `ID string`

        The ID of the stored Decision input item.

      - `Content DecisionItemCreatedEventItemContentUnion`

        The required content of a message item. Tool call and output items omit content.

        - `string`

        - `[]DecisionItemCreatedEventItemContentPartsItemUnion`

          - `DecisionItemCreatedEventItemContentPartInputText`

            - `Text string`

              The text input to the model.

              `maxLength: 10485760`

            - `Type InputText`

              - `const InputTextInputText InputText = "input_text"`

          - `DecisionItemCreatedEventItemContentPartInputImage`

            - `ImageURL string`

              A base64-encoded image data URL or a publicly accessible HTTP(S) image URL.

              `maxLength: 20971520`

            - `Type InputImage`

              - `const InputImageInputImage InputImage = "input_image"`

            - `Detail string`

              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.

              - `const DecisionItemCreatedEventItemContentPartInputImageDetailLow DecisionItemCreatedEventItemContentPartInputImageDetail = "low"`

              - `const DecisionItemCreatedEventItemContentPartInputImageDetailHigh DecisionItemCreatedEventItemContentPartInputImageDetail = "high"`

              - `const DecisionItemCreatedEventItemContentPartInputImageDetailAuto DecisionItemCreatedEventItemContentPartInputImageDetail = "auto"`

              - `const DecisionItemCreatedEventItemContentPartInputImageDetailOriginal DecisionItemCreatedEventItemContentPartInputImageDetail = "original"`

      - `Role User`

        The role on a message item. Tool call and output items omit role.

        - `const UserUser User = "user"`

      - `Type string`

        The item type. An omitted type denotes a message. Tool call and output items have their corresponding tool type.

        - `const DecisionItemCreatedEventItemTypeMessage DecisionItemCreatedEventItemType = "message"`

    - `Type DecisionItemCreated`

      - `const DecisionItemCreatedDecisionItemCreated DecisionItemCreated = "decision.item.created"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type DecisionItemDeletedEvent struct{…}`

    An input item was removed from future decisions.

    - `EventID string`

      The unique ID of the Live server event.

    - `ItemID string`

    - `Type DecisionItemDeleted`

      - `const DecisionItemDeletedDecisionItemDeleted DecisionItemDeleted = "decision.item.deleted"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type ResponseEvent struct{…}`

    A streaming Responses API event from a backend delegated to by the Live session. Use the outer delegation_id to associate the nested stream with its Live delegation.

    - `Event map[string, any]`

      The nested Responses streaming event. Dispatch on its type field. Response lifecycle snapshots omit input and clear instructions, tools, and output to keep messages small; consume granular output events for the generated content.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type ResponseEvent`

      The event type, always `response.event`.

      - `const ResponseEventResponseEvent ResponseEvent = "response.event"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

    - `DelegationID string`

      The Live delegation associated with the nested Responses event. May be null or omitted when the event cannot be correlated with a delegation.

  - `type SessionUsageUpdatedEvent struct{…}`

    Reports cumulative Live audio usage and, when available, the most recent context-window usage. Delegated Responses token usage is reported separately in response.event events.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type SessionUsageUpdated`

      The event type, always `session.usage.updated`.

      - `const SessionUsageUpdatedSessionUsageUpdated SessionUsageUpdated = "session.usage.updated"`

    - `Usage SessionUsage`

      The cumulative Live audio usage so far.

      - `Seconds float64`

        The cumulative Live audio duration in seconds. Do not sum this value across usage events.

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

    - `ContextWindow SessionUsageUpdatedEventContextWindow`

      The latest measured Live context-window usage. Omitted when the context limit is unknown.

      - `UsageRatio float64`

        The latest active context token count divided by the Live model context limit. Can decrease after compaction and may lag between measured audio frames.

  - `type SessionClosedEvent struct{…}`

    Returned after the Live session finishes finalizing, with the close reason, final session snapshot, and cumulative audio usage. A connection closing without this event does not confirm successful finalization.

    - `EventID string`

      The unique ID of the Live server event.

    - `Reason SessionClosedEventReasonString`

      Why the Live session ended: `close_requested` for an application close or hangup request, `expired` for the session duration limit, `content` for a safety filter, `remote_hangup` for a graceful remote disconnect, or `connection_lost` for an unexpected primary or upstream disconnection.

      - `string`

        - `const SessionClosedEventReasonStringCloseRequested SessionClosedEventReasonString = "close_requested"`

        - `const SessionClosedEventReasonStringExpired SessionClosedEventReasonString = "expired"`

        - `const SessionClosedEventReasonStringContent SessionClosedEventReasonString = "content"`

        - `const SessionClosedEventReasonStringRemoteHangup SessionClosedEventReasonString = "remote_hangup"`

        - `const SessionClosedEventReasonStringConnectionLost SessionClosedEventReasonString = "connection_lost"`

    - `Session SessionResource`

      The resolved Live session configuration and server-assigned session metadata.

    - `Type SessionClosed`

      The event type, always `session.closed`.

      - `const SessionClosedSessionClosed SessionClosed = "session.closed"`

    - `Usage SessionUsage`

      The final cumulative Live audio usage after session finalization.

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type ErrorEvent struct{…}`

    Reports an error in the Live session, such as an invalid client command. Use error.client_event_id, when present, to identify the command that caused the error.

    - `Error LiveError`

      Details of the Live error and the client command that caused it, when known.

      - `Code string`

        A machine-readable code identifying the Live error, such as `unknown_parameter`.

      - `Message string`

        A human-readable explanation of the Live error.

      - `Type string`

        The category of error, such as `invalid_request_error` for an invalid Live client command.

      - `ClientEventID string`

        The event_id of the client command that caused the error, when supplied.

      - `Param string`

        The parameter that caused the error, when applicable, such as `session.voice`.

    - `EventID string`

      The unique ID of the Live server event.

    - `Type Error`

      The event type, always `error`.

      - `const ErrorError Error = "error"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `type InfoEvent struct{…}`

    An informational notice about the Live session, such as the event permissions applied to a frontend data channel.

    - `Code string`

      A machine-readable code for the notice, such as `data_channel_permissions`.

    - `EventID string`

      The unique ID of the Live server event.

    - `Message string`

      A human-readable explanation of the Live session notice.

    - `Type Info`

      The event type, always `info`.

      - `const InfoInfo Info = "info"`

    - `ClientEventID string`

      The event_id of the client command associated with this server event, when supplied.

  - `ForkServerEventTransportDtmfReceived`

    - `Event string`

      `minLength: 1`, `maxLength: 1`

    - `EventID string`

    - `Type TransportDtmfReceived`

      - `const TransportDtmfReceivedTransportDtmfReceived TransportDtmfReceived = "transport.dtmf.received"`

  - `ForkServerEventTransportDtmfSend`

    - `Event string`

      `minLength: 1`, `maxLength: 1`

    - `EventID string`

    - `Type TransportDtmfSend`

      - `const TransportDtmfSendTransportDtmfSend TransportDtmfSend = "transport.dtmf.send"`

    - `ClientEventID string`

      The event_id of the client command, when supplied.

  - `ForkServerEventTransportDtmfSent`

    - `Event string`

      `minLength: 1`, `maxLength: 1`

    - `EventID string`

    - `Type TransportDtmfSent`

      - `const TransportDtmfSentTransportDtmfSent TransportDtmfSent = "transport.dtmf.sent"`

    - `ClientEventID string`

      The event_id of the client command, when supplied.

  - `ForkServerEventTransportRinging`

    - `EventID string`

    - `SessionID string`

      The canonical Live session ID.

    - `Type TransportRinging`

      - `const TransportRingingTransportRinging TransportRinging = "transport.ringing"`

  - `ForkServerEventTransportAnswered`

    - `EventID string`

    - `SessionID string`

      The canonical Live session ID.

    - `Type TransportAnswered`

      - `const TransportAnsweredTransportAnswered TransportAnswered = "transport.answered"`

  - `ForkServerEventTransportFailed`

    - `Error ForkServerEventTransportFailedError`

      - `Code string`

        The call setup failure code.

      - `Message string`

      - `Type CallError`

        - `const CallErrorCallError CallError = "call_error"`

      - `Param string`

        The parameter related to the error, if any. Empty when no parameter applies.

    - `EventID string`

    - `SessionID string`

      The canonical Live session ID.

    - `Type TransportFailed`

      - `const TransportFailedTransportFailed TransportFailed = "transport.failed"`
