SPB Git

Repository Public

sideband-websocket.md 199.8 KB 7,374 lines markdown

1# Sideband WebSocket23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45Attach your backend server to an existing Live session with your OpenAI API key. For example, when your frontend connects over WebRTC, use this WebSocket to handle events and control the session from your backend.67WS `/v1/live/sessions/{session_id}/attach`89## Connection1011`wss://api.openai.com/v1/live/sessions/{session_id}/attach`1213Authenticate from your backend with your OpenAI API key in the `Authorization: Bearer $OPENAI_API_KEY` header. Keep the key on your server.1415`session_id` (required path parameter): The ID of the existing session to attach to.1617Attaching does not create a session or replay earlier events. Audio stays on the primary connection. Do not send session.start or session.input_audio.append on this WebSocket.1819## Inputs2021For a session using Responses delegation, update its tool choice. The delegation type cannot change. There is no required first message after attaching.2223### Example client event: session.update2425```json26{27  "type": "session.update",28  "event_id": "update_1",29  "session": {30    "delegation": {31      "type": "responses",32      "responses": {33        "tool_choice": "required"34      }35    }36  }37}38```3940[All client events](#client-events)4142## Outputs4344A configuration update is acknowledged with session.updated. You also receive subsequent session events; attaching alone does not trigger this event.4546### Example server event · excerpt: session.updated4748```json49{50  "type": "session.updated",51  "event_id": "event_updated_1",52  "client_event_id": "update_1",53  "session": {54    "id": "live_123",55    "expires_at": 1788307200,56    "status": "active",57    "model": "gpt-live-1"58  }59}60```6162[All server events](#server-events)6364[Need to start a session and stream audio from your backend? Use a primary WebSocket.](https://developers.openai.com/api/reference/resources/live/primary-websocket)6566<a id="client-events"></a>6768## Client events6970<a id="session.update"></a>7172### session.update7374Update the delegation settings of an active Live session. The server acknowledges accepted changes with `session.updated`.7576#### Schema7778Schema name: `LiveSessionUpdateParam`7980- `session: SessionUpdateConfig`8182  Sparse delegation updates. Omitted settings retain their values. The delegation type cannot change, including resetting Responses delegation to null or client. Model, frontend instructions, audio, and startup input are immutable.8384  - `delegation: optional ClientDelegation or object { type, responses }  or null`8586    Delegation settings to update. The delegation type must match the current session; omitted settings retain their values.8788    - `ClientDelegation object { type }`8990      Delegate tasks to your application. The Live session emits delegation events that your backend handles.9192      - `type: "client"`9394        The delegation owner. Always `client` for tasks handled by your application.9596        - `"client"`9798    - `Responses object { type, responses }`99100      Update the Responses backend for an existing Live session without changing delegation ownership.101102      - `type: "responses"`103104        The delegation owner. Always `responses` for tasks handled by the Responses API.105106        - `"responses"`107108      - `responses: optional ResponsesDelegationUpdateConfig`109110        Responses backend settings to update. Omitted settings keep their existing values.111112        - `instructions: optional string or null`113114          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).115116        - `max_output_tokens: optional number or null`117118          Maximum number of output tokens for each delegated response.119120        - `model: optional string`121122          The Responses backend model to use for subsequent delegated requests. Omit to keep the current backend model.123124        - `parallel_tool_calls: optional boolean or null`125126          Whether the delegated Responses model may request multiple tool calls in a single response.127128        - `reasoning: optional object { effort, summary }  or null`129130          Reasoning settings passed to each delegated Responses request.131132          - `effort: optional "none" or "minimal" or "low" or 3 more or null`133134            How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.135136            - `"none"`137138            - `"minimal"`139140            - `"low"`141142            - `"medium"`143144            - `"high"`145146            - `"xhigh"`147148          - `summary: optional "concise" or "detailed" or "auto" or null`149150            The reasoning summary to request from the delegated Responses model, when supported.151152            - `"concise"`153154            - `"detailed"`155156            - `"auto"`157158        - `service_tier: optional "auto" or "default" or "fast_tier_temp_pilot" or 3 more or null`159160          Service tier for delegated Responses requests.161162          - `"auto"`163164          - `"default"`165166          - `"fast_tier_temp_pilot"`167168          - `"flex"`169170          - `"priority"`171172          - `"ultrafast"`173174        - `text: optional object { verbosity }  or null`175176          Text generation settings passed to each delegated Responses request.177178          - `verbosity: optional "low" or "medium" or "high" or null`179180            The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.181182            - `"low"`183184            - `"medium"`185186            - `"high"`187188        - `tool_choice: optional "auto" or "none" or "required" or object { name, type }  or object { name, server_label, type }`189190          Controls which tool the Responses backend uses when handling a task delegated by the Live model.191192          - `LiveToolChoiceEnum = "auto" or "none" or "required"`193194            - `"auto"`195196            - `"none"`197198            - `"required"`199200          - `LiveFunctionToolChoiceParam object { name, type }`201202            - `name: string`203204            - `type: "function"`205206              - `"function"`207208          - `LiveMCPToolChoiceParam object { name, server_label, type }`209210            - `name: string`211212            - `server_label: string`213214            - `type: "mcp"`215216              - `"mcp"`217218        - `tools: optional array of FunctionTool or object { type }`219220          Tools available to the Responses backend while it handles tasks delegated by the Live model.221222          - `FunctionTool object { name, type, description, 2 more }`223224            A function tool available to the Responses backend when the Live model delegates a task.225226            - `name: string`227228              The name the delegated Responses model uses when calling this function.229230            - `type: "function"`231232              The tool type. Always `function`.233234              - `"function"`235236            - `description: optional string or null`237238              What the function does and when the delegated Responses model should call it.239240            - `parameters: optional map[unknown] or null`241242              A JSON Schema object describing the arguments accepted by the function.243244            - `strict: optional boolean or null`245246              Whether the delegated Responses model must follow the function’s parameter schema exactly.247248          - `WebSearch object { type }`249250            A web search tool available to the Live session’s Responses backend.251252            - `type: "web_search"`253254              The tool type. Always `web_search`.255256              - `"web_search"`257258- `type: "session.update"`259260  The Live client event type. Always `session.update`.261262  - `"session.update"`263264- `event_id: optional string or null`265266  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.267268#### Example269270```json271{272  "type": "session.update",273  "event_id": "evt_update_001",274  "session": {275    "delegation": {276      "type": "responses",277      "responses": {278        "instructions": "Check restaurant availability. Ask before confirming a booking.",279        "max_output_tokens": 1024280      }281    }282  }283}284```285286<a id="session.input_audio.mute"></a>287288### session.input_audio.mute289290Mute audio input to the Live model without closing the session. The server acknowledges with `session.input_audio.muted`.291292#### Schema293294Schema name: `LiveInputAudioMuteParam`295296- `type: "session.input_audio.mute"`297298  The Live client event type. Always `session.input_audio.mute`.299300  - `"session.input_audio.mute"`301302- `event_id: optional string or null`303304  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.305306#### Example307308```json309{310  "type": "session.input_audio.mute",311  "event_id": "evt_mute_001"312}313```314315<a id="session.input_audio.unmute"></a>316317### session.input_audio.unmute318319Resume audio input to a Live model after muting it. The server acknowledges with `session.input_audio.unmuted`.320321#### Schema322323Schema name: `LiveInputAudioUnmuteParam`324325- `type: "session.input_audio.unmute"`326327  The Live client event type. Always `session.input_audio.unmute`.328329  - `"session.input_audio.unmute"`330331- `event_id: optional string or null`332333  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.334335#### Example336337```json338{339  "type": "session.input_audio.unmute",340  "event_id": "evt_unmute_001"341}342```343344<a id="session.instructions.append"></a>345346### session.instructions.append347348Append instructions to the Live conversation while it is running, optionally associating them with an existing client delegation.349350#### Schema351352Schema name: `LiveInstructionsAppendParam`353354- `content: string`355356  Instruction text to append, limited to 500 tokens. This is a plain string, not an array of content parts.357358- `delegation_id: string or null`359360  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.361362- `type: "session.instructions.append"`363364  The Live client event type. Always `session.instructions.append`.365366  - `"session.instructions.append"`367368- `event_id: optional string or null`369370  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.371372#### Example373374```json375{376  "type": "session.instructions.append",377  "event_id": "evt_instructions_001",378  "delegation_id": null,379  "content": "The caller prefers outdoor seating."380}381```382383<a id="session.thinking.append"></a>384385### session.thinking.append386387Provide silent reasoning or progress context to the Live model, optionally for an existing client delegation.388389#### Schema390391Schema name: `LiveThinkingAppendParam`392393- `content: string`394395  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.396397- `delegation_id: string or null`398399  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.400401- `type: "session.thinking.append"`402403  The Live client event type. Always `session.thinking.append`.404405  - `"session.thinking.append"`406407- `event_id: optional string or null`408409  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.410411#### Example412413```json414{415  "type": "session.thinking.append",416  "event_id": "evt_thinking_001",417  "delegation_id": "del_abc123",418  "content": "Checking availability for two guests at 7 PM."419}420```421422<a id="session.commentary.append"></a>423424### session.commentary.append425426Provide context the Live model can communicate to the user, optionally for an existing client delegation.427428#### Schema429430Schema name: `LiveCommentaryAppendParam`431432- `content: string`433434  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.435436- `delegation_id: string or null`437438  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.439440- `type: "session.commentary.append"`441442  The Live client event type. Always `session.commentary.append`.443444  - `"session.commentary.append"`445446- `event_id: optional string or null`447448  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.449450#### Example451452```json453{454  "type": "session.commentary.append",455  "event_id": "evt_commentary_001",456  "delegation_id": "del_abc123",457  "content": "There is an outdoor table for two at 7 PM. Ask whether to reserve it."458}459```460461<a id="response.item.create"></a>462463### response.item.create464465Add an input item to the Live session’s Responses backend. Requires Responses delegation; use `response.create` to request a response.466467#### Schema468469Schema name: `LiveResponseItemCreateParam`470471- `item: EasyInputMessage or object { content, role, status, type }  or ResponseOutputMessage or 30 more`472473  An input item to append to the Responses backend conversation, such as a user message or a function tool result.474475  - `EasyInputMessage object { content, role, phase, type }`476477    A message input to the model with a role indicating instruction following478    hierarchy. Instructions given with the `developer` or `system` role take479    precedence over instructions given with the `user` role. Messages with the480    `assistant` role are presumed to have been generated by the model in previous481    interactions.482483    - `content: string or ResponseInputMessageContentList`484485      Text, image, or audio input to the model, used to generate a response.486      Can also contain previous assistant responses.487488      - `TextInput = string`489490        A text input to the model.491492      - `ResponseInputMessageContentList = array of ResponseInputContent`493494        A list of one or many input items to the model, containing different content495        types.496497        - `ResponseInputText object { text, type, prompt_cache_breakpoint }`498499          A text input to the model.500501          - `text: string`502503            The text input to the model.504505          - `type: "input_text"`506507            The type of the input item. Always `input_text`.508509            - `"input_text"`510511          - `prompt_cache_breakpoint: optional object { mode }`512513            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.514515            - `mode: "explicit"`516517              The breakpoint mode. Always `explicit`.518519              - `"explicit"`520521        - `ResponseInputImage object { detail, type, file_id, 2 more }`522523          An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).524525          - `detail: ImageDetail`526527            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.528529            - `"low"`530531            - `"high"`532533            - `"auto"`534535            - `"original"`536537          - `type: "input_image"`538539            The type of the input item. Always `input_image`.540541            - `"input_image"`542543          - `file_id: optional string or null`544545            The ID of the file to be sent to the model.546547          - `image_url: optional string or null`548549            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.550551          - `prompt_cache_breakpoint: optional object { mode }`552553            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.554555            - `mode: "explicit"`556557              The breakpoint mode. Always `explicit`.558559              - `"explicit"`560561        - `ResponseInputFile object { type, detail, file_data, 4 more }`562563          A file input to the model.564565          - `type: "input_file"`566567            The type of the input item. Always `input_file`.568569            - `"input_file"`570571          - `detail: optional "auto" or "low" or "high"`572573            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`.574575            - `"auto"`576577            - `"low"`578579            - `"high"`580581          - `file_data: optional string`582583            The content of the file to be sent to the model.584585          - `file_id: optional string or null`586587            The ID of the file to be sent to the model.588589          - `file_url: optional string`590591            The URL of the file to be sent to the model.592593          - `filename: optional string`594595            The name of the file to be sent to the model.596597          - `prompt_cache_breakpoint: optional object { mode }`598599            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.600601            - `mode: "explicit"`602603              The breakpoint mode. Always `explicit`.604605              - `"explicit"`606607    - `role: "user" or "assistant" or "system" or "developer"`608609      The role of the message input. One of `user`, `assistant`, `system`, or610      `developer`.611612      - `"user"`613614      - `"assistant"`615616      - `"system"`617618      - `"developer"`619620    - `phase: optional "commentary" or "final_answer" or null`621622      Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).623      For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend624      phase on all assistant messages — dropping it can degrade performance. Not used for user messages.625626      - `"commentary"`627628      - `"final_answer"`629630    - `type: optional "message"`631632      The type of the message input. Always `message`.633634      - `"message"`635636  - `Message object { content, role, status, type }`637638    A message input to the model with a role indicating instruction following639    hierarchy. Instructions given with the `developer` or `system` role take640    precedence over instructions given with the `user` role.641642    - `content: ResponseInputMessageContentList`643644      A list of one or many input items to the model, containing different content645      types.646647    - `role: "user" or "system" or "developer"`648649      The role of the message input. One of `user`, `system`, or `developer`.650651      - `"user"`652653      - `"system"`654655      - `"developer"`656657    - `status: optional "in_progress" or "completed" or "incomplete"`658659      The status of item. One of `in_progress`, `completed`, or660      `incomplete`. Populated when items are returned via API.661662      - `"in_progress"`663664      - `"completed"`665666      - `"incomplete"`667668    - `type: optional "message"`669670      The type of the message input. Always set to `message`.671672      - `"message"`673674  - `ResponseOutputMessage object { id, content, role, 3 more }`675676    An output message from the model.677678    - `id: string`679680      The unique ID of the output message.681682    - `content: array of ResponseOutputText or ResponseOutputRefusal`683684      The content of the output message.685686      - `ResponseOutputText object { annotations, logprobs, text, type }`687688        A text output from the model.689690        - `annotations: array of object { file_id, filename, index, type }  or object { end_index, start_index, title, 2 more }  or object { container_id, end_index, file_id, 3 more }  or object { file_id, index, type }`691692          The annotations of the text output.693694          - `FileCitation object { file_id, filename, index, type }`695696            A citation to a file.697698            - `file_id: string`699700              The ID of the file.701702            - `filename: string`703704              The filename of the file cited.705706            - `index: number`707708              The index of the file in the list of files.709710            - `type: "file_citation"`711712              The type of the file citation. Always `file_citation`.713714              - `"file_citation"`715716          - `URLCitation object { end_index, start_index, title, 2 more }`717718            A citation for a web resource used to generate a model response.719720            - `end_index: number`721722              The index of the last character of the URL citation in the message.723724            - `start_index: number`725726              The index of the first character of the URL citation in the message.727728            - `title: string`729730              The title of the web resource.731732            - `type: "url_citation"`733734              The type of the URL citation. Always `url_citation`.735736              - `"url_citation"`737738            - `url: string`739740              The URL of the web resource.741742          - `ContainerFileCitation object { container_id, end_index, file_id, 3 more }`743744            A citation for a container file used to generate a model response.745746            - `container_id: string`747748              The ID of the container file.749750            - `end_index: number`751752              The index of the last character of the container file citation in the message.753754            - `file_id: string`755756              The ID of the file.757758            - `filename: string`759760              The filename of the container file cited.761762            - `start_index: number`763764              The index of the first character of the container file citation in the message.765766            - `type: "container_file_citation"`767768              The type of the container file citation. Always `container_file_citation`.769770              - `"container_file_citation"`771772          - `FilePath object { file_id, index, type }`773774            A path to a file.775776            - `file_id: string`777778              The ID of the file.779780            - `index: number`781782              The index of the file in the list of files.783784            - `type: "file_path"`785786              The type of the file path. Always `file_path`.787788              - `"file_path"`789790        - `logprobs: array of object { token, bytes, logprob, top_logprobs }`791792          - `token: string`793794          - `bytes: array of number`795796          - `logprob: number`797798          - `top_logprobs: array of object { token, bytes, logprob }`799800            - `token: string`801802            - `bytes: array of number`803804            - `logprob: number`805806        - `text: string`807808          The text output from the model.809810        - `type: "output_text"`811812          The type of the output text. Always `output_text`.813814          - `"output_text"`815816      - `ResponseOutputRefusal object { refusal, type }`817818        A refusal from the model.819820        - `refusal: string`821822          The refusal explanation from the model.823824        - `type: "refusal"`825826          The type of the refusal. Always `refusal`.827828          - `"refusal"`829830    - `role: "assistant"`831832      The role of the output message. Always `assistant`.833834      - `"assistant"`835836    - `status: "in_progress" or "completed" or "incomplete"`837838      The status of the message input. One of `in_progress`, `completed`, or839      `incomplete`. Populated when input items are returned via API.840841      - `"in_progress"`842843      - `"completed"`844845      - `"incomplete"`846847    - `type: "message"`848849      The type of the output message. Always `message`.850851      - `"message"`852853    - `phase: optional "commentary" or "final_answer" or null`854855      Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`).856      For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend857      phase on all assistant messages — dropping it can degrade performance. Not used for user messages.858859      - `"commentary"`860861      - `"final_answer"`862863  - `FileSearchCall object { id, queries, status, 2 more }`864865    The results of a file search tool call. See the866    [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more information.867868    - `id: string`869870      The unique ID of the file search tool call.871872    - `queries: array of string`873874      The queries used to search for files.875876    - `status: "in_progress" or "searching" or "completed" or 2 more`877878      The status of the file search tool call. One of `in_progress`,879      `searching`, `incomplete` or `failed`,880881      - `"in_progress"`882883      - `"searching"`884885      - `"completed"`886887      - `"incomplete"`888889      - `"failed"`890891    - `type: "file_search_call"`892893      The type of the file search tool call. Always `file_search_call`.894895      - `"file_search_call"`896897    - `results: optional array of object { attributes, file_id, filename, 2 more }  or null`898899      The results of the file search tool call.900901      - `attributes: optional map[string or number or boolean] or null`902903        Set of 16 key-value pairs that can be attached to an object. This can be904        useful for storing additional information about the object in a structured905        format, and querying for objects via API or the dashboard. Keys are strings906        with a maximum length of 64 characters. Values are strings with a maximum907        length of 512 characters, booleans, or numbers.908909        - `string`910911        - `number`912913        - `boolean`914915      - `file_id: optional string`916917        The unique ID of the file.918919      - `filename: optional string`920921        The name of the file.922923      - `score: optional number`924925        The relevance score of the file - a value between 0 and 1.926927      - `text: optional string`928929        The text that was retrieved from the file.930931  - `ComputerCall object { id, call_id, pending_safety_checks, 4 more }`932933    A tool call to a computer use tool. See the934    [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more information.935936    - `id: string`937938      The unique ID of the computer call.939940    - `call_id: string`941942      An identifier used when responding to the tool call with output.943944    - `pending_safety_checks: array of object { id, code, message }`945946      The pending safety checks for the computer call.947948      - `id: string`949950        The ID of the pending safety check.951952      - `code: optional string or null`953954        The type of the pending safety check.955956      - `message: optional string or null`957958        Details about the pending safety check.959960    - `status: "in_progress" or "completed" or "incomplete"`961962      The status of the item. One of `in_progress`, `completed`, or963      `incomplete`. Populated when items are returned via API.964965      - `"in_progress"`966967      - `"completed"`968969      - `"incomplete"`970971    - `type: "computer_call"`972973      The type of the computer call. Always `computer_call`.974975      - `"computer_call"`976977    - `action: optional ComputerAction`978979      A click action.980981      - `Click object { button, type, x, 2 more }`982983        A click action.984985        - `button: "left" or "right" or "wheel" or 2 more`986987          Indicates which mouse button was pressed during the click. One of `left`, `right`, `wheel`, `back`, or `forward`.988989          - `"left"`990991          - `"right"`992993          - `"wheel"`994995          - `"back"`996997          - `"forward"`998999        - `type: "click"`10001001          Specifies the event type. For a click action, this property is always `click`.10021003          - `"click"`10041005        - `x: number`10061007          The x-coordinate where the click occurred.10081009        - `y: number`10101011          The y-coordinate where the click occurred.10121013        - `keys: optional array of string or null`10141015          The keys being held while clicking.10161017      - `DoubleClick object { keys, type, x, y }`10181019        A double click action.10201021        - `keys: array of string or null`10221023          The keys being held while double-clicking.10241025        - `type: "double_click"`10261027          Specifies the event type. For a double click action, this property is always set to `double_click`.10281029          - `"double_click"`10301031        - `x: number`10321033          The x-coordinate where the double click occurred.10341035        - `y: number`10361037          The y-coordinate where the double click occurred.10381039      - `Drag object { path, type, keys }`10401041        A drag action.10421043        - `path: array of object { x, y }`10441045          An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg10461047          ```1048          [1049            { x: 100, y: 200 },1050            { x: 200, y: 300 }1051          ]1052          ```10531054          - `x: number`10551056            The x-coordinate.10571058          - `y: number`10591060            The y-coordinate.10611062        - `type: "drag"`10631064          Specifies the event type. For a drag action, this property is always set to `drag`.10651066          - `"drag"`10671068        - `keys: optional array of string or null`10691070          The keys being held while dragging the mouse.10711072      - `Keypress object { keys, type }`10731074        A collection of keypresses the model would like to perform.10751076        - `keys: array of string`10771078          The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key.10791080        - `type: "keypress"`10811082          Specifies the event type. For a keypress action, this property is always set to `keypress`.10831084          - `"keypress"`10851086      - `Move object { type, x, y, keys }`10871088        A mouse move action.10891090        - `type: "move"`10911092          Specifies the event type. For a move action, this property is always set to `move`.10931094          - `"move"`10951096        - `x: number`10971098          The x-coordinate to move to.10991100        - `y: number`11011102          The y-coordinate to move to.11031104        - `keys: optional array of string or null`11051106          The keys being held while moving the mouse.11071108      - `Screenshot object { type }`11091110        A screenshot action.11111112        - `type: "screenshot"`11131114          Specifies the event type. For a screenshot action, this property is always set to `screenshot`.11151116          - `"screenshot"`11171118      - `Scroll object { scroll_x, scroll_y, type, 3 more }`11191120        A scroll action.11211122        - `scroll_x: number`11231124          The horizontal scroll distance.11251126        - `scroll_y: number`11271128          The vertical scroll distance.11291130        - `type: "scroll"`11311132          Specifies the event type. For a scroll action, this property is always set to `scroll`.11331134          - `"scroll"`11351136        - `x: number`11371138          The x-coordinate where the scroll occurred.11391140        - `y: number`11411142          The y-coordinate where the scroll occurred.11431144        - `keys: optional array of string or null`11451146          The keys being held while scrolling.11471148      - `Type object { text, type }`11491150        An action to type in text.11511152        - `text: string`11531154          The text to type.11551156        - `type: "type"`11571158          Specifies the event type. For a type action, this property is always set to `type`.11591160          - `"type"`11611162      - `Wait object { type }`11631164        A wait action.11651166        - `type: "wait"`11671168          Specifies the event type. For a wait action, this property is always set to `wait`.11691170          - `"wait"`11711172    - `actions: optional ComputerActionList`11731174      Flattened batched actions for `computer_use`. Each action includes an1175      `type` discriminator and action-specific fields.11761177      - `Click object { button, type, x, 2 more }`11781179        A click action.11801181      - `DoubleClick object { keys, type, x, y }`11821183        A double click action.11841185      - `Drag object { path, type, keys }`11861187        A drag action.11881189      - `Keypress object { keys, type }`11901191        A collection of keypresses the model would like to perform.11921193      - `Move object { type, x, y, keys }`11941195        A mouse move action.11961197      - `Screenshot object { type }`11981199        A screenshot action.12001201      - `Scroll object { scroll_x, scroll_y, type, 3 more }`12021203        A scroll action.12041205      - `Type object { text, type }`12061207        An action to type in text.12081209      - `Wait object { type }`12101211        A wait action.12121213  - `ComputerCallOutput object { call_id, output, type, 3 more }`12141215    The output of a computer tool call.12161217    - `call_id: string`12181219      The ID of the computer tool call that produced the output.12201221    - `output: ResponseComputerToolCallOutputScreenshot`12221223      A computer screenshot image used with the computer use tool.12241225      - `type: "computer_screenshot"`12261227        Specifies the event type. For a computer screenshot, this property is1228        always set to `computer_screenshot`.12291230        - `"computer_screenshot"`12311232      - `file_id: optional string`12331234        The identifier of an uploaded file that contains the screenshot.12351236      - `image_url: optional string`12371238        The URL of the screenshot image.12391240    - `type: "computer_call_output"`12411242      The type of the computer tool call output. Always `computer_call_output`.12431244      - `"computer_call_output"`12451246    - `id: optional string or null`12471248      The ID of the computer tool call output.12491250    - `acknowledged_safety_checks: optional array of object { id, code, message }  or null`12511252      The safety checks reported by the API that have been acknowledged by the developer.12531254      - `id: string`12551256        The ID of the pending safety check.12571258      - `code: optional string or null`12591260        The type of the pending safety check.12611262      - `message: optional string or null`12631264        Details about the pending safety check.12651266    - `status: optional "in_progress" or "completed" or "incomplete" or null`12671268      The status of the message input. One of `in_progress`, `completed`, or `incomplete`. Populated when input items are returned via API.12691270      - `"in_progress"`12711272      - `"completed"`12731274      - `"incomplete"`12751276  - `WebSearchCall object { id, action, status, type }`12771278    The results of a web search tool call. See the1279    [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more information.12801281    - `id: string`12821283      The unique ID of the web search tool call.12841285    - `action: object { type, queries, query, sources }  or object { type, url }  or object { pattern, type, url }`12861287      An object describing the specific action taken in this web search call.1288      Includes details on how the model used the web (search, open_page, find_in_page).12891290      - `Search object { type, queries, query, sources }`12911292        Action type "search" - Performs a web search query.12931294        - `type: "search"`12951296          The action type.12971298          - `"search"`12991300        - `queries: optional array of string`13011302          The search queries.13031304        - `query: optional string`13051306          The search query.13071308        - `sources: optional array of object { type, url }`13091310          The sources used in the search.13111312          - `type: "url"`13131314            The type of source. Always `url`.13151316            - `"url"`13171318          - `url: string`13191320            The URL of the source.13211322      - `OpenPage object { type, url }`13231324        Action type "open_page" - Opens a specific URL from search results.13251326        - `type: "open_page"`13271328          The action type.13291330          - `"open_page"`13311332        - `url: optional string or null`13331334          The URL opened by the model.13351336      - `FindInPage object { pattern, type, url }`13371338        Action type "find_in_page": Searches for a pattern within a loaded page.13391340        - `pattern: string`13411342          The pattern or text to search for within the page.13431344        - `type: "find_in_page"`13451346          The action type.13471348          - `"find_in_page"`13491350        - `url: string`13511352          The URL of the page searched for the pattern.13531354    - `status: "in_progress" or "searching" or "completed" or 2 more`13551356      The status of the web search tool call.13571358      - `"in_progress"`13591360      - `"searching"`13611362      - `"completed"`13631364      - `"failed"`13651366      - `"incomplete"`13671368    - `type: "web_search_call"`13691370      The type of the web search tool call. Always `web_search_call`.13711372      - `"web_search_call"`13731374  - `FunctionCall object { arguments, call_id, name, 6 more }`13751376    A tool call to run a function. See the1377    [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more information.13781379    - `arguments: string`13801381      A JSON string of the arguments to pass to the function.13821383    - `call_id: string`13841385      The unique ID of the function tool call generated by the model.13861387    - `name: string`13881389      The name of the function to run.13901391    - `type: "function_call"`13921393      The type of the function tool call. Always `function_call`.13941395      - `"function_call"`13961397    - `id: optional string`13981399      The unique ID of the function tool call.14001401    - `async: optional boolean`14021403      Whether the function tool call runs asynchronously.14041405    - `caller: optional object { type }  or object { caller_id, type }  or null`14061407      The execution context that produced this tool call.14081409      - `Direct object { type }`14101411        - `type: "direct"`14121413          - `"direct"`14141415      - `Program object { caller_id, type }`14161417        - `caller_id: string`14181419          The call ID of the program item that produced this tool call.14201421        - `type: "program"`14221423          - `"program"`14241425    - `namespace: optional string`14261427      The namespace of the function to run.14281429    - `status: optional "in_progress" or "completed" or "incomplete"`14301431      The status of the item. One of `in_progress`, `completed`, or1432      `incomplete`. Populated when items are returned via API.14331434      - `"in_progress"`14351436      - `"completed"`14371438      - `"incomplete"`14391440  - `FunctionCallOutput object { output, type, id, 5 more }`14411442    The output of a function tool call.14431444    - `output: string or array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`14451446      Text, image, or file output of the function tool call.14471448      - `string`14491450        A JSON string of the output of the function tool call.14511452      - `array of ResponseInputTextContent or ResponseInputImageContent or ResponseInputFileContent`14531454        An array of content outputs (text, image, file) for the function tool call.14551456        - `ResponseInputTextContent object { text, type, prompt_cache_breakpoint }`14571458          A text input to the model.14591460          - `text: string`14611462            The text input to the model.14631464          - `type: "input_text"`14651466            The type of the input item. Always `input_text`.14671468            - `"input_text"`14691470          - `prompt_cache_breakpoint: optional object { mode }  or null`14711472            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.14731474            - `mode: "explicit"`14751476              The breakpoint mode. Always `explicit`.14771478              - `"explicit"`14791480        - `ResponseInputImageContent object { type, detail, file_id, 2 more }`14811482          An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision)14831484          - `type: "input_image"`14851486            The type of the input item. Always `input_image`.14871488            - `"input_image"`14891490          - `detail: optional ImageDetail or null`14911492            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.14931494          - `file_id: optional string or null`14951496            The ID of the file to be sent to the model.14971498          - `image_url: optional string or null`14991500            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.15011502          - `prompt_cache_breakpoint: optional object { mode }  or null`15031504            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.15051506            - `mode: "explicit"`15071508              The breakpoint mode. Always `explicit`.15091510              - `"explicit"`15111512        - `ResponseInputFileContent object { type, detail, file_data, 4 more }`15131514          A file input to the model.15151516          - `type: "input_file"`15171518            The type of the input item. Always `input_file`.15191520            - `"input_file"`15211522          - `detail: optional "auto" or "low" or "high"`15231524            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`.15251526            - `"auto"`15271528            - `"low"`15291530            - `"high"`15311532          - `file_data: optional string or null`15331534            The base64-encoded data of the file to be sent to the model.15351536          - `file_id: optional string or null`15371538            The ID of the file to be sent to the model.15391540          - `file_url: optional string or null`15411542            The URL of the file to be sent to the model.15431544          - `filename: optional string or null`15451546            The name of the file to be sent to the model.15471548          - `prompt_cache_breakpoint: optional object { mode }  or null`15491550            Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.15511552            - `mode: "explicit"`15531554              The breakpoint mode. Always `explicit`.15551556              - `"explicit"`15571558    - `type: "function_call_output"`15591560      The type of the function tool call output. Always `function_call_output`.15611562      - `"function_call_output"`15631564    - `id: optional string or null`15651566      The unique ID of the function tool call output. Populated when this item is returned via API.15671568    - `call_id: optional string or null`15691570      The unique ID of the function tool call generated by the model.15711572    - `caller: optional object { type }  or object { caller_id, type }  or null`15731574      The execution context that produced this tool call.15751576      - `Direct object { type }`15771578        - `type: "direct"`15791580          The caller type. Always `direct`.15811582          - `"direct"`15831584      - `Program object { caller_id, type }`15851586        - `caller_id: string`15871588          The call ID of the program item that produced this tool call.15891590        - `type: "program"`15911592          The caller type. Always `program`.15931594          - `"program"`15951596    - `name: optional string or null`15971598      The name of the tool that produced the output.15991600    - `namespace: optional string or null`16011602      The namespace of the tool that produced the output.16031604    - `status: optional "in_progress" or "completed" or "incomplete" or null`16051606      The status of the item. One of `in_progress`, `completed`, or `incomplete`. Populated when items are returned via API.16071608      - `"in_progress"`16091610      - `"completed"`16111612      - `"incomplete"`16131614  - `ToolSearchCall object { arguments, type, id, 3 more }`16151616    - `arguments: unknown`16171618      The arguments supplied to the tool search call.16191620    - `type: "tool_search_call"`16211622      The item type. Always `tool_search_call`.16231624      - `"tool_search_call"`16251626    - `id: optional string or null`16271628      The unique ID of this tool search call.16291630    - `call_id: optional string or null`16311632      The unique ID of the tool search call generated by the model.16331634    - `execution: optional "server" or "client"`16351636      Whether tool search was executed by the server or by the client.16371638      - `"server"`16391640      - `"client"`16411642    - `status: optional "in_progress" or "completed" or "incomplete" or null`16431644      The status of the tool search call.16451646      - `"in_progress"`16471648      - `"completed"`16491650      - `"incomplete"`16511652  - `ToolSearchOutput object { tools, type, id, 3 more }`16531654    - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`16551656      The loaded tool definitions returned by the tool search output.16571658      - `Function object { name, parameters, strict, 6 more }`16591660        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).16611662        - `name: string`16631664          The name of the function to call.16651666        - `parameters: map[unknown] or null`16671668          A JSON schema object describing the parameters of the function.16691670        - `strict: boolean or null`16711672          Whether strict parameter validation is enforced for this function tool.16731674        - `type: "function"`16751676          The type of the function tool. Always `function`.16771678          - `"function"`16791680        - `allowed_callers: optional array of "direct" or "programmatic" or null`16811682          The tool invocation context(s).16831684          - `"direct"`16851686          - `"programmatic"`16871688        - `async: optional boolean`16891690        - `defer_loading: optional boolean`16911692          Whether this function is deferred and loaded via tool search.16931694        - `description: optional string or null`16951696          A description of the function. Used by the model to determine whether or not to call the function.16971698        - `output_schema: optional map[unknown] or null`16991700          A JSON schema object describing the JSON value encoded in string outputs for this function.17011702      - `FileSearch object { type, vector_store_ids, filters, 2 more }`17031704        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).17051706        - `type: "file_search"`17071708          The type of the file search tool. Always `file_search`.17091710          - `"file_search"`17111712        - `vector_store_ids: array of string`17131714          The IDs of the vector stores to search.17151716        - `filters: optional ComparisonFilter or CompoundFilter or null`17171718          A filter to apply.17191720          - `ComparisonFilter object { key, type, value }`17211722            A filter used to compare a specified attribute key to a given value using a defined comparison operation.17231724            - `key: string`17251726              The key to compare against the value.17271728            - `type: "eq" or "ne" or "gt" or 5 more`17291730              Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.17311732              - `eq`: equals1733              - `ne`: not equal1734              - `gt`: greater than1735              - `gte`: greater than or equal1736              - `lt`: less than1737              - `lte`: less than or equal1738              - `in`: in1739              - `nin`: not in17401741              - `"eq"`17421743              - `"ne"`17441745              - `"gt"`17461747              - `"gte"`17481749              - `"lt"`17501751              - `"lte"`17521753              - `"in"`17541755              - `"nin"`17561757            - `value: string or number or boolean or array of string or number`17581759              The value to compare against the attribute key; supports string, number, or boolean types.17601761              - `string`17621763              - `number`17641765              - `boolean`17661767              - `array of string or number`17681769                - `string`17701771                - `number`17721773          - `CompoundFilter object { filters, type }`17741775            Combine multiple filters using `and` or `or`.17761777            - `filters: array of ComparisonFilter or unknown`17781779              Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.17801781              - `ComparisonFilter object { key, type, value }`17821783                A filter used to compare a specified attribute key to a given value using a defined comparison operation.17841785              - `unknown`17861787            - `type: "and" or "or"`17881789              Type of operation: `and` or `or`.17901791              - `"and"`17921793              - `"or"`17941795        - `max_num_results: optional number`17961797          The maximum number of results to return. This number should be between 1 and 50 inclusive.17981799        - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`18001801          Ranking options for search.18021803          - `hybrid_search: optional object { embedding_weight, text_weight }`18041805            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.18061807            - `embedding_weight: number`18081809              The weight of the embedding in the reciprocal ranking fusion.18101811            - `text_weight: number`18121813              The weight of the text in the reciprocal ranking fusion.18141815          - `ranker: optional "auto" or "default-2024-11-15"`18161817            The ranker to use for the file search.18181819            - `"auto"`18201821            - `"default-2024-11-15"`18221823          - `score_threshold: optional number`18241825            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.18261827      - `Computer object { type }`18281829        A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).18301831        - `type: "computer"`18321833          The type of the computer tool. Always `computer`.18341835          - `"computer"`18361837      - `ComputerUsePreview object { display_height, display_width, environment, type }`18381839        A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).18401841        - `display_height: number`18421843          The height of the computer display.18441845        - `display_width: number`18461847          The width of the computer display.18481849        - `environment: "windows" or "mac" or "linux" or 2 more`18501851          The type of computer environment to control.18521853          - `"windows"`18541855          - `"mac"`18561857          - `"linux"`18581859          - `"ubuntu"`18601861          - `"browser"`18621863        - `type: "computer_use_preview"`18641865          The type of the computer use tool. Always `computer_use_preview`.18661867          - `"computer_use_preview"`18681869      - `WebSearch object { type, external_web_access, filters, 2 more }`18701871        Search the Internet for sources related to the prompt. Learn more about the1872        [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).18731874        - `type: "web_search" or "web_search_2025_08_26"`18751876          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.18771878          - `"web_search"`18791880          - `"web_search_2025_08_26"`18811882        - `external_web_access: optional boolean`18831884          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.18851886        - `filters: optional object { allowed_domains }  or null`18871888          Filters for the search.18891890          - `allowed_domains: optional array of string or null`18911892            Allowed domains for the search. If not provided, all domains are allowed.1893            Subdomains of the provided domains are allowed as well.18941895            Example: `["pubmed.ncbi.nlm.nih.gov"]`18961897        - `search_context_size: optional "low" or "medium" or "high"`18981899          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.19001901          - `"low"`19021903          - `"medium"`19041905          - `"high"`19061907        - `user_location: optional object { city, country, region, 2 more }  or null`19081909          The approximate location of the user.19101911          - `city: optional string or null`19121913            Free text input for the city of the user, e.g. `San Francisco`.19141915          - `country: optional string or null`19161917            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.19181919          - `region: optional string or null`19201921            Free text input for the region of the user, e.g. `California`.19221923          - `timezone: optional string or null`19241925            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.19261927          - `type: optional "approximate"`19281929            The type of location approximation. Always `approximate`.19301931            - `"approximate"`19321933      - `Mcp object { server_label, type, allowed_callers, 9 more }`19341935        Give the model access to additional tools via remote Model Context Protocol1936        (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).19371938        - `server_label: string`19391940          A label for this MCP server, used to identify it in tool calls.19411942        - `type: "mcp"`19431944          The type of the MCP tool. Always `mcp`.19451946          - `"mcp"`19471948        - `allowed_callers: optional array of "direct" or "programmatic" or null`19491950          The tool invocation context(s).19511952          - `"direct"`19531954          - `"programmatic"`19551956        - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`19571958          List of allowed tool names or a filter object.19591960          - `McpAllowedTools = array of string`19611962            A string array of allowed tool names19631964          - `McpToolFilter object { read_only, tool_names }`19651966            A filter object to specify which tools are allowed.19671968            - `read_only: optional boolean`19691970              Indicates whether or not a tool modifies data or is read-only. If an1971              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),1972              it will match this filter.19731974            - `tool_names: optional array of string`19751976              List of allowed tool names.19771978        - `authorization: optional string`19791980          An OAuth access token that can be used with a remote MCP server, either1981          with a custom MCP server URL or a service connector. Your application1982          must handle the OAuth authorization flow and provide the token here.19831984        - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`19851986          Identifier for service connectors, like those available in ChatGPT. One of1987          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more1988          about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).19891990          This field is deprecated for models released after September 1, 2026.1991          Use `server_url` to connect to a remote MCP server, or `tunnel_id` to1992          connect through a Secure MCP Tunnel.19931994          Currently supported `connector_id` values are:19951996          - Dropbox: `connector_dropbox`1997          - Gmail: `connector_gmail`1998          - Google Calendar: `connector_googlecalendar`1999          - Google Drive: `connector_googledrive`2000          - Microsoft Teams: `connector_microsoftteams`2001          - Outlook Calendar: `connector_outlookcalendar`2002          - Outlook Email: `connector_outlookemail`2003          - SharePoint: `connector_sharepoint`20042005          - `"connector_dropbox"`20062007          - `"connector_gmail"`20082009          - `"connector_googlecalendar"`20102011          - `"connector_googledrive"`20122013          - `"connector_microsoftteams"`20142015          - `"connector_outlookcalendar"`20162017          - `"connector_outlookemail"`20182019          - `"connector_sharepoint"`20202021        - `defer_loading: optional boolean`20222023          Whether this MCP tool is deferred and discovered via tool search.20242025        - `headers: optional map[string] or null`20262027          Optional HTTP headers to send to the MCP server. Use for authentication2028          or other purposes.20292030        - `require_approval: optional object { always, never }  or "always" or "never" or null`20312032          Specify which of the MCP server's tools require approval.20332034          - `McpToolApprovalFilter object { always, never }`20352036            Specify which of the MCP server's tools require approval. Can be2037            `always`, `never`, or a filter object associated with tools2038            that require approval.20392040            - `always: optional object { read_only, tool_names }`20412042              A filter object to specify which tools are allowed.20432044              - `read_only: optional boolean`20452046                Indicates whether or not a tool modifies data or is read-only. If an2047                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2048                it will match this filter.20492050              - `tool_names: optional array of string`20512052                List of allowed tool names.20532054            - `never: optional object { read_only, tool_names }`20552056              A filter object to specify which tools are allowed.20572058              - `read_only: optional boolean`20592060                Indicates whether or not a tool modifies data or is read-only. If an2061                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),2062                it will match this filter.20632064              - `tool_names: optional array of string`20652066                List of allowed tool names.20672068          - `McpToolApprovalSetting = "always" or "never"`20692070            Specify a single approval policy for all tools. One of `always` or2071            `never`. When set to `always`, all tools will require approval. When2072            set to `never`, all tools will not require approval.20732074            - `"always"`20752076            - `"never"`20772078        - `server_description: optional string`20792080          Optional description of the MCP server, used to provide more context.20812082        - `server_url: optional string`20832084          The URL for the MCP server. One of `server_url`, `connector_id`, or2085          `tunnel_id` must be provided.20862087        - `tunnel_id: optional string`20882089          The Secure MCP Tunnel ID to use instead of a direct server URL. One of2090          `server_url`, `connector_id`, or `tunnel_id` must be provided.20912092      - `CodeInterpreter object { container, type, allowed_callers }`20932094        A tool that runs Python code to help generate a response to a prompt.20952096        - `container: string or object { type, file_ids, memory_limit, network_policy }`20972098          The code interpreter container. Can be a container ID or an object that2099          specifies uploaded file IDs to make available to your code, along with an2100          optional `memory_limit` setting.21012102          - `string`21032104            The container ID.21052106          - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`21072108            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.21092110            - `type: "auto"`21112112              Always `auto`.21132114              - `"auto"`21152116            - `file_ids: optional array of string`21172118              An optional list of uploaded files to make available to your code.21192120            - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`21212122              The memory limit for the code interpreter container.21232124              - `"1g"`21252126              - `"4g"`21272128              - `"16g"`21292130              - `"64g"`21312132            - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`21332134              Network access policy for the container.21352136              - `ContainerNetworkPolicyDisabled object { type }`21372138                - `type: "disabled"`21392140                  Disable outbound network access. Always `disabled`.21412142                  - `"disabled"`21432144              - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`21452146                - `allowed_domains: array of string`21472148                  A list of allowed domains when type is `allowlist`.21492150                - `type: "allowlist"`21512152                  Allow outbound network access only to specified domains. Always `allowlist`.21532154                  - `"allowlist"`21552156                - `domain_secrets: optional array of ContainerNetworkPolicyDomainSecret`21572158                  Optional domain-scoped secrets for allowlisted domains.21592160                  - `domain: string`21612162                    The domain associated with the secret.21632164                  - `name: string`21652166                    The name of the secret to inject for the domain.21672168                  - `value: string`21692170                    The secret value to inject for the domain.21712172        - `type: "code_interpreter"`21732174          The type of the code interpreter tool. Always `code_interpreter`.21752176          - `"code_interpreter"`21772178        - `allowed_callers: optional array of "direct" or "programmatic" or null`21792180          The tool invocation context(s).21812182          - `"direct"`21832184          - `"programmatic"`21852186      - `ProgrammaticToolCalling object { type }`21872188        - `type: "programmatic_tool_calling"`21892190          The type of the tool. Always `programmatic_tool_calling`.21912192          - `"programmatic_tool_calling"`21932194      - `ImageGeneration object { type, action, background, 9 more }`21952196        A tool that generates images using the GPT image models.21972198        - `type: "image_generation"`21992200          The type of the image generation tool. Always `image_generation`.22012202          - `"image_generation"`22032204        - `action: optional "generate" or "edit" or "auto"`22052206          Whether to generate a new image or edit an existing image. Default: `auto`.22072208          - `"generate"`22092210          - `"edit"`22112212          - `"auto"`22132214        - `background: optional "transparent" or "opaque" or "auto"`22152216          Set the background of the generated image. One of `transparent`, `opaque`,2217          or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including2218          their `2026-09-08` snapshots, support `opaque` and `transparent`2219          backgrounds. Transparent backgrounds are available for supported GPT Image2220          models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in2221          preview. When using `transparent`, set the output format to `png` or `webp`.2222          Default: `auto`.22232224          - `"transparent"`22252226          - `"opaque"`22272228          - `"auto"`22292230        - `input_fidelity: optional "high" or "low" or null`22312232          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.22332234          - `"high"`22352236          - `"low"`22372238        - `input_image_mask: optional object { file_id, image_url }`22392240          Optional mask for inpainting. Contains `image_url`2241          (string, optional) and `file_id` (string, optional).22422243          - `file_id: optional string`22442245            File ID for the mask image.22462247          - `image_url: optional string`22482249            Base64-encoded mask image.22502251        - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`22522253          The image generation model to use. One of `gpt-image-1`,2254          `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2255          `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2256          `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2257          `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2258          `gpt-image-1`.22592260          - `string`22612262          - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`22632264            The image generation model to use. One of `gpt-image-1`,2265            `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,2266            `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,2267            `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,2268            `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:2269            `gpt-image-1`.22702271            - `"gpt-image-1"`22722273            - `"gpt-image-1-mini"`22742275            - `"gpt-image-1.5"`22762277            - `"gpt-image-2"`22782279            - `"gpt-image-2-2026-04-21"`22802281            - `"gpt-image-2.5-sunburst"`22822283            - `"gpt-image-2.5-sunburst-2026-09-08"`22842285            - `"gpt-image-2.5-flare"`22862287            - `"gpt-image-2.5-flare-2026-09-08"`22882289        - `moderation: optional "auto" or "low"`22902291          Moderation level for the generated image. Default: `auto`.22922293          - `"auto"`22942295          - `"low"`22962297        - `output_compression: optional number`22982299          Compression level for the output image. Default: 100.23002301        - `output_format: optional "png" or "webp" or "jpeg"`23022303          The output format of the generated image. One of `png`, `webp`, or2304          `jpeg`. Default: `png`.23052306          - `"png"`23072308          - `"webp"`23092310          - `"jpeg"`23112312        - `partial_images: optional number`23132314          Number of partial images to generate in streaming mode, from 0 (default value) to 3.23152316        - `quality: optional "low" or "medium" or "high" or 3 more`23172318          The quality of the generated image. The GPT image models support `low`,2319          `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,2320          including their `2026-09-08` snapshots, also support `xhigh` and `max`.2321          Default: `auto`.23222323          - `"low"`23242325          - `"medium"`23262327          - `"high"`23282329          - `"xhigh"`23302331          - `"max"`23322333          - `"auto"`23342335        - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`23362337          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. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.23382339          - `string`23402341          - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`23422343            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. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.23442345            - `"1024x1024"`23462347            - `"1024x1536"`23482349            - `"1536x1024"`23502351            - `"auto"`23522353      - `LocalShell object { type }`23542355        A tool that allows the model to execute shell commands in a local environment.23562357        - `type: "local_shell"`23582359          The type of the local shell tool. Always `local_shell`.23602361          - `"local_shell"`23622363      - `Shell object { type, allowed_callers, environment }`23642365        A tool that allows the model to execute shell commands.23662367        - `type: "shell"`23682369          The type of the shell tool. Always `shell`.23702371          - `"shell"`23722373        - `allowed_callers: optional array of "direct" or "programmatic" or null`23742375          The tool invocation context(s).23762377          - `"direct"`23782379          - `"programmatic"`23802381        - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`23822383          - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`23842385            - `type: "container_auto"`23862387              Automatically creates a container for this request23882389              - `"container_auto"`23902391            - `file_ids: optional array of string`23922393              An optional list of uploaded files to make available to your code.23942395            - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`23962397              The memory limit for the container.23982399              - `"1g"`24002401              - `"4g"`24022403              - `"16g"`24042405              - `"64g"`24062407            - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`24082409              Network access policy for the container.24102411              - `ContainerNetworkPolicyDisabled object { type }`24122413              - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`24142415            - `skills: optional array of SkillReference or InlineSkill`24162417              An optional list of skills referenced by id or inline data.24182419              - `SkillReference object { skill_id, type, version }`24202421                - `skill_id: string`24222423                  The ID of the referenced skill.24242425                - `type: "skill_reference"`24262427                  References a skill created with the /v1/skills endpoint.24282429                  - `"skill_reference"`24302431                - `version: optional string`24322433                  Optional skill version. Use a positive integer or 'latest'. Omit for default.24342435              - `InlineSkill object { description, name, source, type }`24362437                - `description: string`24382439                  The description of the skill.24402441                - `name: string`24422443                  The name of the skill.24442445                - `source: InlineSkillSource`24462447                  Inline skill payload24482449                  - `data: string`24502451                    Base64-encoded skill zip bundle.24522453                  - `media_type: "application/zip"`24542455                    The media type of the inline skill payload. Must be `application/zip`.24562457                    - `"application/zip"`24582459                  - `type: "base64"`24602461                    The type of the inline skill source. Must be `base64`.24622463                    - `"base64"`24642465                - `type: "inline"`24662467                  Defines an inline skill for this request.24682469                  - `"inline"`24702471          - `LocalEnvironment object { type, skills }`24722473            - `type: "local"`24742475              Use a local computer environment.24762477              - `"local"`24782479            - `skills: optional array of LocalSkill`24802481              An optional list of skills.24822483              - `description: string`24842485                The description of the skill.24862487              - `name: string`24882489                The name of the skill.24902491              - `path: string`24922493                The path to the directory containing the skill.24942495          - `ContainerReference object { container_id, type }`24962497            - `container_id: string`24982499              The ID of the referenced container.25002501            - `type: "container_reference"`25022503              References a container created with the /v1/containers endpoint25042505              - `"container_reference"`25062507      - `Custom object { name, type, allowed_callers, 4 more }`25082509        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)25102511        - `name: string`25122513          The name of the custom tool, used to identify it in tool calls.25142515        - `type: "custom"`25162517          The type of the custom tool. Always `custom`.25182519          - `"custom"`25202521        - `allowed_callers: optional array of "direct" or "programmatic" or null`25222523          The tool invocation context(s).25242525          - `"direct"`25262527          - `"programmatic"`25282529        - `async: optional boolean`25302531          Whether the tool response can be returned asynchronously versus immediately returned on next response creation.25322533        - `defer_loading: optional boolean`25342535          Whether this tool should be deferred and discovered via tool search.25362537        - `description: optional string`25382539          Optional description of the custom tool, used to provide more context.25402541        - `format: optional CustomToolInputFormat`25422543          The input format for the custom tool. Default is unconstrained text.25442545          - `Text object { type }`25462547            Unconstrained free-form text.25482549            - `type: "text"`25502551              Unconstrained text format. Always `text`.25522553              - `"text"`25542555          - `Grammar object { definition, syntax, type }`25562557            A grammar defined by the user.25582559            - `definition: string`25602561              The grammar definition.25622563            - `syntax: "lark" or "regex"`25642565              The syntax of the grammar definition. One of `lark` or `regex`.25662567              - `"lark"`25682569              - `"regex"`25702571            - `type: "grammar"`25722573              Grammar format. Always `grammar`.25742575              - `"grammar"`25762577      - `Namespace object { description, name, tools, type }`25782579        Groups function/custom tools under a shared namespace.25802581        - `description: string`25822583          A description of the namespace shown to the model.25842585        - `name: string`25862587          The namespace name used in tool calls (for example, `crm`).25882589        - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`25902591          The function/custom tools available inside this namespace.25922593          - `Function object { name, type, allowed_callers, 6 more }`25942595            - `name: string`25962597            - `type: "function"`25982599              - `"function"`26002601            - `allowed_callers: optional array of "direct" or "programmatic" or null`26022603              The tool invocation context(s).26042605              - `"direct"`26062607              - `"programmatic"`26082609            - `async: optional boolean`26102611              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.26122613            - `defer_loading: optional boolean`26142615              Whether this function should be deferred and discovered via tool search.26162617            - `description: optional string or null`26182619            - `output_schema: optional map[unknown] or null`26202621              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.26222623            - `parameters: optional unknown or null`26242625            - `strict: optional boolean or null`26262627              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.26282629          - `Custom object { name, type, allowed_callers, 4 more }`26302631            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)26322633            - `name: string`26342635              The name of the custom tool, used to identify it in tool calls.26362637            - `type: "custom"`26382639              The type of the custom tool. Always `custom`.26402641              - `"custom"`26422643            - `allowed_callers: optional array of "direct" or "programmatic" or null`26442645              The tool invocation context(s).26462647              - `"direct"`26482649              - `"programmatic"`26502651            - `async: optional boolean`26522653              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.26542655            - `defer_loading: optional boolean`26562657              Whether this tool should be deferred and discovered via tool search.26582659            - `description: optional string`26602661              Optional description of the custom tool, used to provide more context.26622663            - `format: optional CustomToolInputFormat`26642665              The input format for the custom tool. Default is unconstrained text.26662667        - `type: "namespace"`26682669          The type of the tool. Always `namespace`.26702671          - `"namespace"`26722673      - `ToolSearch object { type, description, execution, parameters }`26742675        Hosted or BYOT tool search configuration for deferred tools.26762677        - `type: "tool_search"`26782679          The type of the tool. Always `tool_search`.26802681          - `"tool_search"`26822683        - `description: optional string or null`26842685          Description shown to the model for a client-executed tool search tool.26862687        - `execution: optional "server" or "client"`26882689          Whether tool search is executed by the server or by the client.26902691          - `"server"`26922693          - `"client"`26942695        - `parameters: optional unknown or null`26962697          Parameter schema for a client-executed tool search tool.26982699      - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`27002701        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).27022703        - `type: "web_search_preview" or "web_search_preview_2025_03_11"`27042705          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.27062707          - `"web_search_preview"`27082709          - `"web_search_preview_2025_03_11"`27102711        - `search_content_types: optional array of "text" or "image"`27122713          - `"text"`27142715          - `"image"`27162717        - `search_context_size: optional "low" or "medium" or "high"`27182719          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.27202721          - `"low"`27222723          - `"medium"`27242725          - `"high"`27262727        - `user_location: optional object { type, city, country, 2 more }  or null`27282729          The user's location.27302731          - `type: "approximate"`27322733            The type of location approximation. Always `approximate`.27342735            - `"approximate"`27362737          - `city: optional string or null`27382739            Free text input for the city of the user, e.g. `San Francisco`.27402741          - `country: optional string or null`27422743            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.27442745          - `region: optional string or null`27462747            Free text input for the region of the user, e.g. `California`.27482749          - `timezone: optional string or null`27502751            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.27522753      - `ApplyPatch object { type, allowed_callers }`27542755        Allows the assistant to create, delete, or update files using unified diffs.27562757        - `type: "apply_patch"`27582759          The type of the tool. Always `apply_patch`.27602761          - `"apply_patch"`27622763        - `allowed_callers: optional array of "direct" or "programmatic" or null`27642765          The tool invocation context(s).27662767          - `"direct"`27682769          - `"programmatic"`27702771    - `type: "tool_search_output"`27722773      The item type. Always `tool_search_output`.27742775      - `"tool_search_output"`27762777    - `id: optional string or null`27782779      The unique ID of this tool search output.27802781    - `call_id: optional string or null`27822783      The unique ID of the tool search call generated by the model.27842785    - `execution: optional "server" or "client"`27862787      Whether tool search was executed by the server or by the client.27882789      - `"server"`27902791      - `"client"`27922793    - `status: optional "in_progress" or "completed" or "incomplete" or null`27942795      The status of the tool search output.27962797      - `"in_progress"`27982799      - `"completed"`28002801      - `"incomplete"`28022803  - `AdditionalTools object { role, tools, type, id }`28042805    - `role: "developer"`28062807      The role that provided the additional tools. Only `developer` is supported.28082809      - `"developer"`28102811    - `tools: array of object { name, parameters, strict, 6 more }  or object { type, vector_store_ids, filters, 2 more }  or object { type }  or 13 more`28122813      A list of additional tools made available at this item.28142815      - `Function object { name, parameters, strict, 6 more }`28162817        Defines a function in your own code the model can choose to call. Learn more about [function calling](https://developers.openai.com/api/docs/guides/function-calling).28182819        - `name: string`28202821          The name of the function to call.28222823        - `parameters: map[unknown] or null`28242825          A JSON schema object describing the parameters of the function.28262827        - `strict: boolean or null`28282829          Whether strict parameter validation is enforced for this function tool.28302831        - `type: "function"`28322833          The type of the function tool. Always `function`.28342835          - `"function"`28362837        - `allowed_callers: optional array of "direct" or "programmatic" or null`28382839          The tool invocation context(s).28402841          - `"direct"`28422843          - `"programmatic"`28442845        - `async: optional boolean`28462847        - `defer_loading: optional boolean`28482849          Whether this function is deferred and loaded via tool search.28502851        - `description: optional string or null`28522853          A description of the function. Used by the model to determine whether or not to call the function.28542855        - `output_schema: optional map[unknown] or null`28562857          A JSON schema object describing the JSON value encoded in string outputs for this function.28582859      - `FileSearch object { type, vector_store_ids, filters, 2 more }`28602861        A tool that searches for relevant content from uploaded files. Learn more about the [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).28622863        - `type: "file_search"`28642865          The type of the file search tool. Always `file_search`.28662867          - `"file_search"`28682869        - `vector_store_ids: array of string`28702871          The IDs of the vector stores to search.28722873        - `filters: optional ComparisonFilter or CompoundFilter or null`28742875          A filter to apply.28762877          - `ComparisonFilter object { key, type, value }`28782879            A filter used to compare a specified attribute key to a given value using a defined comparison operation.28802881          - `CompoundFilter object { filters, type }`28822883            Combine multiple filters using `and` or `or`.28842885        - `max_num_results: optional number`28862887          The maximum number of results to return. This number should be between 1 and 50 inclusive.28882889        - `ranking_options: optional object { hybrid_search, ranker, score_threshold }`28902891          Ranking options for search.28922893          - `hybrid_search: optional object { embedding_weight, text_weight }`28942895            Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.28962897            - `embedding_weight: number`28982899              The weight of the embedding in the reciprocal ranking fusion.29002901            - `text_weight: number`29022903              The weight of the text in the reciprocal ranking fusion.29042905          - `ranker: optional "auto" or "default-2024-11-15"`29062907            The ranker to use for the file search.29082909            - `"auto"`29102911            - `"default-2024-11-15"`29122913          - `score_threshold: optional number`29142915            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.29162917      - `Computer object { type }`29182919        A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).29202921        - `type: "computer"`29222923          The type of the computer tool. Always `computer`.29242925          - `"computer"`29262927      - `ComputerUsePreview object { display_height, display_width, environment, type }`29282929        A tool that controls a virtual computer. Learn more about the [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).29302931        - `display_height: number`29322933          The height of the computer display.29342935        - `display_width: number`29362937          The width of the computer display.29382939        - `environment: "windows" or "mac" or "linux" or 2 more`29402941          The type of computer environment to control.29422943          - `"windows"`29442945          - `"mac"`29462947          - `"linux"`29482949          - `"ubuntu"`29502951          - `"browser"`29522953        - `type: "computer_use_preview"`29542955          The type of the computer use tool. Always `computer_use_preview`.29562957          - `"computer_use_preview"`29582959      - `WebSearch object { type, external_web_access, filters, 2 more }`29602961        Search the Internet for sources related to the prompt. Learn more about the2962        [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).29632964        - `type: "web_search" or "web_search_2025_08_26"`29652966          The type of the web search tool. One of `web_search` or `web_search_2025_08_26`.29672968          - `"web_search"`29692970          - `"web_search_2025_08_26"`29712972        - `external_web_access: optional boolean`29732974          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.29752976        - `filters: optional object { allowed_domains }  or null`29772978          Filters for the search.29792980          - `allowed_domains: optional array of string or null`29812982            Allowed domains for the search. If not provided, all domains are allowed.2983            Subdomains of the provided domains are allowed as well.29842985            Example: `["pubmed.ncbi.nlm.nih.gov"]`29862987        - `search_context_size: optional "low" or "medium" or "high"`29882989          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.29902991          - `"low"`29922993          - `"medium"`29942995          - `"high"`29962997        - `user_location: optional object { city, country, region, 2 more }  or null`29982999          The approximate location of the user.30003001          - `city: optional string or null`30023003            Free text input for the city of the user, e.g. `San Francisco`.30043005          - `country: optional string or null`30063007            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.30083009          - `region: optional string or null`30103011            Free text input for the region of the user, e.g. `California`.30123013          - `timezone: optional string or null`30143015            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.30163017          - `type: optional "approximate"`30183019            The type of location approximation. Always `approximate`.30203021            - `"approximate"`30223023      - `Mcp object { server_label, type, allowed_callers, 9 more }`30243025        Give the model access to additional tools via remote Model Context Protocol3026        (MCP) servers. [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).30273028        - `server_label: string`30293030          A label for this MCP server, used to identify it in tool calls.30313032        - `type: "mcp"`30333034          The type of the MCP tool. Always `mcp`.30353036          - `"mcp"`30373038        - `allowed_callers: optional array of "direct" or "programmatic" or null`30393040          The tool invocation context(s).30413042          - `"direct"`30433044          - `"programmatic"`30453046        - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`30473048          List of allowed tool names or a filter object.30493050          - `McpAllowedTools = array of string`30513052            A string array of allowed tool names30533054          - `McpToolFilter object { read_only, tool_names }`30553056            A filter object to specify which tools are allowed.30573058            - `read_only: optional boolean`30593060              Indicates whether or not a tool modifies data or is read-only. If an3061              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),3062              it will match this filter.30633064            - `tool_names: optional array of string`30653066              List of allowed tool names.30673068        - `authorization: optional string`30693070          An OAuth access token that can be used with a remote MCP server, either3071          with a custom MCP server URL or a service connector. Your application3072          must handle the OAuth authorization flow and provide the token here.30733074        - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`30753076          Identifier for service connectors, like those available in ChatGPT. One of3077          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more3078          about service connectors [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).30793080          This field is deprecated for models released after September 1, 2026.3081          Use `server_url` to connect to a remote MCP server, or `tunnel_id` to3082          connect through a Secure MCP Tunnel.30833084          Currently supported `connector_id` values are:30853086          - Dropbox: `connector_dropbox`3087          - Gmail: `connector_gmail`3088          - Google Calendar: `connector_googlecalendar`3089          - Google Drive: `connector_googledrive`3090          - Microsoft Teams: `connector_microsoftteams`3091          - Outlook Calendar: `connector_outlookcalendar`3092          - Outlook Email: `connector_outlookemail`3093          - SharePoint: `connector_sharepoint`30943095          - `"connector_dropbox"`30963097          - `"connector_gmail"`30983099          - `"connector_googlecalendar"`31003101          - `"connector_googledrive"`31023103          - `"connector_microsoftteams"`31043105          - `"connector_outlookcalendar"`31063107          - `"connector_outlookemail"`31083109          - `"connector_sharepoint"`31103111        - `defer_loading: optional boolean`31123113          Whether this MCP tool is deferred and discovered via tool search.31143115        - `headers: optional map[string] or null`31163117          Optional HTTP headers to send to the MCP server. Use for authentication3118          or other purposes.31193120        - `require_approval: optional object { always, never }  or "always" or "never" or null`31213122          Specify which of the MCP server's tools require approval.31233124          - `McpToolApprovalFilter object { always, never }`31253126            Specify which of the MCP server's tools require approval. Can be3127            `always`, `never`, or a filter object associated with tools3128            that require approval.31293130            - `always: optional object { read_only, tool_names }`31313132              A filter object to specify which tools are allowed.31333134              - `read_only: optional boolean`31353136                Indicates whether or not a tool modifies data or is read-only. If an3137                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),3138                it will match this filter.31393140              - `tool_names: optional array of string`31413142                List of allowed tool names.31433144            - `never: optional object { read_only, tool_names }`31453146              A filter object to specify which tools are allowed.31473148              - `read_only: optional boolean`31493150                Indicates whether or not a tool modifies data or is read-only. If an3151                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),3152                it will match this filter.31533154              - `tool_names: optional array of string`31553156                List of allowed tool names.31573158          - `McpToolApprovalSetting = "always" or "never"`31593160            Specify a single approval policy for all tools. One of `always` or3161            `never`. When set to `always`, all tools will require approval. When3162            set to `never`, all tools will not require approval.31633164            - `"always"`31653166            - `"never"`31673168        - `server_description: optional string`31693170          Optional description of the MCP server, used to provide more context.31713172        - `server_url: optional string`31733174          The URL for the MCP server. One of `server_url`, `connector_id`, or3175          `tunnel_id` must be provided.31763177        - `tunnel_id: optional string`31783179          The Secure MCP Tunnel ID to use instead of a direct server URL. One of3180          `server_url`, `connector_id`, or `tunnel_id` must be provided.31813182      - `CodeInterpreter object { container, type, allowed_callers }`31833184        A tool that runs Python code to help generate a response to a prompt.31853186        - `container: string or object { type, file_ids, memory_limit, network_policy }`31873188          The code interpreter container. Can be a container ID or an object that3189          specifies uploaded file IDs to make available to your code, along with an3190          optional `memory_limit` setting.31913192          - `string`31933194            The container ID.31953196          - `CodeInterpreterToolAuto object { type, file_ids, memory_limit, network_policy }`31973198            Configuration for a code interpreter container. Optionally specify the IDs of the files to run the code on.31993200            - `type: "auto"`32013202              Always `auto`.32033204              - `"auto"`32053206            - `file_ids: optional array of string`32073208              An optional list of uploaded files to make available to your code.32093210            - `memory_limit: optional "1g" or "4g" or "16g" or "64g" or null`32113212              The memory limit for the code interpreter container.32133214              - `"1g"`32153216              - `"4g"`32173218              - `"16g"`32193220              - `"64g"`32213222            - `network_policy: optional ContainerNetworkPolicyDisabled or ContainerNetworkPolicyAllowlist`32233224              Network access policy for the container.32253226              - `ContainerNetworkPolicyDisabled object { type }`32273228              - `ContainerNetworkPolicyAllowlist object { allowed_domains, type, domain_secrets }`32293230        - `type: "code_interpreter"`32313232          The type of the code interpreter tool. Always `code_interpreter`.32333234          - `"code_interpreter"`32353236        - `allowed_callers: optional array of "direct" or "programmatic" or null`32373238          The tool invocation context(s).32393240          - `"direct"`32413242          - `"programmatic"`32433244      - `ProgrammaticToolCalling object { type }`32453246        - `type: "programmatic_tool_calling"`32473248          The type of the tool. Always `programmatic_tool_calling`.32493250          - `"programmatic_tool_calling"`32513252      - `ImageGeneration object { type, action, background, 9 more }`32533254        A tool that generates images using the GPT image models.32553256        - `type: "image_generation"`32573258          The type of the image generation tool. Always `image_generation`.32593260          - `"image_generation"`32613262        - `action: optional "generate" or "edit" or "auto"`32633264          Whether to generate a new image or edit an existing image. Default: `auto`.32653266          - `"generate"`32673268          - `"edit"`32693270          - `"auto"`32713272        - `background: optional "transparent" or "opaque" or "auto"`32733274          Set the background of the generated image. One of `transparent`, `opaque`,3275          or `auto`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including3276          their `2026-09-08` snapshots, support `opaque` and `transparent`3277          backgrounds. Transparent backgrounds are available for supported GPT Image3278          models. For `gpt-image-2` and `gpt-image-2-2026-04-21`, this support is in3279          preview. When using `transparent`, set the output format to `png` or `webp`.3280          Default: `auto`.32813282          - `"transparent"`32833284          - `"opaque"`32853286          - `"auto"`32873288        - `input_fidelity: optional "high" or "low" or null`32893290          Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1` and `gpt-image-1.5` and later models, unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.32913292          - `"high"`32933294          - `"low"`32953296        - `input_image_mask: optional object { file_id, image_url }`32973298          Optional mask for inpainting. Contains `image_url`3299          (string, optional) and `file_id` (string, optional).33003301          - `file_id: optional string`33023303            File ID for the mask image.33043305          - `image_url: optional string`33063307            Base64-encoded mask image.33083309        - `model: optional string or "gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`33103311          The image generation model to use. One of `gpt-image-1`,3312          `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3313          `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3314          `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3315          `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3316          `gpt-image-1`.33173318          - `string`33193320          - `"gpt-image-1" or "gpt-image-1-mini" or "gpt-image-1.5" or 6 more`33213322            The image generation model to use. One of `gpt-image-1`,3323            `gpt-image-1-mini`, `gpt-image-1.5`, `gpt-image-2`,3324            `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,3325            `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,3326            `gpt-image-2.5-flare-2026-09-08`, or `chatgpt-image-latest`. Default:3327            `gpt-image-1`.33283329            - `"gpt-image-1"`33303331            - `"gpt-image-1-mini"`33323333            - `"gpt-image-1.5"`33343335            - `"gpt-image-2"`33363337            - `"gpt-image-2-2026-04-21"`33383339            - `"gpt-image-2.5-sunburst"`33403341            - `"gpt-image-2.5-sunburst-2026-09-08"`33423343            - `"gpt-image-2.5-flare"`33443345            - `"gpt-image-2.5-flare-2026-09-08"`33463347        - `moderation: optional "auto" or "low"`33483349          Moderation level for the generated image. Default: `auto`.33503351          - `"auto"`33523353          - `"low"`33543355        - `output_compression: optional number`33563357          Compression level for the output image. Default: 100.33583359        - `output_format: optional "png" or "webp" or "jpeg"`33603361          The output format of the generated image. One of `png`, `webp`, or3362          `jpeg`. Default: `png`.33633364          - `"png"`33653366          - `"webp"`33673368          - `"jpeg"`33693370        - `partial_images: optional number`33713372          Number of partial images to generate in streaming mode, from 0 (default value) to 3.33733374        - `quality: optional "low" or "medium" or "high" or 3 more`33753376          The quality of the generated image. The GPT image models support `low`,3377          `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,3378          including their `2026-09-08` snapshots, also support `xhigh` and `max`.3379          Default: `auto`.33803381          - `"low"`33823383          - `"medium"`33843385          - `"high"`33863387          - `"xhigh"`33883389          - `"max"`33903391          - `"auto"`33923393        - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or "auto"`33943395          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. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.33963397          - `string`33983399          - `"1024x1024" or "1024x1536" or "1536x1024" or "auto"`34003401            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. For `dall-e-2`, use one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of `1024x1024`, `1792x1024`, or `1024x1792`.34023403            - `"1024x1024"`34043405            - `"1024x1536"`34063407            - `"1536x1024"`34083409            - `"auto"`34103411      - `LocalShell object { type }`34123413        A tool that allows the model to execute shell commands in a local environment.34143415        - `type: "local_shell"`34163417          The type of the local shell tool. Always `local_shell`.34183419          - `"local_shell"`34203421      - `Shell object { type, allowed_callers, environment }`34223423        A tool that allows the model to execute shell commands.34243425        - `type: "shell"`34263427          The type of the shell tool. Always `shell`.34283429          - `"shell"`34303431        - `allowed_callers: optional array of "direct" or "programmatic" or null`34323433          The tool invocation context(s).34343435          - `"direct"`34363437          - `"programmatic"`34383439        - `environment: optional ContainerAuto or LocalEnvironment or ContainerReference or null`34403441          - `ContainerAuto object { type, file_ids, memory_limit, 2 more }`34423443          - `LocalEnvironment object { type, skills }`34443445          - `ContainerReference object { container_id, type }`34463447      - `Custom object { name, type, allowed_callers, 4 more }`34483449        A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)34503451        - `name: string`34523453          The name of the custom tool, used to identify it in tool calls.34543455        - `type: "custom"`34563457          The type of the custom tool. Always `custom`.34583459          - `"custom"`34603461        - `allowed_callers: optional array of "direct" or "programmatic" or null`34623463          The tool invocation context(s).34643465          - `"direct"`34663467          - `"programmatic"`34683469        - `async: optional boolean`34703471          Whether the tool response can be returned asynchronously versus immediately returned on next response creation.34723473        - `defer_loading: optional boolean`34743475          Whether this tool should be deferred and discovered via tool search.34763477        - `description: optional string`34783479          Optional description of the custom tool, used to provide more context.34803481        - `format: optional CustomToolInputFormat`34823483          The input format for the custom tool. Default is unconstrained text.34843485      - `Namespace object { description, name, tools, type }`34863487        Groups function/custom tools under a shared namespace.34883489        - `description: string`34903491          A description of the namespace shown to the model.34923493        - `name: string`34943495          The namespace name used in tool calls (for example, `crm`).34963497        - `tools: array of object { name, type, allowed_callers, 6 more }  or object { name, type, allowed_callers, 4 more }`34983499          The function/custom tools available inside this namespace.35003501          - `Function object { name, type, allowed_callers, 6 more }`35023503            - `name: string`35043505            - `type: "function"`35063507              - `"function"`35083509            - `allowed_callers: optional array of "direct" or "programmatic" or null`35103511              The tool invocation context(s).35123513              - `"direct"`35143515              - `"programmatic"`35163517            - `async: optional boolean`35183519              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.35203521            - `defer_loading: optional boolean`35223523              Whether this function should be deferred and discovered via tool search.35243525            - `description: optional string or null`35263527            - `output_schema: optional map[unknown] or null`35283529              A JSON Schema describing the JSON value encoded in string outputs for this function tool. This does not describe content-array outputs.35303531            - `parameters: optional unknown or null`35323533            - `strict: optional boolean or null`35343535              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.35363537          - `Custom object { name, type, allowed_callers, 4 more }`35383539            A custom tool that processes input using a specified format. Learn more about   [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)35403541            - `name: string`35423543              The name of the custom tool, used to identify it in tool calls.35443545            - `type: "custom"`35463547              The type of the custom tool. Always `custom`.35483549              - `"custom"`35503551            - `allowed_callers: optional array of "direct" or "programmatic" or null`35523553              The tool invocation context(s).35543555              - `"direct"`35563557              - `"programmatic"`35583559            - `async: optional boolean`35603561              Whether the tool response can be returned asynchronously versus immediately returned on next response creation.35623563            - `defer_loading: optional boolean`35643565              Whether this tool should be deferred and discovered via tool search.35663567            - `description: optional string`35683569              Optional description of the custom tool, used to provide more context.35703571            - `format: optional CustomToolInputFormat`35723573              The input format for the custom tool. Default is unconstrained text.35743575        - `type: "namespace"`35763577          The type of the tool. Always `namespace`.35783579          - `"namespace"`35803581      - `ToolSearch object { type, description, execution, parameters }`35823583        Hosted or BYOT tool search configuration for deferred tools.35843585        - `type: "tool_search"`35863587          The type of the tool. Always `tool_search`.35883589          - `"tool_search"`35903591        - `description: optional string or null`35923593          Description shown to the model for a client-executed tool search tool.35943595        - `execution: optional "server" or "client"`35963597          Whether tool search is executed by the server or by the client.35983599          - `"server"`36003601          - `"client"`36023603        - `parameters: optional unknown or null`36043605          Parameter schema for a client-executed tool search tool.36063607      - `WebSearchPreview object { type, search_content_types, search_context_size, user_location }`36083609        This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).36103611        - `type: "web_search_preview" or "web_search_preview_2025_03_11"`36123613          The type of the web search tool. One of `web_search_preview` or `web_search_preview_2025_03_11`.36143615          - `"web_search_preview"`36163617          - `"web_search_preview_2025_03_11"`36183619        - `search_content_types: optional array of "text" or "image"`36203621          - `"text"`36223623          - `"image"`36243625        - `search_context_size: optional "low" or "medium" or "high"`36263627          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.36283629          - `"low"`36303631          - `"medium"`36323633          - `"high"`36343635        - `user_location: optional object { type, city, country, 2 more }  or null`36363637          The user's location.36383639          - `type: "approximate"`36403641            The type of location approximation. Always `approximate`.36423643            - `"approximate"`36443645          - `city: optional string or null`36463647            Free text input for the city of the user, e.g. `San Francisco`.36483649          - `country: optional string or null`36503651            The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.36523653          - `region: optional string or null`36543655            Free text input for the region of the user, e.g. `California`.36563657          - `timezone: optional string or null`36583659            The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.36603661      - `ApplyPatch object { type, allowed_callers }`36623663        Allows the assistant to create, delete, or update files using unified diffs.36643665        - `type: "apply_patch"`36663667          The type of the tool. Always `apply_patch`.36683669          - `"apply_patch"`36703671        - `allowed_callers: optional array of "direct" or "programmatic" or null`36723673          The tool invocation context(s).36743675          - `"direct"`36763677          - `"programmatic"`36783679    - `type: "additional_tools"`36803681      The item type. Always `additional_tools`.36823683      - `"additional_tools"`36843685    - `id: optional string or null`36863687      The unique ID of this additional tools item.36883689  - `ConfigurationUpdate object { type, id, reasoning }`36903691    An update to the conversation's response configuration. The configuration3692    remains in effect for subsequent responses until it is replaced by another3693    configuration update.36943695    - `type: "configuration_update"`36963697      The item type. Always `configuration_update`.36983699      - `"configuration_update"`37003701    - `id: optional string or null`37023703      The unique ID of the configuration update item.37043705    - `reasoning: optional object { effort }`37063707      Updates to reasoning configuration. Only effort is supported.37083709      - `effort: optional ReasoningEffort or null`37103711        The reasoning effort to use for subsequent responses until another3712        configuration update replaces it.37133714        - `"none"`37153716        - `"minimal"`37173718        - `"low"`37193720        - `"medium"`37213722        - `"high"`37233724        - `"xhigh"`37253726        - `"max"`37273728  - `Reasoning object { id, summary, type, 3 more }`37293730    A description of the chain of thought used by a reasoning model while generating3731    a response. Be sure to include these items in your `input` to the Responses API3732    for subsequent turns of a conversation if you are manually3733    [managing context](https://developers.openai.com/api/docs/guides/conversation-state).37343735    - `id: string`37363737      The unique identifier of the reasoning content.37383739    - `summary: array of SummaryTextContent`37403741      Reasoning summary content.37423743      - `text: string`37443745        A summary of the reasoning output from the model so far.37463747      - `type: "summary_text"`37483749        The type of the object. Always `summary_text`.37503751        - `"summary_text"`37523753    - `type: "reasoning"`37543755      The type of the object. Always `reasoning`.37563757      - `"reasoning"`37583759    - `content: optional array of object { text, type }`37603761      Reasoning text content.37623763      - `text: string`37643765        The reasoning text from the model.37663767      - `type: "reasoning_text"`37683769        The type of the reasoning text. Always `reasoning_text`.37703771        - `"reasoning_text"`37723773    - `encrypted_content: optional string or null`37743775      The encrypted content of the reasoning item. This is populated by default3776      for reasoning items returned by `POST /v1/responses` and WebSocket3777      `response.create` requests.37783779      When streaming, use the completed reasoning item and its3780      `encrypted_content` from the `response.output_item.done` event in3781      subsequent requests. The `encrypted_content` in3782      `response.output_item.added` may be incomplete. This is especially3783      important when `store` is `false` or when using Zero Data Retention.37843785    - `status: optional "in_progress" or "completed" or "incomplete"`37863787      The status of the item. One of `in_progress`, `completed`, or3788      `incomplete`. Populated when items are returned via API.37893790      - `"in_progress"`37913792      - `"completed"`37933794      - `"incomplete"`37953796  - `Compaction object { encrypted_content, type, id }`37973798    A compaction item generated by the [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).37993800    - `encrypted_content: string`38013802      The encrypted content of the compaction summary.38033804    - `type: "compaction"`38053806      The type of the item. Always `compaction`.38073808      - `"compaction"`38093810    - `id: optional string or null`38113812      The ID of the compaction item.38133814  - `ImageGenerationCall object { id, result, status, 7 more }`38153816    An image generation request made by the model.38173818    - `id: string`38193820      The unique ID of the image generation call.38213822    - `result: string or null`38233824      The generated image encoded in base64.38253826    - `status: "in_progress" or "completed" or "generating" or "failed"`38273828      The status of the image generation call.38293830      - `"in_progress"`38313832      - `"completed"`38333834      - `"generating"`38353836      - `"failed"`38373838    - `type: "image_generation_call"`38393840      The type of the image generation call. Always `image_generation_call`.38413842      - `"image_generation_call"`38433844    - `action: optional "generate" or "edit" or "auto" or null`38453846      The action used for image generation.38473848      - `"generate"`38493850      - `"edit"`38513852      - `"auto"`38533854    - `background: optional "transparent" or "opaque" or "auto" or null`38553856      The background setting used for generation.38573858      - `"transparent"`38593860      - `"opaque"`38613862      - `"auto"`38633864    - `output_format: optional "png" or "webp" or "jpeg" or null`38653866      The output format used for generation.38673868      - `"png"`38693870      - `"webp"`38713872      - `"jpeg"`38733874    - `quality: optional "low" or "medium" or "high" or 3 more or null`38753876      The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.38773878      - `"low"`38793880      - `"medium"`38813882      - `"high"`38833884      - `"xhigh"`38853886      - `"max"`38873888      - `"auto"`38893890    - `revised_prompt: optional string or null`38913892      The prompt that was used after any model prompt rewriting.38933894    - `size: optional string or "1024x1024" or "1024x1536" or "1536x1024" or null`38953896      The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.38973898      - `string`38993900      - `"1024x1024" or "1024x1536" or "1536x1024"`39013902        The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.39033904        - `"1024x1024"`39053906        - `"1024x1536"`39073908        - `"1536x1024"`39093910  - `CodeInterpreterCall object { id, code, container_id, 3 more }`39113912    A tool call to run code.39133914    - `id: string`39153916      The unique ID of the code interpreter tool call.39173918    - `code: string or null`39193920      The code to run, or null if not available.39213922    - `container_id: string`39233924      The ID of the container used to run the code.39253926    - `outputs: array of object { logs, type }  or object { type, url }  or null`39273928      The outputs generated by the code interpreter, such as logs or images.3929      Can be null if no outputs are available.39303931      - `Logs object { logs, type }`39323933        The logs output from the code interpreter.39343935        - `logs: string`39363937          The logs output from the code interpreter.39383939        - `type: "logs"`39403941          The type of the output. Always `logs`.39423943          - `"logs"`39443945      - `Image object { type, url }`39463947        The image output from the code interpreter.39483949        - `type: "image"`39503951          The type of the output. Always `image`.39523953          - `"image"`39543955        - `url: string`39563957          The URL of the image output from the code interpreter.39583959    - `status: "in_progress" or "completed" or "incomplete" or 2 more`39603961      The status of the code interpreter tool call. Valid values are `in_progress`, `completed`, `incomplete`, `interpreting`, and `failed`.39623963      - `"in_progress"`39643965      - `"completed"`39663967      - `"incomplete"`39683969      - `"interpreting"`39703971      - `"failed"`39723973    - `type: "code_interpreter_call"`39743975      The type of the code interpreter tool call. Always `code_interpreter_call`.39763977      - `"code_interpreter_call"`39783979  - `LocalShellCall object { id, action, call_id, 2 more }`39803981    A tool call to run a command on the local shell.39823983    - `id: string`39843985      The unique ID of the local shell call.39863987    - `action: object { command, env, type, 3 more }`39883989      Execute a shell command on the server.39903991      - `command: array of string`39923993        The command to run.39943995      - `env: map[string]`39963997        Environment variables to set for the command.39983999      - `type: "exec"`40004001        The type of the local shell action. Always `exec`.40024003        - `"exec"`40044005      - `timeout_ms: optional number or null`40064007        Optional timeout in milliseconds for the command.40084009      - `user: optional string or null`40104011        Optional user to run the command as.40124013      - `working_directory: optional string or null`40144015        Optional working directory to run the command in.40164017    - `call_id: string`40184019      The unique ID of the local shell tool call generated by the model.40204021    - `status: "in_progress" or "completed" or "incomplete"`40224023      The status of the local shell call.40244025      - `"in_progress"`40264027      - `"completed"`40284029      - `"incomplete"`40304031    - `type: "local_shell_call"`40324033      The type of the local shell call. Always `local_shell_call`.40344035      - `"local_shell_call"`40364037  - `LocalShellCallOutput object { id, output, type, status }`40384039    The output of a local shell tool call.40404041    - `id: string`40424043      The unique ID of the local shell tool call generated by the model.40444045    - `output: string`40464047      A JSON string of the output of the local shell tool call.40484049    - `type: "local_shell_call_output"`40504051      The type of the local shell tool call output. Always `local_shell_call_output`.40524053      - `"local_shell_call_output"`40544055    - `status: optional "in_progress" or "completed" or "incomplete" or null`40564057      The status of the item. One of `in_progress`, `completed`, or `incomplete`.40584059      - `"in_progress"`40604061      - `"completed"`40624063      - `"incomplete"`40644065  - `ShellCall object { action, call_id, type, 4 more }`40664067    A tool representing a request to execute one or more shell commands.40684069    - `action: object { commands, max_output_length, timeout_ms }`40704071      The shell commands and limits that describe how to run the tool call.40724073      - `commands: array of string`40744075        Ordered shell commands for the execution environment to run.40764077      - `max_output_length: optional number or null`40784079        Maximum number of UTF-8 characters to capture from combined stdout and stderr output.40804081      - `timeout_ms: optional number or null`40824083        Maximum wall-clock time in milliseconds to allow the shell commands to run.40844085    - `call_id: string`40864087      The unique ID of the shell tool call generated by the model.40884089    - `type: "shell_call"`40904091      The type of the item. Always `shell_call`.40924093      - `"shell_call"`40944095    - `id: optional string or null`40964097      The unique ID of the shell tool call. Populated when this item is returned via API.40984099    - `caller: optional object { type }  or object { caller_id, type }  or null`41004101      The execution context that produced this tool call.41024103      - `Direct object { type }`41044105        - `type: "direct"`41064107          The caller type. Always `direct`.41084109          - `"direct"`41104111      - `Program object { caller_id, type }`41124113        - `caller_id: string`41144115          The call ID of the program item that produced this tool call.41164117        - `type: "program"`41184119          The caller type. Always `program`.41204121          - `"program"`41224123    - `environment: optional LocalEnvironment or ContainerReference or null`41244125      The environment to execute the shell commands in.41264127      - `LocalEnvironment object { type, skills }`41284129      - `ContainerReference object { container_id, type }`41304131    - `status: optional "in_progress" or "completed" or "incomplete" or null`41324133      The status of the shell call. One of `in_progress`, `completed`, or `incomplete`.41344135      - `"in_progress"`41364137      - `"completed"`41384139      - `"incomplete"`41404141  - `ShellCallOutput object { call_id, output, type, 4 more }`41424143    The streamed output items emitted by a shell tool call.41444145    - `call_id: string`41464147      The unique ID of the shell tool call generated by the model.41484149    - `output: array of ResponseFunctionShellCallOutputContent`41504151      Captured chunks of stdout and stderr output, along with their associated outcomes.41524153      - `outcome: object { type }  or object { exit_code, type }`41544155        The exit or timeout outcome associated with this shell call.41564157        - `Timeout object { type }`41584159          Indicates that the shell call exceeded its configured time limit.41604161          - `type: "timeout"`41624163            The outcome type. Always `timeout`.41644165            - `"timeout"`41664167        - `Exit object { exit_code, type }`41684169          Indicates that the shell commands finished and returned an exit code.41704171          - `exit_code: number`41724173            The exit code returned by the shell process.41744175          - `type: "exit"`41764177            The outcome type. Always `exit`.41784179            - `"exit"`41804181      - `stderr: string`41824183        Captured stderr output for the shell call.41844185      - `stdout: string`41864187        Captured stdout output for the shell call.41884189    - `type: "shell_call_output"`41904191      The type of the item. Always `shell_call_output`.41924193      - `"shell_call_output"`41944195    - `id: optional string or null`41964197      The unique ID of the shell tool call output. Populated when this item is returned via API.41984199    - `caller: optional object { type }  or object { caller_id, type }  or null`42004201      The execution context that produced this tool call.42024203      - `Direct object { type }`42044205        - `type: "direct"`42064207          The caller type. Always `direct`.42084209          - `"direct"`42104211      - `Program object { caller_id, type }`42124213        - `caller_id: string`42144215          The call ID of the program item that produced this tool call.42164217        - `type: "program"`42184219          The caller type. Always `program`.42204221          - `"program"`42224223    - `max_output_length: optional number or null`42244225      The maximum number of UTF-8 characters captured for this shell call's combined output.42264227    - `status: optional "in_progress" or "completed" or "incomplete" or null`42284229      The status of the shell call output.42304231      - `"in_progress"`42324233      - `"completed"`42344235      - `"incomplete"`42364237  - `ApplyPatchCall object { call_id, operation, status, 3 more }`42384239    A tool call representing a request to create, delete, or update files using diff patches.42404241    - `call_id: string`42424243      The unique ID of the apply patch tool call generated by the model.42444245    - `operation: object { diff, path, type }  or object { path, type }  or object { diff, path, type }`42464247      The specific create, delete, or update instruction for the apply_patch tool call.42484249      - `CreateFile object { diff, path, type }`42504251        Instruction for creating a new file via the apply_patch tool.42524253        - `diff: string`42544255          Unified diff content to apply when creating the file.42564257        - `path: string`42584259          Path of the file to create relative to the workspace root.42604261        - `type: "create_file"`42624263          The operation type. Always `create_file`.42644265          - `"create_file"`42664267      - `DeleteFile object { path, type }`42684269        Instruction for deleting an existing file via the apply_patch tool.42704271        - `path: string`42724273          Path of the file to delete relative to the workspace root.42744275        - `type: "delete_file"`42764277          The operation type. Always `delete_file`.42784279          - `"delete_file"`42804281      - `UpdateFile object { diff, path, type }`42824283        Instruction for updating an existing file via the apply_patch tool.42844285        - `diff: string`42864287          Unified diff content to apply to the existing file.42884289        - `path: string`42904291          Path of the file to update relative to the workspace root.42924293        - `type: "update_file"`42944295          The operation type. Always `update_file`.42964297          - `"update_file"`42984299    - `status: "in_progress" or "completed"`43004301      The status of the apply patch tool call. One of `in_progress` or `completed`.43024303      - `"in_progress"`43044305      - `"completed"`43064307    - `type: "apply_patch_call"`43084309      The type of the item. Always `apply_patch_call`.43104311      - `"apply_patch_call"`43124313    - `id: optional string or null`43144315      The unique ID of the apply patch tool call. Populated when this item is returned via API.43164317    - `caller: optional object { type }  or object { caller_id, type }  or null`43184319      The execution context that produced this tool call.43204321      - `Direct object { type }`43224323        - `type: "direct"`43244325          The caller type. Always `direct`.43264327          - `"direct"`43284329      - `Program object { caller_id, type }`43304331        - `caller_id: string`43324333          The call ID of the program item that produced this tool call.43344335        - `type: "program"`43364337          The caller type. Always `program`.43384339          - `"program"`43404341  - `ApplyPatchCallOutput object { call_id, status, type, 3 more }`43424343    The streamed output emitted by an apply patch tool call.43444345    - `call_id: string`43464347      The unique ID of the apply patch tool call generated by the model.43484349    - `status: "completed" or "failed"`43504351      The status of the apply patch tool call output. One of `completed` or `failed`.43524353      - `"completed"`43544355      - `"failed"`43564357    - `type: "apply_patch_call_output"`43584359      The type of the item. Always `apply_patch_call_output`.43604361      - `"apply_patch_call_output"`43624363    - `id: optional string or null`43644365      The unique ID of the apply patch tool call output. Populated when this item is returned via API.43664367    - `caller: optional object { type }  or object { caller_id, type }  or null`43684369      The execution context that produced this tool call.43704371      - `Direct object { type }`43724373        - `type: "direct"`43744375          The caller type. Always `direct`.43764377          - `"direct"`43784379      - `Program object { caller_id, type }`43804381        - `caller_id: string`43824383          The call ID of the program item that produced this tool call.43844385        - `type: "program"`43864387          The caller type. Always `program`.43884389          - `"program"`43904391    - `output: optional string or null`43924393      Optional human-readable log text from the apply patch tool (e.g., patch results or errors).43944395  - `McpListTools object { id, server_label, tools, 2 more }`43964397    A list of tools available on an MCP server.43984399    - `id: string`44004401      The unique ID of the list.44024403    - `server_label: string`44044405      The label of the MCP server.44064407    - `tools: array of object { input_schema, name, annotations, description }`44084409      The tools available on the server.44104411      - `input_schema: unknown`44124413        The JSON schema describing the tool's input.44144415      - `name: string`44164417        The name of the tool.44184419      - `annotations: optional unknown or null`44204421        Additional annotations about the tool.44224423      - `description: optional string or null`44244425        The description of the tool.44264427    - `type: "mcp_list_tools"`44284429      The type of the item. Always `mcp_list_tools`.44304431      - `"mcp_list_tools"`44324433    - `error: optional string or null`44344435      Error message if the server could not list tools.44364437  - `McpApprovalRequest object { id, arguments, name, 2 more }`44384439    A request for human approval of a tool invocation.44404441    - `id: string`44424443      The unique ID of the approval request.44444445    - `arguments: string`44464447      A JSON string of arguments for the tool.44484449    - `name: string`44504451      The name of the tool to run.44524453    - `server_label: string`44544455      The label of the MCP server making the request.44564457    - `type: "mcp_approval_request"`44584459      The type of the item. Always `mcp_approval_request`.44604461      - `"mcp_approval_request"`44624463  - `McpApprovalResponse object { approval_request_id, approve, type, 2 more }`44644465    A response to an MCP approval request.44664467    - `approval_request_id: string`44684469      The ID of the approval request being answered.44704471    - `approve: boolean`44724473      Whether the request was approved.44744475    - `type: "mcp_approval_response"`44764477      The type of the item. Always `mcp_approval_response`.44784479      - `"mcp_approval_response"`44804481    - `id: optional string or null`44824483      The unique ID of the approval response44844485    - `reason: optional string or null`44864487      Optional reason for the decision.44884489  - `McpCall object { id, arguments, name, 6 more }`44904491    An invocation of a tool on an MCP server.44924493    - `id: string`44944495      The unique ID of the tool call.44964497    - `arguments: string`44984499      A JSON string of the arguments passed to the tool.45004501    - `name: string`45024503      The name of the tool that was run.45044505    - `server_label: string`45064507      The label of the MCP server running the tool.45084509    - `type: "mcp_call"`45104511      The type of the item. Always `mcp_call`.45124513      - `"mcp_call"`45144515    - `approval_request_id: optional string or null`45164517      Unique identifier for the MCP tool call approval request.4518      Include this value in a subsequent `mcp_approval_response` input to approve or reject the corresponding tool call.45194520    - `error: optional McpToolCallError or null`45214522      The error from the tool call, if any.45234524      - `McpProtocolError object { code, message, type }`45254526        - `code: number`45274528        - `message: string`45294530        - `type: "mcp_protocol_error"`45314532          - `"mcp_protocol_error"`45334534      - `McpToolExecutionError object { content, type }`45354536        - `content: unknown`45374538        - `type: "mcp_tool_execution_error"`45394540          - `"mcp_tool_execution_error"`45414542      - `HTTPError object { code, message, type }`45434544        - `code: number`45454546        - `message: string`45474548        - `type: "http_error"`45494550          - `"http_error"`45514552    - `output: optional string or null`45534554      The output from the tool call.45554556    - `status: optional "in_progress" or "completed" or "incomplete" or 2 more`45574558      The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `calling`, or `failed`.45594560      - `"in_progress"`45614562      - `"completed"`45634564      - `"incomplete"`45654566      - `"calling"`45674568      - `"failed"`45694570  - `CustomToolCallOutput object { call_id, output, type, 2 more }`45714572    The output of a custom tool call from your code, being sent back to the model.45734574    - `call_id: string`45754576      The call ID, used to map this custom tool call output to a custom tool call.45774578    - `output: string or array of ResponseInputText or ResponseInputImage or ResponseInputFile`45794580      The output from the custom tool call generated by your code.4581      Can be a string or an list of output content.45824583      - `StringOutput = string`45844585        A string of the output of the custom tool call.45864587      - `OutputContentList = array of ResponseInputText or ResponseInputImage or ResponseInputFile`45884589        Text, image, or file output of the custom tool call.45904591        - `ResponseInputText object { text, type, prompt_cache_breakpoint }`45924593          A text input to the model.45944595        - `ResponseInputImage object { detail, type, file_id, 2 more }`45964597          An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).45984599        - `ResponseInputFile object { type, detail, file_data, 4 more }`46004601          A file input to the model.46024603    - `type: "custom_tool_call_output"`46044605      The type of the custom tool call output. Always `custom_tool_call_output`.46064607      - `"custom_tool_call_output"`46084609    - `id: optional string`46104611      The unique ID of the custom tool call output in the OpenAI platform.46124613    - `caller: optional object { type }  or object { caller_id, type }  or null`46144615      The execution context that produced this tool call.46164617      - `Direct object { type }`46184619        - `type: "direct"`46204621          The caller type. Always `direct`.46224623          - `"direct"`46244625      - `Program object { caller_id, type }`46264627        - `caller_id: string`46284629          The call ID of the program item that produced this tool call.46304631        - `type: "program"`46324633          The caller type. Always `program`.46344635          - `"program"`46364637  - `CustomToolCall object { call_id, input, name, 5 more }`46384639    A call to a custom tool created by the model.46404641    - `call_id: string`46424643      An identifier used to map this custom tool call to a tool call output.46444645    - `input: string`46464647      The input for the custom tool call generated by the model.46484649    - `name: string`46504651      The name of the custom tool being called.46524653    - `type: "custom_tool_call"`46544655      The type of the custom tool call. Always `custom_tool_call`.46564657      - `"custom_tool_call"`46584659    - `id: optional string`46604661      The unique ID of the custom tool call in the OpenAI platform.46624663    - `async: optional boolean`46644665      Whether the custom tool call runs asynchronously.46664667    - `caller: optional object { type }  or object { caller_id, type }  or null`46684669      The execution context that produced this tool call.46704671      - `Direct object { type }`46724673        - `type: "direct"`46744675          - `"direct"`46764677      - `Program object { caller_id, type }`46784679        - `caller_id: string`46804681          The call ID of the program item that produced this tool call.46824683        - `type: "program"`46844685          - `"program"`46864687    - `namespace: optional string`46884689      The namespace of the custom tool being called.46904691  - `CompactionTrigger object { type, id }`46924693    Compacts the current context. Must be the final input item.46944695    - `type: "compaction_trigger"`46964697      The type of the item. Always `compaction_trigger`.46984699      - `"compaction_trigger"`47004701    - `id: optional string or null`47024703      The unique ID of this compaction trigger.47044705  - `ItemReference object { id, type }`47064707    An internal identifier for an item to reference.47084709    - `id: string`47104711      The ID of the item to reference.47124713    - `type: optional "item_reference" or null`47144715      The type of item to reference. Always `item_reference`.47164717      - `"item_reference"`47184719  - `Program object { id, call_id, code, 2 more }`47204721    - `id: string`47224723      The unique ID of this program item.47244725    - `call_id: string`47264727      The stable call ID of the program item.47284729    - `code: string`47304731      The JavaScript source executed by programmatic tool calling.47324733    - `fingerprint: string`47344735      Opaque program replay fingerprint that must be round-tripped.47364737    - `type: "program"`47384739      The item type. Always `program`.47404741      - `"program"`47424743  - `ProgramOutput object { id, call_id, result, 2 more }`47444745    - `id: string`47464747      The unique ID of this program output item.47484749    - `call_id: string`47504751      The call ID of the program item.47524753    - `result: string`47544755      The result produced by the program item.47564757    - `status: "completed" or "incomplete"`47584759      The terminal status of the program output.47604761      - `"completed"`47624763      - `"incomplete"`47644765    - `type: "program_output"`47664767      The item type. Always `program_output`.47684769      - `"program_output"`47704771- `type: "response.item.create"`47724773  The Live client event type. Always `response.item.create`.47744775  - `"response.item.create"`47764777- `event_id: optional string or null`47784779  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.47804781#### Example47824783```json4784{4785  "type": "response.item.create",4786  "event_id": "evt_item_001",4787  "item": {4788    "type": "message",4789    "role": "user",4790    "content": [4791      {4792        "type": "input_text",4793        "text": "Please check for a table for two at 7 PM."4794      }4795    ]4796  }4797}4798```47994800<a id="response.create"></a>48014802### response.create48034804Request a response from the Live session’s Responses backend, or continue a delegated response waiting for tool results. Requires Responses delegation.48054806#### Schema48074808Schema name: `LiveResponseCreateParam`48094810- `type: "response.create"`48114812  The Live client event type. Always `response.create`.48134814  - `"response.create"`48154816- `event_id: optional string or null`48174818  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.48194820#### Example48214822```json4823{4824  "type": "response.create",4825  "event_id": "evt_response_001"4826}4827```48284829<a id="session.close"></a>48304831### session.close48324833Request that the Live session close. The terminal `session.closed` event contains the close reason and final usage.48344835#### Schema48364837Schema name: `LiveSessionCloseParam`48384839- `type: "session.close"`48404841  The Live client event type. Always `session.close`.48424843  - `"session.close"`48444845- `event_id: optional string or null`48464847  Optional client identifier for correlating this command with a server event's client_event_id or error.client_event_id.48484849#### Example48504851```json4852{4853  "type": "session.close",4854  "event_id": "evt_close_001"4855}4856```48574858<a id="server-events"></a>48594860## Server events48614862<a id="session.started"></a>48634864### session.started48654866Returned when a Live session has started. Contains the resolved session configuration, including server defaults.48674868#### Schema48694870Schema name: `LiveSessionStarted`48714872- `event_id: string`48734874  The unique ID of the Live server event.48754876- `session: SessionResource`48774878  The resolved Live session configuration and server-assigned session metadata.48794880  - `id: string`48814882    The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download.48834884  - `expires_at: number`48854886    The Unix timestamp, in seconds, at which the Live session expires.48874888  - `model: string or "gpt-live-1"`48894890    The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.48914892    - `string`48934894    - `"gpt-live-1"`48954896      The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.48974898      - `"gpt-live-1"`48994900  - `status: "active"`49014902    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.49034904    - `"active"`49054906  - `audio: optional object { format, output }`49074908    Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.49094910    - `format: optional AudioFormat`49114912      Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.49134914      - `AudioPCM object { rate, type }`49154916        Raw, mono 16-bit little-endian PCM audio for a Live WebSocket connection.49174918        - `rate: 16000 or 24000`49194920          Audio sample rate in hertz. Live WebSocket PCM audio supports 16000 or 24000 Hz.49214922          - `16000`49234924          - `24000`49254926        - `type: "audio/pcm"`49274928          The audio encoding. Always `audio/pcm`.49294930          - `"audio/pcm"`49314932      - `AudioPCMU object { rate, type }`49334934        Raw, mono G.711 μ-law audio for a Live WebSocket connection.49354936        - `rate: number`49374938          Audio sample rate in hertz. G.711 audio uses 8000 Hz.49394940        - `type: "audio/pcmu"`49414942          The audio encoding. Always `audio/pcmu`.49434944          - `"audio/pcmu"`49454946      - `AudioPCMA object { rate, type }`49474948        Raw, mono G.711 A-law audio for a Live WebSocket connection.49494950        - `rate: number`49514952          Audio sample rate in hertz. G.711 audio uses 8000 Hz.49534954        - `type: "audio/pcma"`49554956          The audio encoding. Always `audio/pcma`.49574958          - `"audio/pcma"`49594960    - `output: optional object { voice }`49614962      The voice used for speech generated by the Live model.49634964      - `voice: optional string or "alloy" or "ash" or "ballad" or 19 more or CustomVoice`49654966        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.49674968        - `string`49694970        - `"alloy" or "ash" or "ballad" or 19 more`49714972          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.49734974          - `"alloy"`49754976          - `"ash"`49774978          - `"ballad"`49794980          - `"beacon"`49814982          - `"bossa"`49834984          - `"cedar"`49854986          - `"cinder"`49874988          - `"coral"`49894990          - `"delta"`49914992          - `"echo"`49934994          - `"gleam"`49954996          - `"marin"`49974998          - `"meridian"`49995000          - `"quartz"`50015002          - `"ripple"`50035004          - `"sage"`50055006          - `"shimmer"`50075008          - `"stone"`50095010          - `"tempo"`50115012          - `"verse"`50135014          - `"vesper"`50155016          - `"willow"`50175018        - `CustomVoice object { id }`50195020          - `id: string`50215022  - `client: optional ClientConfig`50235024    Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.50255026    - `data_channel: DataChannelConfig`50275028      Client and server event permissions for the WebRTC frontend data channel.50295030      - `allowed_client_events: optional "all" or array of string`50315032        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.50335034        - `"all"`50355036          - `"all"`50375038        - `array of string`50395040      - `allowed_server_events: optional "all" or array of ServerEventSelector`50415042        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.50435044        - `"all"`50455046          - `"all"`50475048        - `array of ServerEventSelector`50495050          - `type: string`50515052            The outer Live server event type. Use 'response.event' for Responses events.50535054          - `response_event: optional string`50555056            The nested Responses event type. Required when type is 'response.event'; forbidden for other event types.50575058  - `delegation: optional ClientDelegation or object { responses, type }  or null`50595060    Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.50615062    - `ClientDelegation object { type }`50635064      Delegate tasks to your application. The Live session emits delegation events that your backend handles.50655066      - `type: "client"`50675068        The delegation owner. Always `client` for tasks handled by your application.50695070        - `"client"`50715072    - `Responses object { responses, type }`50735074      Delegate tasks to a Responses model managed by the Live session.50755076      - `responses: ResponsesDelegationConfig`50775078        Backend model, prompt, and tools used when the Live session delegates a task to Responses.50795080        - `model: string`50815082          The model used for server-owned Responses delegations.50835084        - `instructions: optional string or null`50855086          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).50875088        - `max_output_tokens: optional number or null`50895090          Maximum number of output tokens for each delegated response.50915092        - `parallel_tool_calls: optional boolean or null`50935094          Whether the delegated Responses model may request multiple tool calls in a single response.50955096        - `reasoning: optional object { effort, summary }  or null`50975098          Reasoning settings passed to each delegated Responses request.50995100          - `effort: optional "none" or "minimal" or "low" or 3 more or null`51015102            How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.51035104            - `"none"`51055106            - `"minimal"`51075108            - `"low"`51095110            - `"medium"`51115112            - `"high"`51135114            - `"xhigh"`51155116          - `summary: optional "concise" or "detailed" or "auto" or null`51175118            The reasoning summary to request from the delegated Responses model, when supported.51195120            - `"concise"`51215122            - `"detailed"`51235124            - `"auto"`51255126        - `service_tier: optional "auto" or "default" or "fast_tier_temp_pilot" or 3 more or null`51275128          Service tier for delegated Responses requests.51295130          - `"auto"`51315132          - `"default"`51335134          - `"fast_tier_temp_pilot"`51355136          - `"flex"`51375138          - `"priority"`51395140          - `"ultrafast"`51415142        - `text: optional object { verbosity }  or null`51435144          Text generation settings passed to each delegated Responses request.51455146          - `verbosity: optional "low" or "medium" or "high" or null`51475148            The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.51495150            - `"low"`51515152            - `"medium"`51535154            - `"high"`51555156        - `tool_choice: optional "auto" or "none" or "required" or object { name, type }  or object { name, server_label, type }`51575158          Controls which tool the Responses backend uses when handling a task delegated by the Live model.51595160          - `LiveToolChoiceEnum = "auto" or "none" or "required"`51615162            - `"auto"`51635164            - `"none"`51655166            - `"required"`51675168          - `LiveFunctionToolChoiceParam object { name, type }`51695170            - `name: string`51715172            - `type: "function"`51735174              - `"function"`51755176          - `LiveMCPToolChoiceParam object { name, server_label, type }`51775178            - `name: string`51795180            - `server_label: string`51815182            - `type: "mcp"`51835184              - `"mcp"`51855186        - `tools: optional array of FunctionTool or object { type }`51875188          Tools available to the Responses backend while it handles tasks delegated by the Live model.51895190          - `FunctionTool object { name, type, description, 2 more }`51915192            A function tool available to the Responses backend when the Live model delegates a task.51935194            - `name: string`51955196              The name the delegated Responses model uses when calling this function.51975198            - `type: "function"`51995200              The tool type. Always `function`.52015202              - `"function"`52035204            - `description: optional string or null`52055206              What the function does and when the delegated Responses model should call it.52075208            - `parameters: optional map[unknown] or null`52095210              A JSON Schema object describing the arguments accepted by the function.52115212            - `strict: optional boolean or null`52135214              Whether the delegated Responses model must follow the function’s parameter schema exactly.52155216          - `WebSearch object { type }`52175218            A web search tool available to the Live session’s Responses backend.52195220            - `type: "web_search"`52215222              The tool type. Always `web_search`.52235224              - `"web_search"`52255226      - `type: "responses"`52275228        The delegation owner. Always `responses` for tasks handled by the Responses API.52295230        - `"responses"`52315232  - `input: optional array of InitialItem`52335234    Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.52355236    - `Developer object { content, role, id, 2 more }`52375238      A developer message included in the initial text history of a Live session.52395240      - `content: array of object { text, type }`52415242        The message content. Supply exactly one text part for the initial Live conversation history.52435244        - `text: string`52455246          The message text to include in the Live session’s initial conversation history.52475248        - `type: optional "input_text"`52495250          The text content type. Always `input_text`.52515252          - `"input_text"`52535254      - `role: "developer"`52555256        The author of this history message. Always `developer`.52575258        - `"developer"`52595260      - `id: optional string or null`52615262        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.52635264      - `status: optional "incomplete" or "completed" or null`52655266        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.52675268        - `"incomplete"`52695270        - `"completed"`52715272      - `type: optional "message"`52735274        The history item type. Always `message`.52755276        - `"message"`52775278    - `User object { content, role, id, 2 more }`52795280      A user message included in the initial text history of a Live session.52815282      - `content: array of object { text, type }`52835284        The message content. Supply exactly one text part for the initial Live conversation history.52855286        - `text: string`52875288          The message text to include in the Live session’s initial conversation history.52895290        - `type: optional "input_text"`52915292          The text content type. Always `input_text`.52935294          - `"input_text"`52955296      - `role: "user"`52975298        The author of this history message. Always `user`.52995300        - `"user"`53015302      - `id: optional string or null`53035304        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.53055306      - `status: optional "incomplete" or "completed" or null`53075308        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.53095310        - `"incomplete"`53115312        - `"completed"`53135314      - `type: optional "message"`53155316        The history item type. Always `message`.53175318        - `"message"`53195320    - `Assistant object { content, role, id, 2 more }`53215322      An assistant message included in the initial text history of a Live session.53235324      - `content: array of object { text, type }  or object { text, type }`53255326        The message content. Supply exactly one text part for the initial Live conversation history.53275328        - `Text object { text, type }`53295330          Assistant text supplied as conversation history when starting a Live session.53315332          - `text: string`53335334            The message text to include in the Live session’s initial conversation history.53355336          - `type: optional "text"`53375338            The text content type. Always `text`.53395340            - `"text"`53415342        - `OutputText object { text, type }`53435344          Assistant output text supplied as conversation history when starting a Live session.53455346          - `text: string`53475348            The message text to include in the Live session’s initial conversation history.53495350          - `type: "output_text"`53515352            The text content type. Always `output_text`.53535354            - `"output_text"`53555356      - `role: "assistant"`53575358        The author of this history message. Always `assistant`.53595360        - `"assistant"`53615362      - `id: optional string or null`53635364        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.53655366      - `status: optional "incomplete" or "completed" or null`53675368        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.53695370        - `"incomplete"`53715372        - `"completed"`53735374      - `type: optional "message"`53755376        The history item type. Always `message`.53775378        - `"message"`53795380  - `instructions: optional string or null`53815382    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.53835384  - `store: optional boolean`53855386    Whether to store the session for later forking and recording download. Defaults to false for new sessions.53875388- `type: "session.started"`53895390  The event type, always `session.started`.53915392  - `"session.started"`53935394- `client_event_id: optional string`53955396  The event_id of the client command associated with this server event, when supplied.53975398#### Example53995400```json5401{5402  "type": "session.started",5403  "event_id": "evt_started_001",5404  "client_event_id": "evt_start_001",5405  "session": {5406    "id": "live_abc123",5407    "model": "gpt-live-1",5408    "status": "active",5409    "expires_at": 1788555600,5410    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",5411    "input": [],5412    "audio": {5413      "format": {5414        "type": "audio/pcm",5415        "rate": 240005416      },5417      "output": {5418        "voice": "marin"5419      }5420    },5421    "delegation": {5422      "type": "client"5423    }5424  }5425}5426```54275428<a id="session.updated"></a>54295430### session.updated54315432Returned when a Live session update is accepted. Contains the resolved session configuration after the update.54335434#### Schema54355436Schema name: `LiveSessionUpdated`54375438- `event_id: string`54395440  The unique ID of the Live server event.54415442- `session: SessionResource`54435444  The resolved Live session configuration and server-assigned session metadata.54455446  - `id: string`54475448    The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download.54495450  - `expires_at: number`54515452    The Unix timestamp, in seconds, at which the Live session expires.54535454  - `model: string or "gpt-live-1"`54555456    The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.54575458    - `string`54595460    - `"gpt-live-1"`54615462      The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.54635464      - `"gpt-live-1"`54655466  - `status: "active"`54675468    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.54695470    - `"active"`54715472  - `audio: optional object { format, output }`54735474    Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.54755476    - `format: optional AudioFormat`54775478      Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.54795480      - `AudioPCM object { rate, type }`54815482        Raw, mono 16-bit little-endian PCM audio for a Live WebSocket connection.54835484        - `rate: 16000 or 24000`54855486          Audio sample rate in hertz. Live WebSocket PCM audio supports 16000 or 24000 Hz.54875488          - `16000`54895490          - `24000`54915492        - `type: "audio/pcm"`54935494          The audio encoding. Always `audio/pcm`.54955496          - `"audio/pcm"`54975498      - `AudioPCMU object { rate, type }`54995500        Raw, mono G.711 μ-law audio for a Live WebSocket connection.55015502        - `rate: number`55035504          Audio sample rate in hertz. G.711 audio uses 8000 Hz.55055506        - `type: "audio/pcmu"`55075508          The audio encoding. Always `audio/pcmu`.55095510          - `"audio/pcmu"`55115512      - `AudioPCMA object { rate, type }`55135514        Raw, mono G.711 A-law audio for a Live WebSocket connection.55155516        - `rate: number`55175518          Audio sample rate in hertz. G.711 audio uses 8000 Hz.55195520        - `type: "audio/pcma"`55215522          The audio encoding. Always `audio/pcma`.55235524          - `"audio/pcma"`55255526    - `output: optional object { voice }`55275528      The voice used for speech generated by the Live model.55295530      - `voice: optional string or "alloy" or "ash" or "ballad" or 19 more or CustomVoice`55315532        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.55335534        - `string`55355536        - `"alloy" or "ash" or "ballad" or 19 more`55375538          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.55395540          - `"alloy"`55415542          - `"ash"`55435544          - `"ballad"`55455546          - `"beacon"`55475548          - `"bossa"`55495550          - `"cedar"`55515552          - `"cinder"`55535554          - `"coral"`55555556          - `"delta"`55575558          - `"echo"`55595560          - `"gleam"`55615562          - `"marin"`55635564          - `"meridian"`55655566          - `"quartz"`55675568          - `"ripple"`55695570          - `"sage"`55715572          - `"shimmer"`55735574          - `"stone"`55755576          - `"tempo"`55775578          - `"verse"`55795580          - `"vesper"`55815582          - `"willow"`55835584        - `CustomVoice object { id }`55855586          - `id: string`55875588  - `client: optional ClientConfig`55895590    Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.55915592    - `data_channel: DataChannelConfig`55935594      Client and server event permissions for the WebRTC frontend data channel.55955596      - `allowed_client_events: optional "all" or array of string`55975598        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.55995600        - `"all"`56015602          - `"all"`56035604        - `array of string`56055606      - `allowed_server_events: optional "all" or array of ServerEventSelector`56075608        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.56095610        - `"all"`56115612          - `"all"`56135614        - `array of ServerEventSelector`56155616          - `type: string`56175618            The outer Live server event type. Use 'response.event' for Responses events.56195620          - `response_event: optional string`56215622            The nested Responses event type. Required when type is 'response.event'; forbidden for other event types.56235624  - `delegation: optional ClientDelegation or object { responses, type }  or null`56255626    Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.56275628    - `ClientDelegation object { type }`56295630      Delegate tasks to your application. The Live session emits delegation events that your backend handles.56315632      - `type: "client"`56335634        The delegation owner. Always `client` for tasks handled by your application.56355636        - `"client"`56375638    - `Responses object { responses, type }`56395640      Delegate tasks to a Responses model managed by the Live session.56415642      - `responses: ResponsesDelegationConfig`56435644        Backend model, prompt, and tools used when the Live session delegates a task to Responses.56455646        - `model: string`56475648          The model used for server-owned Responses delegations.56495650        - `instructions: optional string or null`56515652          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).56535654        - `max_output_tokens: optional number or null`56555656          Maximum number of output tokens for each delegated response.56575658        - `parallel_tool_calls: optional boolean or null`56595660          Whether the delegated Responses model may request multiple tool calls in a single response.56615662        - `reasoning: optional object { effort, summary }  or null`56635664          Reasoning settings passed to each delegated Responses request.56655666          - `effort: optional "none" or "minimal" or "low" or 3 more or null`56675668            How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.56695670            - `"none"`56715672            - `"minimal"`56735674            - `"low"`56755676            - `"medium"`56775678            - `"high"`56795680            - `"xhigh"`56815682          - `summary: optional "concise" or "detailed" or "auto" or null`56835684            The reasoning summary to request from the delegated Responses model, when supported.56855686            - `"concise"`56875688            - `"detailed"`56895690            - `"auto"`56915692        - `service_tier: optional "auto" or "default" or "fast_tier_temp_pilot" or 3 more or null`56935694          Service tier for delegated Responses requests.56955696          - `"auto"`56975698          - `"default"`56995700          - `"fast_tier_temp_pilot"`57015702          - `"flex"`57035704          - `"priority"`57055706          - `"ultrafast"`57075708        - `text: optional object { verbosity }  or null`57095710          Text generation settings passed to each delegated Responses request.57115712          - `verbosity: optional "low" or "medium" or "high" or null`57135714            The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.57155716            - `"low"`57175718            - `"medium"`57195720            - `"high"`57215722        - `tool_choice: optional "auto" or "none" or "required" or object { name, type }  or object { name, server_label, type }`57235724          Controls which tool the Responses backend uses when handling a task delegated by the Live model.57255726          - `LiveToolChoiceEnum = "auto" or "none" or "required"`57275728            - `"auto"`57295730            - `"none"`57315732            - `"required"`57335734          - `LiveFunctionToolChoiceParam object { name, type }`57355736            - `name: string`57375738            - `type: "function"`57395740              - `"function"`57415742          - `LiveMCPToolChoiceParam object { name, server_label, type }`57435744            - `name: string`57455746            - `server_label: string`57475748            - `type: "mcp"`57495750              - `"mcp"`57515752        - `tools: optional array of FunctionTool or object { type }`57535754          Tools available to the Responses backend while it handles tasks delegated by the Live model.57555756          - `FunctionTool object { name, type, description, 2 more }`57575758            A function tool available to the Responses backend when the Live model delegates a task.57595760            - `name: string`57615762              The name the delegated Responses model uses when calling this function.57635764            - `type: "function"`57655766              The tool type. Always `function`.57675768              - `"function"`57695770            - `description: optional string or null`57715772              What the function does and when the delegated Responses model should call it.57735774            - `parameters: optional map[unknown] or null`57755776              A JSON Schema object describing the arguments accepted by the function.57775778            - `strict: optional boolean or null`57795780              Whether the delegated Responses model must follow the function’s parameter schema exactly.57815782          - `WebSearch object { type }`57835784            A web search tool available to the Live session’s Responses backend.57855786            - `type: "web_search"`57875788              The tool type. Always `web_search`.57895790              - `"web_search"`57915792      - `type: "responses"`57935794        The delegation owner. Always `responses` for tasks handled by the Responses API.57955796        - `"responses"`57975798  - `input: optional array of InitialItem`57995800    Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.58015802    - `Developer object { content, role, id, 2 more }`58035804      A developer message included in the initial text history of a Live session.58055806      - `content: array of object { text, type }`58075808        The message content. Supply exactly one text part for the initial Live conversation history.58095810        - `text: string`58115812          The message text to include in the Live session’s initial conversation history.58135814        - `type: optional "input_text"`58155816          The text content type. Always `input_text`.58175818          - `"input_text"`58195820      - `role: "developer"`58215822        The author of this history message. Always `developer`.58235824        - `"developer"`58255826      - `id: optional string or null`58275828        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.58295830      - `status: optional "incomplete" or "completed" or null`58315832        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.58335834        - `"incomplete"`58355836        - `"completed"`58375838      - `type: optional "message"`58395840        The history item type. Always `message`.58415842        - `"message"`58435844    - `User object { content, role, id, 2 more }`58455846      A user message included in the initial text history of a Live session.58475848      - `content: array of object { text, type }`58495850        The message content. Supply exactly one text part for the initial Live conversation history.58515852        - `text: string`58535854          The message text to include in the Live session’s initial conversation history.58555856        - `type: optional "input_text"`58575858          The text content type. Always `input_text`.58595860          - `"input_text"`58615862      - `role: "user"`58635864        The author of this history message. Always `user`.58655866        - `"user"`58675868      - `id: optional string or null`58695870        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.58715872      - `status: optional "incomplete" or "completed" or null`58735874        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.58755876        - `"incomplete"`58775878        - `"completed"`58795880      - `type: optional "message"`58815882        The history item type. Always `message`.58835884        - `"message"`58855886    - `Assistant object { content, role, id, 2 more }`58875888      An assistant message included in the initial text history of a Live session.58895890      - `content: array of object { text, type }  or object { text, type }`58915892        The message content. Supply exactly one text part for the initial Live conversation history.58935894        - `Text object { text, type }`58955896          Assistant text supplied as conversation history when starting a Live session.58975898          - `text: string`58995900            The message text to include in the Live session’s initial conversation history.59015902          - `type: optional "text"`59035904            The text content type. Always `text`.59055906            - `"text"`59075908        - `OutputText object { text, type }`59095910          Assistant output text supplied as conversation history when starting a Live session.59115912          - `text: string`59135914            The message text to include in the Live session’s initial conversation history.59155916          - `type: "output_text"`59175918            The text content type. Always `output_text`.59195920            - `"output_text"`59215922      - `role: "assistant"`59235924        The author of this history message. Always `assistant`.59255926        - `"assistant"`59275928      - `id: optional string or null`59295930        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.59315932      - `status: optional "incomplete" or "completed" or null`59335934        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.59355936        - `"incomplete"`59375938        - `"completed"`59395940      - `type: optional "message"`59415942        The history item type. Always `message`.59435944        - `"message"`59455946  - `instructions: optional string or null`59475948    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.59495950  - `store: optional boolean`59515952    Whether to store the session for later forking and recording download. Defaults to false for new sessions.59535954- `type: "session.updated"`59555956  The event type, always `session.updated`.59575958  - `"session.updated"`59595960- `client_event_id: optional string`59615962  The event_id of the client command associated with this server event, when supplied.59635964#### Example59655966```json5967{5968  "type": "session.updated",5969  "event_id": "evt_updated_001",5970  "client_event_id": "evt_update_001",5971  "session": {5972    "id": "live_def456",5973    "model": "gpt-live-1",5974    "status": "active",5975    "expires_at": 1788555600,5976    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",5977    "input": [],5978    "audio": {5979      "format": {5980        "type": "audio/pcm",5981        "rate": 240005982      },5983      "output": {5984        "voice": "marin"5985      }5986    },5987    "delegation": {5988      "type": "responses",5989      "responses": {5990        "model": "gpt-6-astra",5991        "instructions": "Check restaurant availability. Ask before confirming a booking.",5992        "max_output_tokens": 1024,5993        "tools": []5994      }5995    }5996  }5997}5998```59996000<a id="session.input_audio.muted"></a>60016002### session.input_audio.muted60036004Returned when a session.input_audio.mute command is accepted. Input audio is no longer sent to the model; sideband audio reflection continues.60056006#### Schema60076008Schema name: `LiveInputAudioMuted`60096010- `event_id: string`60116012  The unique ID of the Live server event.60136014- `type: "session.input_audio.muted"`60156016  The event type, always `session.input_audio.muted`.60176018  - `"session.input_audio.muted"`60196020- `client_event_id: optional string`60216022  The event_id of the client command associated with this server event, when supplied.60236024#### Example60256026```json6027{6028  "type": "session.input_audio.muted",6029  "event_id": "evt_muted_001",6030  "client_event_id": "evt_mute_001"6031}6032```60336034<a id="session.input_audio.unmuted"></a>60356036### session.input_audio.unmuted60376038Returned when a session.input_audio.unmute command is accepted. Input audio is sent to the model again.60396040#### Schema60416042Schema name: `LiveInputAudioUnmuted`60436044- `event_id: string`60456046  The unique ID of the Live server event.60476048- `type: "session.input_audio.unmuted"`60496050  The event type, always `session.input_audio.unmuted`.60516052  - `"session.input_audio.unmuted"`60536054- `client_event_id: optional string`60556056  The event_id of the client command associated with this server event, when supplied.60576058#### Example60596060```json6061{6062  "type": "session.input_audio.unmuted",6063  "event_id": "evt_unmuted_001",6064  "client_event_id": "evt_unmute_001"6065}6066```60676068<a id="session.instructions.appended"></a>60696070### session.instructions.appended60716072Returned 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.60736074#### Schema60756076Schema name: `LiveInstructionsAppended`60776078- `end_ms: number`60796080  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.60816082- `event_id: string`60836084  The unique ID of the Live server event.60856086- `start_ms: number`60876088  The start of this event on the Live session timeline, in milliseconds from the beginning of the session.60896090- `type: "session.instructions.appended"`60916092  The event type, always `session.instructions.appended`.60936094  - `"session.instructions.appended"`60956096- `client_event_id: optional string`60976098  The event_id of the client command associated with this server event, when supplied.60996100#### Example61016102```json6103{6104  "type": "session.instructions.appended",6105  "event_id": "evt_instructions_002",6106  "client_event_id": "evt_instructions_001",6107  "start_ms": 1200,6108  "end_ms": 14006109}6110```61116112<a id="session.thinking.appended"></a>61136114### session.thinking.appended61156116Returned when a session.thinking.append command is accepted into the Live session timeline. Acknowledges the added reasoning context without guaranteeing any spoken output.61176118#### Schema61196120Schema name: `LiveThinkingAppended`61216122- `end_ms: number`61236124  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.61256126- `event_id: string`61276128  The unique ID of the Live server event.61296130- `start_ms: number`61316132  The start of this event on the Live session timeline, in milliseconds from the beginning of the session.61336134- `type: "session.thinking.appended"`61356136  The event type, always `session.thinking.appended`.61376138  - `"session.thinking.appended"`61396140- `client_event_id: optional string`61416142  The event_id of the client command associated with this server event, when supplied.61436144#### Example61456146```json6147{6148  "type": "session.thinking.appended",6149  "event_id": "evt_thinking_002",6150  "client_event_id": "evt_thinking_001",6151  "start_ms": 4600,6152  "end_ms": 48006153}6154```61556156<a id="session.commentary.appended"></a>61576158### session.commentary.appended61596160Returned 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.61616162#### Schema61636164Schema name: `LiveCommentaryAppended`61656166- `end_ms: number`61676168  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.61696170- `event_id: string`61716172  The unique ID of the Live server event.61736174- `start_ms: number`61756176  The start of this event on the Live session timeline, in milliseconds from the beginning of the session.61776178- `type: "session.commentary.appended"`61796180  The event type, always `session.commentary.appended`.61816182  - `"session.commentary.appended"`61836184- `client_event_id: optional string`61856186  The event_id of the client command associated with this server event, when supplied.61876188#### Example61896190```json6191{6192  "type": "session.commentary.appended",6193  "event_id": "evt_commentary_002",6194  "client_event_id": "evt_commentary_001",6195  "start_ms": 5200,6196  "end_ms": 54006197}6198```61996200<a id="session.input_transcript.delta"></a>62016202### session.input_transcript.delta62036204A 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.62056206#### Schema62076208Schema name: `LiveInputTranscriptDelta`62096210- `delta: string`62116212  The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript.62136214- `end_ms: number`62156216  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.62176218- `event_id: string`62196220  The unique ID of the Live server event.62216222- `start_ms: number`62236224  The start of this event on the Live session timeline, in milliseconds from the beginning of the session.62256226- `type: "session.input_transcript.delta"`62276228  The event type, always `session.input_transcript.delta`.62296230  - `"session.input_transcript.delta"`62316232- `client_event_id: optional string`62336234  The event_id of the client command associated with this server event, when supplied.62356236#### Example62376238```json6239{6240  "type": "session.input_transcript.delta",6241  "event_id": "evt_input_transcript_001",6242  "delta": "A table for two at seven, please.",6243  "start_ms": 1600,6244  "end_ms": 34006245}6246```62476248<a id="session.output_transcript.delta"></a>62496250### session.output_transcript.delta62516252A 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.62536254#### Schema62556256Schema name: `LiveOutputTranscriptDelta`62576258- `delta: string`62596260  The transcript text fragment for the audio in this time range. Append fragments in delivery order to build the transcript.62616262- `end_ms: number`62636264  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.62656266- `event_id: string`62676268  The unique ID of the Live server event.62696270- `start_ms: number`62716272  The start of this event on the Live session timeline, in milliseconds from the beginning of the session.62736274- `type: "session.output_transcript.delta"`62756276  The event type, always `session.output_transcript.delta`.62776278  - `"session.output_transcript.delta"`62796280- `client_event_id: optional string`62816282  The event_id of the client command associated with this server event, when supplied.62836284#### Example62856286```json6287{6288  "type": "session.output_transcript.delta",6289  "event_id": "evt_output_transcript_001",6290  "delta": "Would you like me to reserve that table?",6291  "start_ms": 5400,6292  "end_ms": 72006293}6294```62956296<a id="session.delegation.created"></a>62976298### session.delegation.created62996300Returned when the Live model delegates work to your application or a Responses backend. Contains delegation metadata and the position on the session timeline where the work was delegated.63016302#### Schema63036304Schema name: `LiveDelegationCreated`63056306- `delegation: object { id, target, type, response_id }`63076308  The delegated work identifier and destination. This object contains metadata, not the task text.63096310  - `id: string`63116312    The unique ID of the delegation. Use this as delegation_id when replying to client-owned work or correlating Responses events.63136314  - `target: "client" or "responses"`63156316    Where the Live model delegated the work: `client` for your application, or `responses` for the configured Responses backend.63176318    - `"client" or "responses"`63196320      Where the Live model delegated the work: `client` for your application, or `responses` for the configured Responses backend.63216322      - `"client"`63236324      - `"responses"`63256326  - `type: "delegation"`63276328    The object type, always `delegation`.63296330    - `"delegation"`63316332  - `response_id: optional string`63336334    The ID of the Responses API response associated with a Responses delegation. Omitted for client delegations.63356336- `event_id: string`63376338  The unique ID of the Live server event.63396340- `offset_ms: number`63416342  The position on the Live session timeline where the delegation was created, in milliseconds from the beginning of the session.63436344- `type: "session.delegation.created"`63456346  The event type, always `session.delegation.created`.63476348  - `"session.delegation.created"`63496350- `client_event_id: optional string`63516352  The event_id of the client command associated with this server event, when supplied.63536354#### Example63556356```json6357{6358  "type": "session.delegation.created",6359  "event_id": "evt_delegation_001",6360  "offset_ms": 3600,6361  "delegation": {6362    "id": "del_abc123",6363    "type": "delegation",6364    "target": "client"6365  }6366}6367```63686369<a id="response.event"></a>63706371### response.event63726373A 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.63746375#### Schema63766377Schema name: `LiveResponseEvent`63786379- `event: map[unknown]`63806381  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.63826383- `event_id: string`63846385  The unique ID of the Live server event.63866387- `type: "response.event"`63886389  The event type, always `response.event`.63906391  - `"response.event"`63926393- `client_event_id: optional string`63946395  The event_id of the client command associated with this server event, when supplied.63966397- `delegation_id: optional string or null`63986399  The Live delegation associated with the nested Responses event. May be null or omitted when the event cannot be correlated with a delegation.64006401#### Example64026403```json6404{6405  "type": "response.event",6406  "event_id": "evt_response_002",6407  "delegation_id": "del_responses123",6408  "event": {6409    "type": "response.output_text.delta",6410    "item_id": "msg_abc123",6411    "output_index": 0,6412    "content_index": 0,6413    "delta": "An outdoor table is available at 7 PM.",6414    "sequence_number": 3,6415    "logprobs": []6416  }6417}6418```64196420<a id="session.usage.updated"></a>64216422### session.usage.updated64236424Reports cumulative Live audio usage and, when available, the most recent context-window usage. Delegated Responses token usage is reported separately in response.event events.64256426#### Schema64276428Schema name: `LiveSessionUsageUpdated`64296430- `event_id: string`64316432  The unique ID of the Live server event.64336434- `type: "session.usage.updated"`64356436  The event type, always `session.usage.updated`.64376438  - `"session.usage.updated"`64396440- `usage: SessionUsage`64416442  The cumulative Live audio usage so far.64436444  - `seconds: number`64456446    The cumulative Live audio duration in seconds. Do not sum this value across usage events.64476448- `client_event_id: optional string`64496450  The event_id of the client command associated with this server event, when supplied.64516452- `context_window: optional object { usage_ratio }`64536454  The latest measured Live context-window usage. Omitted when the context limit is unknown.64556456  - `usage_ratio: number`64576458    The latest active context token count divided by the Live model context limit. Can decrease after compaction and may lag between measured audio frames.64596460#### Example64616462```json6463{6464  "type": "session.usage.updated",6465  "event_id": "evt_usage_001",6466  "usage": {6467    "seconds": 32.56468  },6469  "context_window": {6470    "usage_ratio": 0.126471  }6472}6473```64746475<a id="session.closed"></a>64766477### session.closed64786479Returned 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.64806481#### Schema64826483Schema name: `LiveSessionClosed`64846485- `event_id: string`64866487  The unique ID of the Live server event.64886489- `reason: "close_requested" or "expired" or "content" or 2 more`64906491  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.64926493  - `"close_requested" or "expired" or "content" or 2 more`64946495    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.64966497    - `"close_requested"`64986499    - `"expired"`65006501    - `"content"`65026503    - `"remote_hangup"`65046505    - `"connection_lost"`65066507- `session: SessionResource`65086509  The resolved Live session configuration and server-assigned session metadata.65106511  - `id: string`65126513    The unique ID of the Live session. Use this ID for sideband connections, forking, and recording download.65146515  - `expires_at: number`65166517    The Unix timestamp, in seconds, at which the Live session expires.65186519  - `model: string or "gpt-live-1"`65206521    The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.65226523    - `string`65246525    - `"gpt-live-1"`65266527      The Live model. Required in the session configuration for every transport; do not pass it as a URL query parameter.65286529      - `"gpt-live-1"`65306531  - `status: "active"`65326533    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.65346535    - `"active"`65366537  - `audio: optional object { format, output }`65386539    Startup audio configuration. Only primary WebSockets accept audio.format; WebRTC and SIP negotiate their media format. Voice and format are immutable after startup.65406541    - `format: optional AudioFormat`65426543      Audio encoding and sample rate for audio sent and received over a Live WebSocket connection. WebRTC and SIP negotiate their media format separately.65446545      - `AudioPCM object { rate, type }`65466547        Raw, mono 16-bit little-endian PCM audio for a Live WebSocket connection.65486549        - `rate: 16000 or 24000`65506551          Audio sample rate in hertz. Live WebSocket PCM audio supports 16000 or 24000 Hz.65526553          - `16000`65546555          - `24000`65566557        - `type: "audio/pcm"`65586559          The audio encoding. Always `audio/pcm`.65606561          - `"audio/pcm"`65626563      - `AudioPCMU object { rate, type }`65646565        Raw, mono G.711 μ-law audio for a Live WebSocket connection.65666567        - `rate: number`65686569          Audio sample rate in hertz. G.711 audio uses 8000 Hz.65706571        - `type: "audio/pcmu"`65726573          The audio encoding. Always `audio/pcmu`.65746575          - `"audio/pcmu"`65766577      - `AudioPCMA object { rate, type }`65786579        Raw, mono G.711 A-law audio for a Live WebSocket connection.65806581        - `rate: number`65826583          Audio sample rate in hertz. G.711 audio uses 8000 Hz.65846585        - `type: "audio/pcma"`65866587          The audio encoding. Always `audio/pcma`.65886589          - `"audio/pcma"`65906591    - `output: optional object { voice }`65926593      The voice used for speech generated by the Live model.65946595      - `voice: optional string or "alloy" or "ash" or "ballad" or 19 more or CustomVoice`65966597        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.65986599        - `string`66006601        - `"alloy" or "ash" or "ballad" or 19 more`66026603          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.66046605          - `"alloy"`66066607          - `"ash"`66086609          - `"ballad"`66106611          - `"beacon"`66126613          - `"bossa"`66146615          - `"cedar"`66166617          - `"cinder"`66186619          - `"coral"`66206621          - `"delta"`66226623          - `"echo"`66246625          - `"gleam"`66266627          - `"marin"`66286629          - `"meridian"`66306631          - `"quartz"`66326633          - `"ripple"`66346635          - `"sage"`66366637          - `"shimmer"`66386639          - `"stone"`66406641          - `"tempo"`66426643          - `"verse"`66446645          - `"vesper"`66466647          - `"willow"`66486649        - `CustomVoice object { id }`66506651          - `id: string`66526653  - `client: optional ClientConfig`66546655    Startup-only capabilities for an untrusted frontend attached to a unified WebRTC session. Trusted sideband connections are unaffected.66566657    - `data_channel: DataChannelConfig`66586659      Client and server event permissions for the WebRTC frontend data channel.66606661      - `allowed_client_events: optional "all" or array of string`66626663        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.66646665        - `"all"`66666667          - `"all"`66686669        - `array of string`66706671      - `allowed_server_events: optional "all" or array of ServerEventSelector`66726673        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.66746675        - `"all"`66766677          - `"all"`66786679        - `array of ServerEventSelector`66806681          - `type: string`66826683            The outer Live server event type. Use 'response.event' for Responses events.66846685          - `response_event: optional string`66866687            The nested Responses event type. Required when type is 'response.event'; forbidden for other event types.66886689  - `delegation: optional ClientDelegation or object { responses, type }  or null`66906691    Who handles tasks delegated by the Live model. Omitted or null selects your application; use `responses` to let the API manage a Responses backend.66926693    - `ClientDelegation object { type }`66946695      Delegate tasks to your application. The Live session emits delegation events that your backend handles.66966697      - `type: "client"`66986699        The delegation owner. Always `client` for tasks handled by your application.67006701        - `"client"`67026703    - `Responses object { responses, type }`67046705      Delegate tasks to a Responses model managed by the Live session.67066707      - `responses: ResponsesDelegationConfig`67086709        Backend model, prompt, and tools used when the Live session delegates a task to Responses.67106711        - `model: string`67126713          The model used for server-owned Responses delegations.67146715        - `instructions: optional string or null`67166717          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).67186719        - `max_output_tokens: optional number or null`67206721          Maximum number of output tokens for each delegated response.67226723        - `parallel_tool_calls: optional boolean or null`67246725          Whether the delegated Responses model may request multiple tool calls in a single response.67266727        - `reasoning: optional object { effort, summary }  or null`67286729          Reasoning settings passed to each delegated Responses request.67306731          - `effort: optional "none" or "minimal" or "low" or 3 more or null`67326733            How much reasoning effort the delegated Responses model should use. Supported values depend on the backend model.67346735            - `"none"`67366737            - `"minimal"`67386739            - `"low"`67406741            - `"medium"`67426743            - `"high"`67446745            - `"xhigh"`67466747          - `summary: optional "concise" or "detailed" or "auto" or null`67486749            The reasoning summary to request from the delegated Responses model, when supported.67506751            - `"concise"`67526753            - `"detailed"`67546755            - `"auto"`67566757        - `service_tier: optional "auto" or "default" or "fast_tier_temp_pilot" or 3 more or null`67586759          Service tier for delegated Responses requests.67606761          - `"auto"`67626763          - `"default"`67646765          - `"fast_tier_temp_pilot"`67666767          - `"flex"`67686769          - `"priority"`67706771          - `"ultrafast"`67726773        - `text: optional object { verbosity }  or null`67746775          Text generation settings passed to each delegated Responses request.67766777          - `verbosity: optional "low" or "medium" or "high" or null`67786779            The amount of detail in text generated by the Responses backend. This does not configure the Live model’s spoken delivery.67806781            - `"low"`67826783            - `"medium"`67846785            - `"high"`67866787        - `tool_choice: optional "auto" or "none" or "required" or object { name, type }  or object { name, server_label, type }`67886789          Controls which tool the Responses backend uses when handling a task delegated by the Live model.67906791          - `LiveToolChoiceEnum = "auto" or "none" or "required"`67926793            - `"auto"`67946795            - `"none"`67966797            - `"required"`67986799          - `LiveFunctionToolChoiceParam object { name, type }`68006801            - `name: string`68026803            - `type: "function"`68046805              - `"function"`68066807          - `LiveMCPToolChoiceParam object { name, server_label, type }`68086809            - `name: string`68106811            - `server_label: string`68126813            - `type: "mcp"`68146815              - `"mcp"`68166817        - `tools: optional array of FunctionTool or object { type }`68186819          Tools available to the Responses backend while it handles tasks delegated by the Live model.68206821          - `FunctionTool object { name, type, description, 2 more }`68226823            A function tool available to the Responses backend when the Live model delegates a task.68246825            - `name: string`68266827              The name the delegated Responses model uses when calling this function.68286829            - `type: "function"`68306831              The tool type. Always `function`.68326833              - `"function"`68346835            - `description: optional string or null`68366837              What the function does and when the delegated Responses model should call it.68386839            - `parameters: optional map[unknown] or null`68406841              A JSON Schema object describing the arguments accepted by the function.68426843            - `strict: optional boolean or null`68446845              Whether the delegated Responses model must follow the function’s parameter schema exactly.68466847          - `WebSearch object { type }`68486849            A web search tool available to the Live session’s Responses backend.68506851            - `type: "web_search"`68526853              The tool type. Always `web_search`.68546855              - `"web_search"`68566857      - `type: "responses"`68586859        The delegation owner. Always `responses` for tasks handled by the Responses API.68606861        - `"responses"`68626863  - `input: optional array of InitialItem`68646865    Ordered text-only history supplied before startup. Supports developer, user, and assistant messages with one text part each; at most 128 messages and 8,192 rendered tokens in total.68666867    - `Developer object { content, role, id, 2 more }`68686869      A developer message included in the initial text history of a Live session.68706871      - `content: array of object { text, type }`68726873        The message content. Supply exactly one text part for the initial Live conversation history.68746875        - `text: string`68766877          The message text to include in the Live session’s initial conversation history.68786879        - `type: optional "input_text"`68806881          The text content type. Always `input_text`.68826883          - `"input_text"`68846885      - `role: "developer"`68866887        The author of this history message. Always `developer`.68886889        - `"developer"`68906891      - `id: optional string or null`68926893        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.68946895      - `status: optional "incomplete" or "completed" or null`68966897        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.68986899        - `"incomplete"`69006901        - `"completed"`69026903      - `type: optional "message"`69046905        The history item type. Always `message`.69066907        - `"message"`69086909    - `User object { content, role, id, 2 more }`69106911      A user message included in the initial text history of a Live session.69126913      - `content: array of object { text, type }`69146915        The message content. Supply exactly one text part for the initial Live conversation history.69166917        - `text: string`69186919          The message text to include in the Live session’s initial conversation history.69206921        - `type: optional "input_text"`69226923          The text content type. Always `input_text`.69246925          - `"input_text"`69266927      - `role: "user"`69286929        The author of this history message. Always `user`.69306931        - `"user"`69326933      - `id: optional string or null`69346935        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.69366937      - `status: optional "incomplete" or "completed" or null`69386939        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.69406941        - `"incomplete"`69426943        - `"completed"`69446945      - `type: optional "message"`69466947        The history item type. Always `message`.69486949        - `"message"`69506951    - `Assistant object { content, role, id, 2 more }`69526953      An assistant message included in the initial text history of a Live session.69546955      - `content: array of object { text, type }  or object { text, type }`69566957        The message content. Supply exactly one text part for the initial Live conversation history.69586959        - `Text object { text, type }`69606961          Assistant text supplied as conversation history when starting a Live session.69626963          - `text: string`69646965            The message text to include in the Live session’s initial conversation history.69666967          - `type: optional "text"`69686969            The text content type. Always `text`.69706971            - `"text"`69726973        - `OutputText object { text, type }`69746975          Assistant output text supplied as conversation history when starting a Live session.69766977          - `text: string`69786979            The message text to include in the Live session’s initial conversation history.69806981          - `type: "output_text"`69826983            The text content type. Always `output_text`.69846985            - `"output_text"`69866987      - `role: "assistant"`69886989        The author of this history message. Always `assistant`.69906991        - `"assistant"`69926993      - `id: optional string or null`69946995        An optional identifier for the supplied history message. Live uses the message’s role and text to initialize the conversation.69966997      - `status: optional "incomplete" or "completed" or null`69986999        The supplied message’s status. Live uses its text as history and does not resume an incomplete message.70007001        - `"incomplete"`70027003        - `"completed"`70047005      - `type: optional "message"`70067007        The history item type. Always `message`.70087009        - `"message"`70107011  - `instructions: optional string or null`70127013    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.70147015  - `store: optional boolean`70167017    Whether to store the session for later forking and recording download. Defaults to false for new sessions.70187019- `type: "session.closed"`70207021  The event type, always `session.closed`.70227023  - `"session.closed"`70247025- `usage: SessionUsage`70267027  The final cumulative Live audio usage after session finalization.70287029  - `seconds: number`70307031    The cumulative Live audio duration in seconds. Do not sum this value across usage events.70327033- `client_event_id: optional string`70347035  The event_id of the client command associated with this server event, when supplied.70367037#### Example70387039```json7040{7041  "type": "session.closed",7042  "event_id": "evt_closed_001",7043  "client_event_id": "evt_close_001",7044  "reason": "close_requested",7045  "session": {7046    "id": "live_abc123",7047    "model": "gpt-live-1",7048    "status": "active",7049    "expires_at": 1788555600,7050    "instructions": "Help the caller plan a restaurant reservation. Confirm details before booking.",7051    "input": [],7052    "audio": {7053      "format": {7054        "type": "audio/pcm",7055        "rate": 240007056      },7057      "output": {7058        "voice": "marin"7059      }7060    },7061    "delegation": {7062      "type": "client"7063    }7064  },7065  "usage": {7066    "seconds": 45.87067  }7068}7069```70707071<a id="error"></a>70727073### error70747075Reports 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.70767077#### Schema70787079Schema name: `LiveErrorEvent`70807081- `error: Error`70827083  Details of the Live error and the client command that caused it, when known.70847085  - `code: string`70867087    A machine-readable code identifying the Live error, such as `unknown_parameter`.70887089  - `message: string`70907091    A human-readable explanation of the Live error.70927093  - `type: string`70947095    The category of error, such as `invalid_request_error` for an invalid Live client command.70967097  - `client_event_id: optional string`70987099    The event_id of the client command that caused the error, when supplied.71007101  - `param: optional string`71027103    The parameter that caused the error, when applicable, such as `session.voice`.71047105- `event_id: string`71067107  The unique ID of the Live server event.71087109- `type: "error"`71107111  The event type, always `error`.71127113  - `"error"`71147115- `client_event_id: optional string`71167117  The event_id of the client command associated with this server event, when supplied.71187119#### Example71207121```json7122{7123  "type": "error",7124  "event_id": "evt_error_001",7125  "error": {7126    "type": "invalid_request_error",7127    "code": "unknown_parameter",7128    "message": "Unknown parameter: 'session.voice'.",7129    "param": "session.voice",7130    "client_event_id": "evt_invalid_001"7131  }7132}7133```71347135<a id="info"></a>71367137### info71387139An informational notice about the Live session, such as the event permissions applied to a frontend data channel.71407141#### Schema71427143Schema name: `LiveInfoEvent`71447145- `code: string`71467147  A machine-readable code for the notice, such as `data_channel_permissions`.71487149- `event_id: string`71507151  The unique ID of the Live server event.71527153- `message: string`71547155  A human-readable explanation of the Live session notice.71567157- `type: "info"`71587159  The event type, always `info`.71607161  - `"info"`71627163- `client_event_id: optional string`71647165  The event_id of the client command associated with this server event, when supplied.71667167#### Example71687169```json7170{7171  "type": "info",7172  "event_id": "evt_info_001",7173  "code": "data_channel_permissions",7174  "message": "The frontend data channel is configured with restricted event permissions."7175}7176```71777178<a id="session.input_audio.append"></a>71797180### session.input_audio.append71817182Input audio received from the primary transport and reflected to a Live sideband connection before model-input muting.71837184#### Schema71857186Schema name: `LiveInputAudioAppend`71877188- `audio: string`71897190  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.71917192- `type: "session.input_audio.append"`71937194  The event type, always `session.input_audio.append`.71957196  - `"session.input_audio.append"`71977198#### Example71997200```json7201{7202  "type": "session.input_audio.append",7203  "audio": "AACAAIAAAIAAAP9/AIAAgA=="7204}7205```72067207<a id="transport.dtmf.received"></a>72087209### transport.dtmf.received72107211A SIP DTMF keypress received from the caller. Delivered only to sideband observers.72127213#### Schema72147215Schema name: `LiveTransportDTMFReceived`72167217- `event: string`72187219- `event_id: string`72207221- `type: "transport.dtmf.received"`72227223  - `"transport.dtmf.received"`72247225#### Example72267227```json7228{7229  "type": "transport.dtmf.received",7230  "event_id": "event_dtmf_1",7231  "event": "5"7232}7233```72347235<a id="transport.dtmf.send"></a>72367237### transport.dtmf.send72387239A SIP DTMF keypress successfully sent by the hosted tool. Delivered only to sideband observers; this is not a client command.72407241#### Schema72427243Schema name: `LiveTransportDTMFSend`72447245- `event: string`72467247- `event_id: string`72487249- `type: "transport.dtmf.send"`72507251  - `"transport.dtmf.send"`72527253#### Example72547255```json7256{7257  "type": "transport.dtmf.send",7258  "event_id": "event_dtmf_2",7259  "event": "#"7260}7261```72627263<a id="transport.ringing"></a>72647265### transport.ringing72667267The outbound SIP provider leg is ringing or providing early media. Delivered only to sideband observers.72687269#### Schema72707271Schema name: `LiveTransportRinging`72727273- `event_id: string`72747275- `session_id: string`72767277  The canonical Live session ID.72787279- `type: "transport.ringing"`72807281  - `"transport.ringing"`72827283#### Example72847285```json7286{7287  "type": "transport.ringing",7288  "event_id": "event_call_1",7289  "session_id": "live_u0_123"7290}7291```72927293<a id="transport.answered"></a>72947295### transport.answered72967297The outbound SIP provider leg answered and media is established. Delivered only to sideband observers.72987299#### Schema73007301Schema name: `LiveTransportAnswered`73027303- `event_id: string`73047305- `session_id: string`73067307  The canonical Live session ID.73087309- `type: "transport.answered"`73107311  - `"transport.answered"`73127313#### Example73147315```json7316{7317  "type": "transport.answered",7318  "event_id": "event_call_2",7319  "session_id": "live_u0_123"7320}7321```73227323<a id="transport.failed"></a>73247325### transport.failed73267327An asynchronous outbound SIP setup failure. Delivered only to sideband observers.73287329#### Schema73307331Schema name: `LiveTransportFailed`73327333- `error: object { code, message, type, param }`73347335  - `code: string`73367337    The call setup failure code.73387339  - `message: string`73407341  - `type: "call_error"`73427343    - `"call_error"`73447345  - `param: optional string`73467347    The parameter related to the error, if any. Empty when no parameter applies.73487349- `event_id: string`73507351- `session_id: string`73527353  The canonical Live session ID.73547355- `type: "transport.failed"`73567357  - `"transport.failed"`73587359#### Example73607361```json7362{7363  "type": "transport.failed",7364  "event_id": "event_call_4",7365  "session_id": "live_u0_123",7366  "error": {7367    "type": "call_error",7368    "code": "provider_invite_failed",7369    "message": "provider rejected the call",7370    "param": ""7371  }7372}7373```7374
Files main
Menu

Theme