SPB Git

Repository Public

realtime.md 949.9 KB 29,337 lines markdown

1# Realtime23> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.45## Domain Types67### Audio Transcription89- `AudioTranscription object { delay, keywords, language, 3 more }`1011  - `delay: optional "minimal" or "low" or "medium" or 2 more`1213    Controls how long the model waits before emitting transcription text.14    Higher values can improve transcription accuracy at the cost of latency.15    Only supported with `gpt-realtime-whisper` in GA Realtime sessions.1617    - `"minimal"`1819    - `"low"`2021    - `"medium"`2223    - `"high"`2425    - `"xhigh"`2627  - `keywords: optional array of string`2829    Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.3031  - `language: optional string`3233    The language of the input audio. Supplying the input language in34    [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format35    will improve accuracy and latency.3637  - `languages: optional array of string`3839    Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.4041  - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`4243    The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.4445    - `string`4647    - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`4849      The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.5051      - `"whisper-1"`5253      - `"gpt-transcribe"`5455      - `"gpt-live-transcribe"`5657      - `"gpt-4o-mini-transcribe"`5859      - `"gpt-4o-mini-transcribe-2025-12-15"`6061      - `"gpt-4o-transcribe"`6263      - `"gpt-4o-transcribe-diarize"`6465      - `"gpt-realtime-whisper"`6667  - `prompt: optional string`6869    An optional text to guide the model's style or continue a previous audio70    segment.71    For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).72    For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".73    Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.7475### Conversation Created Event7677- `ConversationCreatedEvent object { conversation, event_id, type }`7879  Returned when a conversation is created. Emitted right after session creation.8081  - `conversation: object { id, object }`8283    The conversation resource.8485    - `id: optional string`8687      The unique ID of the conversation.8889    - `object: optional string`9091      The object type, must be `realtime.conversation`.9293  - `event_id: string`9495    The unique ID of the server event.9697  - `type: "conversation.created"`9899    The event type, must be `conversation.created`.100101    - `"conversation.created"`102103### Conversation Item104105- `ConversationItem = RealtimeConversationItemSystemMessage or RealtimeConversationItemUserMessage or RealtimeConversationItemAssistantMessage or 6 more`106107  A single item within a Realtime conversation.108109  - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`110111    A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.112113    - `content: array of object { text, type }`114115      The content of the message.116117      - `text: optional string`118119        The text content.120121      - `type: optional "input_text"`122123        The content type. Always `input_text` for system messages.124125        - `"input_text"`126127    - `role: "system"`128129      The role of the message sender. Always `system`.130131      - `"system"`132133    - `type: "message"`134135      The type of the item. Always `message`.136137      - `"message"`138139    - `id: optional string`140141      The unique ID of the item. This may be provided by the client or generated by the server.142143    - `object: optional "realtime.item"`144145      Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.146147      - `"realtime.item"`148149    - `status: optional "completed" or "incomplete" or "in_progress"`150151      The status of the item. Has no effect on the conversation.152153      - `"completed"`154155      - `"incomplete"`156157      - `"in_progress"`158159  - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`160161    A user message item in a Realtime conversation.162163    - `content: array of object { audio, detail, image_url, 3 more }`164165      The content of the message.166167      - `audio: optional string`168169        Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.170171      - `detail: optional "auto" or "low" or "high"`172173        The detail level of the image (for `input_image`). `auto` will default to `high`.174175        - `"auto"`176177        - `"low"`178179        - `"high"`180181      - `image_url: optional string`182183        Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.184185      - `text: optional string`186187        The text content (for `input_text`).188189      - `transcript: optional string`190191        Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.192193      - `type: optional "input_text" or "input_audio" or "input_image"`194195        The content type (`input_text`, `input_audio`, or `input_image`).196197        - `"input_text"`198199        - `"input_audio"`200201        - `"input_image"`202203    - `role: "user"`204205      The role of the message sender. Always `user`.206207      - `"user"`208209    - `type: "message"`210211      The type of the item. Always `message`.212213      - `"message"`214215    - `id: optional string`216217      The unique ID of the item. This may be provided by the client or generated by the server.218219    - `object: optional "realtime.item"`220221      Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.222223      - `"realtime.item"`224225    - `status: optional "completed" or "incomplete" or "in_progress"`226227      The status of the item. Has no effect on the conversation.228229      - `"completed"`230231      - `"incomplete"`232233      - `"in_progress"`234235  - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`236237    An assistant message item in a Realtime conversation.238239    - `content: array of object { audio, text, transcript, type }`240241      The content of the message.242243      - `audio: optional string`244245        Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.246247      - `text: optional string`248249        The text content.250251      - `transcript: optional string`252253        The transcript of the audio content, this will always be present if the output type is `audio`.254255      - `type: optional "output_text" or "output_audio"`256257        The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.258259        - `"output_text"`260261        - `"output_audio"`262263    - `role: "assistant"`264265      The role of the message sender. Always `assistant`.266267      - `"assistant"`268269    - `type: "message"`270271      The type of the item. Always `message`.272273      - `"message"`274275    - `id: optional string`276277      The unique ID of the item. This may be provided by the client or generated by the server.278279    - `object: optional "realtime.item"`280281      Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.282283      - `"realtime.item"`284285    - `status: optional "completed" or "incomplete" or "in_progress"`286287      The status of the item. Has no effect on the conversation.288289      - `"completed"`290291      - `"incomplete"`292293      - `"in_progress"`294295  - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`296297    A function call item in a Realtime conversation.298299    - `arguments: string`300301      The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.302303    - `name: string`304305      The name of the function being called.306307    - `type: "function_call"`308309      The type of the item. Always `function_call`.310311      - `"function_call"`312313    - `id: optional string`314315      The unique ID of the item. This may be provided by the client or generated by the server.316317    - `call_id: optional string`318319      The ID of the function call.320321    - `object: optional "realtime.item"`322323      Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.324325      - `"realtime.item"`326327    - `status: optional "completed" or "incomplete" or "in_progress"`328329      The status of the item. Has no effect on the conversation.330331      - `"completed"`332333      - `"incomplete"`334335      - `"in_progress"`336337  - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`338339    A function call output item in a Realtime conversation.340341    - `call_id: string`342343      The ID of the function call this output is for.344345    - `output: string`346347      The output of the function call, this is free text and can contain any information or simply be empty.348349    - `type: "function_call_output"`350351      The type of the item. Always `function_call_output`.352353      - `"function_call_output"`354355    - `id: optional string`356357      The unique ID of the item. This may be provided by the client or generated by the server.358359    - `object: optional "realtime.item"`360361      Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.362363      - `"realtime.item"`364365    - `status: optional "completed" or "incomplete" or "in_progress"`366367      The status of the item. Has no effect on the conversation.368369      - `"completed"`370371      - `"incomplete"`372373      - `"in_progress"`374375  - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`376377    A Realtime item responding to an MCP approval request.378379    - `id: string`380381      The unique ID of the approval response.382383    - `approval_request_id: string`384385      The ID of the approval request being answered.386387    - `approve: boolean`388389      Whether the request was approved.390391    - `type: "mcp_approval_response"`392393      The type of the item. Always `mcp_approval_response`.394395      - `"mcp_approval_response"`396397    - `reason: optional string or null`398399      Optional reason for the decision.400401  - `RealtimeMcpListTools object { server_label, tools, type, id }`402403    A Realtime item listing tools available on an MCP server.404405    - `server_label: string`406407      The label of the MCP server.408409    - `tools: array of object { input_schema, name, annotations, description }`410411      The tools available on the server.412413      - `input_schema: unknown`414415        The JSON schema describing the tool's input.416417      - `name: string`418419        The name of the tool.420421      - `annotations: optional unknown or null`422423        Additional annotations about the tool.424425      - `description: optional string or null`426427        The description of the tool.428429    - `type: "mcp_list_tools"`430431      The type of the item. Always `mcp_list_tools`.432433      - `"mcp_list_tools"`434435    - `id: optional string`436437      The unique ID of the list.438439  - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`440441    A Realtime item representing an invocation of a tool on an MCP server.442443    - `id: string`444445      The unique ID of the tool call.446447    - `arguments: string`448449      A JSON string of the arguments passed to the tool.450451    - `name: string`452453      The name of the tool that was run.454455    - `server_label: string`456457      The label of the MCP server running the tool.458459    - `type: "mcp_call"`460461      The type of the item. Always `mcp_call`.462463      - `"mcp_call"`464465    - `approval_request_id: optional string or null`466467      The ID of an associated approval request, if any.468469    - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`470471      The error from the tool call, if any.472473      - `RealtimeMcpProtocolError object { code, message, type }`474475        - `code: number`476477        - `message: string`478479        - `type: "protocol_error"`480481          - `"protocol_error"`482483      - `RealtimeMcpToolExecutionError object { message, type }`484485        - `message: string`486487        - `type: "tool_execution_error"`488489          - `"tool_execution_error"`490491      - `RealtimeMcphttpError object { code, message, type }`492493        - `code: number`494495        - `message: string`496497        - `type: "http_error"`498499          - `"http_error"`500501    - `output: optional string or null`502503      The output from the tool call.504505  - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`506507    A Realtime item requesting human approval of a tool invocation.508509    - `id: string`510511      The unique ID of the approval request.512513    - `arguments: string`514515      A JSON string of arguments for the tool.516517    - `name: string`518519      The name of the tool to run.520521    - `server_label: string`522523      The label of the MCP server making the request.524525    - `type: "mcp_approval_request"`526527      The type of the item. Always `mcp_approval_request`.528529      - `"mcp_approval_request"`530531### Conversation Item Added532533- `ConversationItemAdded object { event_id, item, type, previous_item_id }`534535  Sent by the server when an Item is added to the default Conversation. This can happen in several cases:536537  - When the client sends a `conversation.item.create` event.538  - When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer.539  - When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`).540541  The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.542543  - `event_id: string`544545    The unique ID of the server event.546547  - `item: ConversationItem`548549    A single item within a Realtime conversation.550551    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`552553      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.554555      - `content: array of object { text, type }`556557        The content of the message.558559        - `text: optional string`560561          The text content.562563        - `type: optional "input_text"`564565          The content type. Always `input_text` for system messages.566567          - `"input_text"`568569      - `role: "system"`570571        The role of the message sender. Always `system`.572573        - `"system"`574575      - `type: "message"`576577        The type of the item. Always `message`.578579        - `"message"`580581      - `id: optional string`582583        The unique ID of the item. This may be provided by the client or generated by the server.584585      - `object: optional "realtime.item"`586587        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.588589        - `"realtime.item"`590591      - `status: optional "completed" or "incomplete" or "in_progress"`592593        The status of the item. Has no effect on the conversation.594595        - `"completed"`596597        - `"incomplete"`598599        - `"in_progress"`600601    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`602603      A user message item in a Realtime conversation.604605      - `content: array of object { audio, detail, image_url, 3 more }`606607        The content of the message.608609        - `audio: optional string`610611          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.612613        - `detail: optional "auto" or "low" or "high"`614615          The detail level of the image (for `input_image`). `auto` will default to `high`.616617          - `"auto"`618619          - `"low"`620621          - `"high"`622623        - `image_url: optional string`624625          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.626627        - `text: optional string`628629          The text content (for `input_text`).630631        - `transcript: optional string`632633          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.634635        - `type: optional "input_text" or "input_audio" or "input_image"`636637          The content type (`input_text`, `input_audio`, or `input_image`).638639          - `"input_text"`640641          - `"input_audio"`642643          - `"input_image"`644645      - `role: "user"`646647        The role of the message sender. Always `user`.648649        - `"user"`650651      - `type: "message"`652653        The type of the item. Always `message`.654655        - `"message"`656657      - `id: optional string`658659        The unique ID of the item. This may be provided by the client or generated by the server.660661      - `object: optional "realtime.item"`662663        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.664665        - `"realtime.item"`666667      - `status: optional "completed" or "incomplete" or "in_progress"`668669        The status of the item. Has no effect on the conversation.670671        - `"completed"`672673        - `"incomplete"`674675        - `"in_progress"`676677    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`678679      An assistant message item in a Realtime conversation.680681      - `content: array of object { audio, text, transcript, type }`682683        The content of the message.684685        - `audio: optional string`686687          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.688689        - `text: optional string`690691          The text content.692693        - `transcript: optional string`694695          The transcript of the audio content, this will always be present if the output type is `audio`.696697        - `type: optional "output_text" or "output_audio"`698699          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.700701          - `"output_text"`702703          - `"output_audio"`704705      - `role: "assistant"`706707        The role of the message sender. Always `assistant`.708709        - `"assistant"`710711      - `type: "message"`712713        The type of the item. Always `message`.714715        - `"message"`716717      - `id: optional string`718719        The unique ID of the item. This may be provided by the client or generated by the server.720721      - `object: optional "realtime.item"`722723        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.724725        - `"realtime.item"`726727      - `status: optional "completed" or "incomplete" or "in_progress"`728729        The status of the item. Has no effect on the conversation.730731        - `"completed"`732733        - `"incomplete"`734735        - `"in_progress"`736737    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`738739      A function call item in a Realtime conversation.740741      - `arguments: string`742743        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.744745      - `name: string`746747        The name of the function being called.748749      - `type: "function_call"`750751        The type of the item. Always `function_call`.752753        - `"function_call"`754755      - `id: optional string`756757        The unique ID of the item. This may be provided by the client or generated by the server.758759      - `call_id: optional string`760761        The ID of the function call.762763      - `object: optional "realtime.item"`764765        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.766767        - `"realtime.item"`768769      - `status: optional "completed" or "incomplete" or "in_progress"`770771        The status of the item. Has no effect on the conversation.772773        - `"completed"`774775        - `"incomplete"`776777        - `"in_progress"`778779    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`780781      A function call output item in a Realtime conversation.782783      - `call_id: string`784785        The ID of the function call this output is for.786787      - `output: string`788789        The output of the function call, this is free text and can contain any information or simply be empty.790791      - `type: "function_call_output"`792793        The type of the item. Always `function_call_output`.794795        - `"function_call_output"`796797      - `id: optional string`798799        The unique ID of the item. This may be provided by the client or generated by the server.800801      - `object: optional "realtime.item"`802803        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.804805        - `"realtime.item"`806807      - `status: optional "completed" or "incomplete" or "in_progress"`808809        The status of the item. Has no effect on the conversation.810811        - `"completed"`812813        - `"incomplete"`814815        - `"in_progress"`816817    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`818819      A Realtime item responding to an MCP approval request.820821      - `id: string`822823        The unique ID of the approval response.824825      - `approval_request_id: string`826827        The ID of the approval request being answered.828829      - `approve: boolean`830831        Whether the request was approved.832833      - `type: "mcp_approval_response"`834835        The type of the item. Always `mcp_approval_response`.836837        - `"mcp_approval_response"`838839      - `reason: optional string or null`840841        Optional reason for the decision.842843    - `RealtimeMcpListTools object { server_label, tools, type, id }`844845      A Realtime item listing tools available on an MCP server.846847      - `server_label: string`848849        The label of the MCP server.850851      - `tools: array of object { input_schema, name, annotations, description }`852853        The tools available on the server.854855        - `input_schema: unknown`856857          The JSON schema describing the tool's input.858859        - `name: string`860861          The name of the tool.862863        - `annotations: optional unknown or null`864865          Additional annotations about the tool.866867        - `description: optional string or null`868869          The description of the tool.870871      - `type: "mcp_list_tools"`872873        The type of the item. Always `mcp_list_tools`.874875        - `"mcp_list_tools"`876877      - `id: optional string`878879        The unique ID of the list.880881    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`882883      A Realtime item representing an invocation of a tool on an MCP server.884885      - `id: string`886887        The unique ID of the tool call.888889      - `arguments: string`890891        A JSON string of the arguments passed to the tool.892893      - `name: string`894895        The name of the tool that was run.896897      - `server_label: string`898899        The label of the MCP server running the tool.900901      - `type: "mcp_call"`902903        The type of the item. Always `mcp_call`.904905        - `"mcp_call"`906907      - `approval_request_id: optional string or null`908909        The ID of an associated approval request, if any.910911      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`912913        The error from the tool call, if any.914915        - `RealtimeMcpProtocolError object { code, message, type }`916917          - `code: number`918919          - `message: string`920921          - `type: "protocol_error"`922923            - `"protocol_error"`924925        - `RealtimeMcpToolExecutionError object { message, type }`926927          - `message: string`928929          - `type: "tool_execution_error"`930931            - `"tool_execution_error"`932933        - `RealtimeMcphttpError object { code, message, type }`934935          - `code: number`936937          - `message: string`938939          - `type: "http_error"`940941            - `"http_error"`942943      - `output: optional string or null`944945        The output from the tool call.946947    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`948949      A Realtime item requesting human approval of a tool invocation.950951      - `id: string`952953        The unique ID of the approval request.954955      - `arguments: string`956957        A JSON string of arguments for the tool.958959      - `name: string`960961        The name of the tool to run.962963      - `server_label: string`964965        The label of the MCP server making the request.966967      - `type: "mcp_approval_request"`968969        The type of the item. Always `mcp_approval_request`.970971        - `"mcp_approval_request"`972973  - `type: "conversation.item.added"`974975    The event type, must be `conversation.item.added`.976977    - `"conversation.item.added"`978979  - `previous_item_id: optional string or null`980981    The ID of the item that precedes this one, if any. This is used to982    maintain ordering when items are inserted.983984### Conversation Item Create Event985986- `ConversationItemCreateEvent object { item, type, event_id, previous_item_id }`987988  Add a new Item to the Conversation's context, including messages, function989  calls, and function call responses. This event can be used both to populate a990  "history" of the conversation and to add new items mid-stream, but has the991  current limitation that it cannot populate assistant audio messages.992993  If successful, the server will emit a `conversation.item.added` event and,994  when the item is finalized, a `conversation.item.done` event. Otherwise, an995  `error` event will be sent.996997  - `item: ConversationItem`998999    A single item within a Realtime conversation.10001001    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`10021003      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.10041005      - `content: array of object { text, type }`10061007        The content of the message.10081009        - `text: optional string`10101011          The text content.10121013        - `type: optional "input_text"`10141015          The content type. Always `input_text` for system messages.10161017          - `"input_text"`10181019      - `role: "system"`10201021        The role of the message sender. Always `system`.10221023        - `"system"`10241025      - `type: "message"`10261027        The type of the item. Always `message`.10281029        - `"message"`10301031      - `id: optional string`10321033        The unique ID of the item. This may be provided by the client or generated by the server.10341035      - `object: optional "realtime.item"`10361037        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.10381039        - `"realtime.item"`10401041      - `status: optional "completed" or "incomplete" or "in_progress"`10421043        The status of the item. Has no effect on the conversation.10441045        - `"completed"`10461047        - `"incomplete"`10481049        - `"in_progress"`10501051    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`10521053      A user message item in a Realtime conversation.10541055      - `content: array of object { audio, detail, image_url, 3 more }`10561057        The content of the message.10581059        - `audio: optional string`10601061          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.10621063        - `detail: optional "auto" or "low" or "high"`10641065          The detail level of the image (for `input_image`). `auto` will default to `high`.10661067          - `"auto"`10681069          - `"low"`10701071          - `"high"`10721073        - `image_url: optional string`10741075          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.10761077        - `text: optional string`10781079          The text content (for `input_text`).10801081        - `transcript: optional string`10821083          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.10841085        - `type: optional "input_text" or "input_audio" or "input_image"`10861087          The content type (`input_text`, `input_audio`, or `input_image`).10881089          - `"input_text"`10901091          - `"input_audio"`10921093          - `"input_image"`10941095      - `role: "user"`10961097        The role of the message sender. Always `user`.10981099        - `"user"`11001101      - `type: "message"`11021103        The type of the item. Always `message`.11041105        - `"message"`11061107      - `id: optional string`11081109        The unique ID of the item. This may be provided by the client or generated by the server.11101111      - `object: optional "realtime.item"`11121113        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.11141115        - `"realtime.item"`11161117      - `status: optional "completed" or "incomplete" or "in_progress"`11181119        The status of the item. Has no effect on the conversation.11201121        - `"completed"`11221123        - `"incomplete"`11241125        - `"in_progress"`11261127    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`11281129      An assistant message item in a Realtime conversation.11301131      - `content: array of object { audio, text, transcript, type }`11321133        The content of the message.11341135        - `audio: optional string`11361137          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.11381139        - `text: optional string`11401141          The text content.11421143        - `transcript: optional string`11441145          The transcript of the audio content, this will always be present if the output type is `audio`.11461147        - `type: optional "output_text" or "output_audio"`11481149          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.11501151          - `"output_text"`11521153          - `"output_audio"`11541155      - `role: "assistant"`11561157        The role of the message sender. Always `assistant`.11581159        - `"assistant"`11601161      - `type: "message"`11621163        The type of the item. Always `message`.11641165        - `"message"`11661167      - `id: optional string`11681169        The unique ID of the item. This may be provided by the client or generated by the server.11701171      - `object: optional "realtime.item"`11721173        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.11741175        - `"realtime.item"`11761177      - `status: optional "completed" or "incomplete" or "in_progress"`11781179        The status of the item. Has no effect on the conversation.11801181        - `"completed"`11821183        - `"incomplete"`11841185        - `"in_progress"`11861187    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`11881189      A function call item in a Realtime conversation.11901191      - `arguments: string`11921193        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.11941195      - `name: string`11961197        The name of the function being called.11981199      - `type: "function_call"`12001201        The type of the item. Always `function_call`.12021203        - `"function_call"`12041205      - `id: optional string`12061207        The unique ID of the item. This may be provided by the client or generated by the server.12081209      - `call_id: optional string`12101211        The ID of the function call.12121213      - `object: optional "realtime.item"`12141215        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.12161217        - `"realtime.item"`12181219      - `status: optional "completed" or "incomplete" or "in_progress"`12201221        The status of the item. Has no effect on the conversation.12221223        - `"completed"`12241225        - `"incomplete"`12261227        - `"in_progress"`12281229    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`12301231      A function call output item in a Realtime conversation.12321233      - `call_id: string`12341235        The ID of the function call this output is for.12361237      - `output: string`12381239        The output of the function call, this is free text and can contain any information or simply be empty.12401241      - `type: "function_call_output"`12421243        The type of the item. Always `function_call_output`.12441245        - `"function_call_output"`12461247      - `id: optional string`12481249        The unique ID of the item. This may be provided by the client or generated by the server.12501251      - `object: optional "realtime.item"`12521253        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.12541255        - `"realtime.item"`12561257      - `status: optional "completed" or "incomplete" or "in_progress"`12581259        The status of the item. Has no effect on the conversation.12601261        - `"completed"`12621263        - `"incomplete"`12641265        - `"in_progress"`12661267    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`12681269      A Realtime item responding to an MCP approval request.12701271      - `id: string`12721273        The unique ID of the approval response.12741275      - `approval_request_id: string`12761277        The ID of the approval request being answered.12781279      - `approve: boolean`12801281        Whether the request was approved.12821283      - `type: "mcp_approval_response"`12841285        The type of the item. Always `mcp_approval_response`.12861287        - `"mcp_approval_response"`12881289      - `reason: optional string or null`12901291        Optional reason for the decision.12921293    - `RealtimeMcpListTools object { server_label, tools, type, id }`12941295      A Realtime item listing tools available on an MCP server.12961297      - `server_label: string`12981299        The label of the MCP server.13001301      - `tools: array of object { input_schema, name, annotations, description }`13021303        The tools available on the server.13041305        - `input_schema: unknown`13061307          The JSON schema describing the tool's input.13081309        - `name: string`13101311          The name of the tool.13121313        - `annotations: optional unknown or null`13141315          Additional annotations about the tool.13161317        - `description: optional string or null`13181319          The description of the tool.13201321      - `type: "mcp_list_tools"`13221323        The type of the item. Always `mcp_list_tools`.13241325        - `"mcp_list_tools"`13261327      - `id: optional string`13281329        The unique ID of the list.13301331    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`13321333      A Realtime item representing an invocation of a tool on an MCP server.13341335      - `id: string`13361337        The unique ID of the tool call.13381339      - `arguments: string`13401341        A JSON string of the arguments passed to the tool.13421343      - `name: string`13441345        The name of the tool that was run.13461347      - `server_label: string`13481349        The label of the MCP server running the tool.13501351      - `type: "mcp_call"`13521353        The type of the item. Always `mcp_call`.13541355        - `"mcp_call"`13561357      - `approval_request_id: optional string or null`13581359        The ID of an associated approval request, if any.13601361      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`13621363        The error from the tool call, if any.13641365        - `RealtimeMcpProtocolError object { code, message, type }`13661367          - `code: number`13681369          - `message: string`13701371          - `type: "protocol_error"`13721373            - `"protocol_error"`13741375        - `RealtimeMcpToolExecutionError object { message, type }`13761377          - `message: string`13781379          - `type: "tool_execution_error"`13801381            - `"tool_execution_error"`13821383        - `RealtimeMcphttpError object { code, message, type }`13841385          - `code: number`13861387          - `message: string`13881389          - `type: "http_error"`13901391            - `"http_error"`13921393      - `output: optional string or null`13941395        The output from the tool call.13961397    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`13981399      A Realtime item requesting human approval of a tool invocation.14001401      - `id: string`14021403        The unique ID of the approval request.14041405      - `arguments: string`14061407        A JSON string of arguments for the tool.14081409      - `name: string`14101411        The name of the tool to run.14121413      - `server_label: string`14141415        The label of the MCP server making the request.14161417      - `type: "mcp_approval_request"`14181419        The type of the item. Always `mcp_approval_request`.14201421        - `"mcp_approval_request"`14221423  - `type: "conversation.item.create"`14241425    The event type, must be `conversation.item.create`.14261427    - `"conversation.item.create"`14281429  - `event_id: optional string`14301431    Optional client-generated ID used to identify this event.14321433  - `previous_item_id: optional string`14341435    The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation.14361437    If set to `root`, the new item will be added to the beginning of the conversation.14381439    If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.14401441### Conversation Item Created Event14421443- `ConversationItemCreatedEvent object { event_id, item, type, previous_item_id }`14441445  Returned when a conversation item is created. There are several scenarios that produce this event:14461447  - The server is generating a Response, which if successful will produce1448    either one or two Items, which will be of type `message`1449    (role `assistant`) or type `function_call`.1450  - The input audio buffer has been committed, either by the client or the1451    server (in `server_vad` mode). The server will take the content of the1452    input audio buffer and add it to a new user message Item.1453  - The client has sent a `conversation.item.create` event to add a new Item1454    to the Conversation.14551456  - `event_id: string`14571458    The unique ID of the server event.14591460  - `item: ConversationItem`14611462    A single item within a Realtime conversation.14631464    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`14651466      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.14671468      - `content: array of object { text, type }`14691470        The content of the message.14711472        - `text: optional string`14731474          The text content.14751476        - `type: optional "input_text"`14771478          The content type. Always `input_text` for system messages.14791480          - `"input_text"`14811482      - `role: "system"`14831484        The role of the message sender. Always `system`.14851486        - `"system"`14871488      - `type: "message"`14891490        The type of the item. Always `message`.14911492        - `"message"`14931494      - `id: optional string`14951496        The unique ID of the item. This may be provided by the client or generated by the server.14971498      - `object: optional "realtime.item"`14991500        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.15011502        - `"realtime.item"`15031504      - `status: optional "completed" or "incomplete" or "in_progress"`15051506        The status of the item. Has no effect on the conversation.15071508        - `"completed"`15091510        - `"incomplete"`15111512        - `"in_progress"`15131514    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`15151516      A user message item in a Realtime conversation.15171518      - `content: array of object { audio, detail, image_url, 3 more }`15191520        The content of the message.15211522        - `audio: optional string`15231524          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.15251526        - `detail: optional "auto" or "low" or "high"`15271528          The detail level of the image (for `input_image`). `auto` will default to `high`.15291530          - `"auto"`15311532          - `"low"`15331534          - `"high"`15351536        - `image_url: optional string`15371538          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.15391540        - `text: optional string`15411542          The text content (for `input_text`).15431544        - `transcript: optional string`15451546          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.15471548        - `type: optional "input_text" or "input_audio" or "input_image"`15491550          The content type (`input_text`, `input_audio`, or `input_image`).15511552          - `"input_text"`15531554          - `"input_audio"`15551556          - `"input_image"`15571558      - `role: "user"`15591560        The role of the message sender. Always `user`.15611562        - `"user"`15631564      - `type: "message"`15651566        The type of the item. Always `message`.15671568        - `"message"`15691570      - `id: optional string`15711572        The unique ID of the item. This may be provided by the client or generated by the server.15731574      - `object: optional "realtime.item"`15751576        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.15771578        - `"realtime.item"`15791580      - `status: optional "completed" or "incomplete" or "in_progress"`15811582        The status of the item. Has no effect on the conversation.15831584        - `"completed"`15851586        - `"incomplete"`15871588        - `"in_progress"`15891590    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`15911592      An assistant message item in a Realtime conversation.15931594      - `content: array of object { audio, text, transcript, type }`15951596        The content of the message.15971598        - `audio: optional string`15991600          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.16011602        - `text: optional string`16031604          The text content.16051606        - `transcript: optional string`16071608          The transcript of the audio content, this will always be present if the output type is `audio`.16091610        - `type: optional "output_text" or "output_audio"`16111612          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.16131614          - `"output_text"`16151616          - `"output_audio"`16171618      - `role: "assistant"`16191620        The role of the message sender. Always `assistant`.16211622        - `"assistant"`16231624      - `type: "message"`16251626        The type of the item. Always `message`.16271628        - `"message"`16291630      - `id: optional string`16311632        The unique ID of the item. This may be provided by the client or generated by the server.16331634      - `object: optional "realtime.item"`16351636        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.16371638        - `"realtime.item"`16391640      - `status: optional "completed" or "incomplete" or "in_progress"`16411642        The status of the item. Has no effect on the conversation.16431644        - `"completed"`16451646        - `"incomplete"`16471648        - `"in_progress"`16491650    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`16511652      A function call item in a Realtime conversation.16531654      - `arguments: string`16551656        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.16571658      - `name: string`16591660        The name of the function being called.16611662      - `type: "function_call"`16631664        The type of the item. Always `function_call`.16651666        - `"function_call"`16671668      - `id: optional string`16691670        The unique ID of the item. This may be provided by the client or generated by the server.16711672      - `call_id: optional string`16731674        The ID of the function call.16751676      - `object: optional "realtime.item"`16771678        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.16791680        - `"realtime.item"`16811682      - `status: optional "completed" or "incomplete" or "in_progress"`16831684        The status of the item. Has no effect on the conversation.16851686        - `"completed"`16871688        - `"incomplete"`16891690        - `"in_progress"`16911692    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`16931694      A function call output item in a Realtime conversation.16951696      - `call_id: string`16971698        The ID of the function call this output is for.16991700      - `output: string`17011702        The output of the function call, this is free text and can contain any information or simply be empty.17031704      - `type: "function_call_output"`17051706        The type of the item. Always `function_call_output`.17071708        - `"function_call_output"`17091710      - `id: optional string`17111712        The unique ID of the item. This may be provided by the client or generated by the server.17131714      - `object: optional "realtime.item"`17151716        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.17171718        - `"realtime.item"`17191720      - `status: optional "completed" or "incomplete" or "in_progress"`17211722        The status of the item. Has no effect on the conversation.17231724        - `"completed"`17251726        - `"incomplete"`17271728        - `"in_progress"`17291730    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`17311732      A Realtime item responding to an MCP approval request.17331734      - `id: string`17351736        The unique ID of the approval response.17371738      - `approval_request_id: string`17391740        The ID of the approval request being answered.17411742      - `approve: boolean`17431744        Whether the request was approved.17451746      - `type: "mcp_approval_response"`17471748        The type of the item. Always `mcp_approval_response`.17491750        - `"mcp_approval_response"`17511752      - `reason: optional string or null`17531754        Optional reason for the decision.17551756    - `RealtimeMcpListTools object { server_label, tools, type, id }`17571758      A Realtime item listing tools available on an MCP server.17591760      - `server_label: string`17611762        The label of the MCP server.17631764      - `tools: array of object { input_schema, name, annotations, description }`17651766        The tools available on the server.17671768        - `input_schema: unknown`17691770          The JSON schema describing the tool's input.17711772        - `name: string`17731774          The name of the tool.17751776        - `annotations: optional unknown or null`17771778          Additional annotations about the tool.17791780        - `description: optional string or null`17811782          The description of the tool.17831784      - `type: "mcp_list_tools"`17851786        The type of the item. Always `mcp_list_tools`.17871788        - `"mcp_list_tools"`17891790      - `id: optional string`17911792        The unique ID of the list.17931794    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`17951796      A Realtime item representing an invocation of a tool on an MCP server.17971798      - `id: string`17991800        The unique ID of the tool call.18011802      - `arguments: string`18031804        A JSON string of the arguments passed to the tool.18051806      - `name: string`18071808        The name of the tool that was run.18091810      - `server_label: string`18111812        The label of the MCP server running the tool.18131814      - `type: "mcp_call"`18151816        The type of the item. Always `mcp_call`.18171818        - `"mcp_call"`18191820      - `approval_request_id: optional string or null`18211822        The ID of an associated approval request, if any.18231824      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`18251826        The error from the tool call, if any.18271828        - `RealtimeMcpProtocolError object { code, message, type }`18291830          - `code: number`18311832          - `message: string`18331834          - `type: "protocol_error"`18351836            - `"protocol_error"`18371838        - `RealtimeMcpToolExecutionError object { message, type }`18391840          - `message: string`18411842          - `type: "tool_execution_error"`18431844            - `"tool_execution_error"`18451846        - `RealtimeMcphttpError object { code, message, type }`18471848          - `code: number`18491850          - `message: string`18511852          - `type: "http_error"`18531854            - `"http_error"`18551856      - `output: optional string or null`18571858        The output from the tool call.18591860    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`18611862      A Realtime item requesting human approval of a tool invocation.18631864      - `id: string`18651866        The unique ID of the approval request.18671868      - `arguments: string`18691870        A JSON string of arguments for the tool.18711872      - `name: string`18731874        The name of the tool to run.18751876      - `server_label: string`18771878        The label of the MCP server making the request.18791880      - `type: "mcp_approval_request"`18811882        The type of the item. Always `mcp_approval_request`.18831884        - `"mcp_approval_request"`18851886  - `type: "conversation.item.created"`18871888    The event type, must be `conversation.item.created`.18891890    - `"conversation.item.created"`18911892  - `previous_item_id: optional string or null`18931894    The ID of the preceding item in the Conversation context, allows the1895    client to understand the order of the conversation. Can be `null` if the1896    item has no predecessor.18971898### Conversation Item Delete Event18991900- `ConversationItemDeleteEvent object { item_id, type, event_id }`19011902  Send this event when you want to remove any item from the conversation1903  history. The server will respond with a `conversation.item.deleted` event,1904  unless the item does not exist in the conversation history, in which case the1905  server will respond with an error.19061907  - `item_id: string`19081909    The ID of the item to delete.19101911  - `type: "conversation.item.delete"`19121913    The event type, must be `conversation.item.delete`.19141915    - `"conversation.item.delete"`19161917  - `event_id: optional string`19181919    Optional client-generated ID used to identify this event.19201921### Conversation Item Deleted Event19221923- `ConversationItemDeletedEvent object { event_id, item_id, type }`19241925  Returned when an item in the conversation is deleted by the client with a1926  `conversation.item.delete` event. This event is used to synchronize the1927  server's understanding of the conversation history with the client's view.19281929  - `event_id: string`19301931    The unique ID of the server event.19321933  - `item_id: string`19341935    The ID of the item that was deleted.19361937  - `type: "conversation.item.deleted"`19381939    The event type, must be `conversation.item.deleted`.19401941    - `"conversation.item.deleted"`19421943### Conversation Item Done19441945- `ConversationItemDone object { event_id, item, type, previous_item_id }`19461947  Returned when a conversation item is finalized.19481949  The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.19501951  - `event_id: string`19521953    The unique ID of the server event.19541955  - `item: ConversationItem`19561957    A single item within a Realtime conversation.19581959    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`19601961      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.19621963      - `content: array of object { text, type }`19641965        The content of the message.19661967        - `text: optional string`19681969          The text content.19701971        - `type: optional "input_text"`19721973          The content type. Always `input_text` for system messages.19741975          - `"input_text"`19761977      - `role: "system"`19781979        The role of the message sender. Always `system`.19801981        - `"system"`19821983      - `type: "message"`19841985        The type of the item. Always `message`.19861987        - `"message"`19881989      - `id: optional string`19901991        The unique ID of the item. This may be provided by the client or generated by the server.19921993      - `object: optional "realtime.item"`19941995        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.19961997        - `"realtime.item"`19981999      - `status: optional "completed" or "incomplete" or "in_progress"`20002001        The status of the item. Has no effect on the conversation.20022003        - `"completed"`20042005        - `"incomplete"`20062007        - `"in_progress"`20082009    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`20102011      A user message item in a Realtime conversation.20122013      - `content: array of object { audio, detail, image_url, 3 more }`20142015        The content of the message.20162017        - `audio: optional string`20182019          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.20202021        - `detail: optional "auto" or "low" or "high"`20222023          The detail level of the image (for `input_image`). `auto` will default to `high`.20242025          - `"auto"`20262027          - `"low"`20282029          - `"high"`20302031        - `image_url: optional string`20322033          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.20342035        - `text: optional string`20362037          The text content (for `input_text`).20382039        - `transcript: optional string`20402041          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.20422043        - `type: optional "input_text" or "input_audio" or "input_image"`20442045          The content type (`input_text`, `input_audio`, or `input_image`).20462047          - `"input_text"`20482049          - `"input_audio"`20502051          - `"input_image"`20522053      - `role: "user"`20542055        The role of the message sender. Always `user`.20562057        - `"user"`20582059      - `type: "message"`20602061        The type of the item. Always `message`.20622063        - `"message"`20642065      - `id: optional string`20662067        The unique ID of the item. This may be provided by the client or generated by the server.20682069      - `object: optional "realtime.item"`20702071        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.20722073        - `"realtime.item"`20742075      - `status: optional "completed" or "incomplete" or "in_progress"`20762077        The status of the item. Has no effect on the conversation.20782079        - `"completed"`20802081        - `"incomplete"`20822083        - `"in_progress"`20842085    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`20862087      An assistant message item in a Realtime conversation.20882089      - `content: array of object { audio, text, transcript, type }`20902091        The content of the message.20922093        - `audio: optional string`20942095          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.20962097        - `text: optional string`20982099          The text content.21002101        - `transcript: optional string`21022103          The transcript of the audio content, this will always be present if the output type is `audio`.21042105        - `type: optional "output_text" or "output_audio"`21062107          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.21082109          - `"output_text"`21102111          - `"output_audio"`21122113      - `role: "assistant"`21142115        The role of the message sender. Always `assistant`.21162117        - `"assistant"`21182119      - `type: "message"`21202121        The type of the item. Always `message`.21222123        - `"message"`21242125      - `id: optional string`21262127        The unique ID of the item. This may be provided by the client or generated by the server.21282129      - `object: optional "realtime.item"`21302131        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.21322133        - `"realtime.item"`21342135      - `status: optional "completed" or "incomplete" or "in_progress"`21362137        The status of the item. Has no effect on the conversation.21382139        - `"completed"`21402141        - `"incomplete"`21422143        - `"in_progress"`21442145    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`21462147      A function call item in a Realtime conversation.21482149      - `arguments: string`21502151        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.21522153      - `name: string`21542155        The name of the function being called.21562157      - `type: "function_call"`21582159        The type of the item. Always `function_call`.21602161        - `"function_call"`21622163      - `id: optional string`21642165        The unique ID of the item. This may be provided by the client or generated by the server.21662167      - `call_id: optional string`21682169        The ID of the function call.21702171      - `object: optional "realtime.item"`21722173        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.21742175        - `"realtime.item"`21762177      - `status: optional "completed" or "incomplete" or "in_progress"`21782179        The status of the item. Has no effect on the conversation.21802181        - `"completed"`21822183        - `"incomplete"`21842185        - `"in_progress"`21862187    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`21882189      A function call output item in a Realtime conversation.21902191      - `call_id: string`21922193        The ID of the function call this output is for.21942195      - `output: string`21962197        The output of the function call, this is free text and can contain any information or simply be empty.21982199      - `type: "function_call_output"`22002201        The type of the item. Always `function_call_output`.22022203        - `"function_call_output"`22042205      - `id: optional string`22062207        The unique ID of the item. This may be provided by the client or generated by the server.22082209      - `object: optional "realtime.item"`22102211        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.22122213        - `"realtime.item"`22142215      - `status: optional "completed" or "incomplete" or "in_progress"`22162217        The status of the item. Has no effect on the conversation.22182219        - `"completed"`22202221        - `"incomplete"`22222223        - `"in_progress"`22242225    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`22262227      A Realtime item responding to an MCP approval request.22282229      - `id: string`22302231        The unique ID of the approval response.22322233      - `approval_request_id: string`22342235        The ID of the approval request being answered.22362237      - `approve: boolean`22382239        Whether the request was approved.22402241      - `type: "mcp_approval_response"`22422243        The type of the item. Always `mcp_approval_response`.22442245        - `"mcp_approval_response"`22462247      - `reason: optional string or null`22482249        Optional reason for the decision.22502251    - `RealtimeMcpListTools object { server_label, tools, type, id }`22522253      A Realtime item listing tools available on an MCP server.22542255      - `server_label: string`22562257        The label of the MCP server.22582259      - `tools: array of object { input_schema, name, annotations, description }`22602261        The tools available on the server.22622263        - `input_schema: unknown`22642265          The JSON schema describing the tool's input.22662267        - `name: string`22682269          The name of the tool.22702271        - `annotations: optional unknown or null`22722273          Additional annotations about the tool.22742275        - `description: optional string or null`22762277          The description of the tool.22782279      - `type: "mcp_list_tools"`22802281        The type of the item. Always `mcp_list_tools`.22822283        - `"mcp_list_tools"`22842285      - `id: optional string`22862287        The unique ID of the list.22882289    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`22902291      A Realtime item representing an invocation of a tool on an MCP server.22922293      - `id: string`22942295        The unique ID of the tool call.22962297      - `arguments: string`22982299        A JSON string of the arguments passed to the tool.23002301      - `name: string`23022303        The name of the tool that was run.23042305      - `server_label: string`23062307        The label of the MCP server running the tool.23082309      - `type: "mcp_call"`23102311        The type of the item. Always `mcp_call`.23122313        - `"mcp_call"`23142315      - `approval_request_id: optional string or null`23162317        The ID of an associated approval request, if any.23182319      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`23202321        The error from the tool call, if any.23222323        - `RealtimeMcpProtocolError object { code, message, type }`23242325          - `code: number`23262327          - `message: string`23282329          - `type: "protocol_error"`23302331            - `"protocol_error"`23322333        - `RealtimeMcpToolExecutionError object { message, type }`23342335          - `message: string`23362337          - `type: "tool_execution_error"`23382339            - `"tool_execution_error"`23402341        - `RealtimeMcphttpError object { code, message, type }`23422343          - `code: number`23442345          - `message: string`23462347          - `type: "http_error"`23482349            - `"http_error"`23502351      - `output: optional string or null`23522353        The output from the tool call.23542355    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`23562357      A Realtime item requesting human approval of a tool invocation.23582359      - `id: string`23602361        The unique ID of the approval request.23622363      - `arguments: string`23642365        A JSON string of arguments for the tool.23662367      - `name: string`23682369        The name of the tool to run.23702371      - `server_label: string`23722373        The label of the MCP server making the request.23742375      - `type: "mcp_approval_request"`23762377        The type of the item. Always `mcp_approval_request`.23782379        - `"mcp_approval_request"`23802381  - `type: "conversation.item.done"`23822383    The event type, must be `conversation.item.done`.23842385    - `"conversation.item.done"`23862387  - `previous_item_id: optional string or null`23882389    The ID of the item that precedes this one, if any. This is used to2390    maintain ordering when items are inserted.23912392### Conversation Item Input Audio Transcription Completed Event23932394- `ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more }`23952396  This event is the output of audio transcription for user audio written to the2397  user audio buffer. Transcription begins when the input audio buffer is2398  committed by the client or server (when VAD is enabled). Transcription runs2399  asynchronously with Response creation, so this event may come before or after2400  the Response events.24012402  Realtime API models accept audio natively, and thus input transcription is a2403  separate process run on a separate ASR (Automatic Speech Recognition) model.2404  The transcript may diverge somewhat from the model's interpretation, and2405  should be treated as a rough guide.24062407  - `content_index: number`24082409    The index of the content part containing the audio.24102411  - `event_id: string`24122413    The unique ID of the server event.24142415  - `item_id: string`24162417    The ID of the item containing the audio that is being transcribed.24182419  - `transcript: string`24202421    The transcribed text.24222423  - `type: "conversation.item.input_audio_transcription.completed"`24242425    The event type, must be2426    `conversation.item.input_audio_transcription.completed`.24272428    - `"conversation.item.input_audio_transcription.completed"`24292430  - `usage: object { input_tokens, output_tokens, total_tokens, 2 more }  or object { seconds, type }`24312432    Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing.24332434    - `Tokens object { input_tokens, output_tokens, total_tokens, 2 more }`24352436      Usage statistics for models billed by token usage.24372438      - `input_tokens: number`24392440        Number of input tokens billed for this request.24412442      - `output_tokens: number`24432444        Number of output tokens generated.24452446      - `total_tokens: number`24472448        Total number of tokens used (input + output).24492450      - `type: "tokens"`24512452        The type of the usage object. Always `tokens` for this variant.24532454        - `"tokens"`24552456      - `input_token_details: optional object { audio_tokens, text_tokens }`24572458        Details about the input tokens billed for this request.24592460        - `audio_tokens: optional number`24612462          Number of audio tokens billed for this request.24632464        - `text_tokens: optional number`24652466          Number of text tokens billed for this request.24672468    - `Duration object { seconds, type }`24692470      Usage statistics for models billed by audio input duration.24712472      - `seconds: number`24732474        Duration of the input audio in seconds.24752476      - `type: "duration"`24772478        The type of the usage object. Always `duration` for this variant.24792480        - `"duration"`24812482  - `languages: optional array of TranscriptionLanguage`24832484    The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.24852486    - `code: string`24872488      The code of a language detected in the audio.24892490  - `logprobs: optional array of LogProbProperties or null`24912492    The log probabilities of the transcription.24932494    - `token: string`24952496      The token that was used to generate the log probability.24972498    - `bytes: array of number`24992500      The bytes that were used to generate the log probability.25012502    - `logprob: number`25032504      The log probability of the token.25052506### Conversation Item Input Audio Transcription Delta Event25072508- `ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more }`25092510  Returned when the text value of an input audio transcription content part is updated with incremental transcription results.25112512  - `event_id: string`25132514    The unique ID of the server event.25152516  - `item_id: string`25172518    The ID of the item containing the audio that is being transcribed.25192520  - `type: "conversation.item.input_audio_transcription.delta"`25212522    The event type, must be `conversation.item.input_audio_transcription.delta`.25232524    - `"conversation.item.input_audio_transcription.delta"`25252526  - `content_index: optional number`25272528    The index of the content part in the item's content array.25292530  - `delta: optional string`25312532    The text delta.25332534  - `logprobs: optional array of LogProbProperties or null`25352536    The log probabilities of the transcription. These can be enabled by configurating the session with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.25372538    - `token: string`25392540      The token that was used to generate the log probability.25412542    - `bytes: array of number`25432544      The bytes that were used to generate the log probability.25452546    - `logprob: number`25472548      The log probability of the token.25492550### Conversation Item Input Audio Transcription Failed Event25512552- `ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more }`25532554  Returned when input audio transcription is configured, and a transcription2555  request for a user message failed. These events are separate from other2556  `error` events so that the client can identify the related Item.25572558  - `content_index: number`25592560    The index of the content part containing the audio.25612562  - `error: object { code, message, param, type }`25632564    Details of the transcription error.25652566    - `code: optional string`25672568      Error code, if any.25692570    - `message: optional string`25712572      A human-readable error message.25732574    - `param: optional string`25752576      Parameter related to the error, if any.25772578    - `type: optional string`25792580      The type of error.25812582  - `event_id: string`25832584    The unique ID of the server event.25852586  - `item_id: string`25872588    The ID of the user message item.25892590  - `type: "conversation.item.input_audio_transcription.failed"`25912592    The event type, must be2593    `conversation.item.input_audio_transcription.failed`.25942595    - `"conversation.item.input_audio_transcription.failed"`25962597### Conversation Item Input Audio Transcription Segment25982599- `ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more }`26002601  Returned when an input audio transcription segment is identified for an item.26022603  - `id: string`26042605    The segment identifier.26062607  - `content_index: number`26082609    The index of the input audio content part within the item.26102611  - `end: number`26122613    End time of the segment in seconds.26142615  - `event_id: string`26162617    The unique ID of the server event.26182619  - `item_id: string`26202621    The ID of the item containing the input audio content.26222623  - `speaker: string`26242625    The detected speaker label for this segment.26262627  - `start: number`26282629    Start time of the segment in seconds.26302631  - `text: string`26322633    The text for this segment.26342635  - `type: "conversation.item.input_audio_transcription.segment"`26362637    The event type, must be `conversation.item.input_audio_transcription.segment`.26382639    - `"conversation.item.input_audio_transcription.segment"`26402641### Conversation Item Retrieve Event26422643- `ConversationItemRetrieveEvent object { item_id, type, event_id }`26442645  Send this event when you want to retrieve the server's representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.2646  The server will respond with a `conversation.item.retrieved` event,2647  unless the item does not exist in the conversation history, in which case the2648  server will respond with an error.26492650  - `item_id: string`26512652    The ID of the item to retrieve.26532654  - `type: "conversation.item.retrieve"`26552656    The event type, must be `conversation.item.retrieve`.26572658    - `"conversation.item.retrieve"`26592660  - `event_id: optional string`26612662    Optional client-generated ID used to identify this event.26632664### Conversation Item Truncate Event26652666- `ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more }`26672668  Send this event to truncate a previous assistant message’s audio. The server2669  will produce audio faster than realtime, so this event is useful when the user2670  interrupts to truncate audio that has already been sent to the client but not2671  yet played. This will synchronize the server's understanding of the audio with2672  the client's playback.26732674  Truncating audio will delete the server-side text transcript to ensure there2675  is not text in the context that hasn't been heard by the user.26762677  If successful, the server will respond with a `conversation.item.truncated`2678  event.26792680  - `audio_end_ms: number`26812682    Inclusive duration up to which audio is truncated, in milliseconds. If2683    the audio_end_ms is greater than the actual audio duration, the server2684    will respond with an error.26852686  - `content_index: number`26872688    The index of the content part to truncate. Set this to `0`.26892690  - `item_id: string`26912692    The ID of the assistant message item to truncate. Only assistant message2693    items can be truncated.26942695  - `type: "conversation.item.truncate"`26962697    The event type, must be `conversation.item.truncate`.26982699    - `"conversation.item.truncate"`27002701  - `event_id: optional string`27022703    Optional client-generated ID used to identify this event.27042705### Conversation Item Truncated Event27062707- `ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more }`27082709  Returned when an earlier assistant audio message item is truncated by the2710  client with a `conversation.item.truncate` event. This event is used to2711  synchronize the server's understanding of the audio with the client's playback.27122713  This action will truncate the audio and remove the server-side text transcript2714  to ensure there is no text in the context that hasn't been heard by the user.27152716  - `audio_end_ms: number`27172718    The duration up to which the audio was truncated, in milliseconds.27192720  - `content_index: number`27212722    The index of the content part that was truncated.27232724  - `event_id: string`27252726    The unique ID of the server event.27272728  - `item_id: string`27292730    The ID of the assistant message item that was truncated.27312732  - `type: "conversation.item.truncated"`27332734    The event type, must be `conversation.item.truncated`.27352736    - `"conversation.item.truncated"`27372738### Conversation Item With Reference27392740- `ConversationItemWithReference object { id, arguments, call_id, 7 more }`27412742  The item to add to the conversation.27432744  - `id: optional string`27452746    For an item of type (`message` | `function_call` | `function_call_output`)2747    this field allows the client to assign the unique ID of the item. It is2748    not required because the server will generate one if not provided.27492750    For an item of type `item_reference`, this field is required and is a2751    reference to any item that has previously existed in the conversation.27522753  - `arguments: optional string`27542755    The arguments of the function call (for `function_call` items).27562757  - `call_id: optional string`27582759    The ID of the function call (for `function_call` and2760    `function_call_output` items). If passed on a `function_call_output`2761    item, the server will check that a `function_call` item with the same2762    ID exists in the conversation history.27632764  - `content: optional array of object { id, audio, text, 2 more }`27652766    The content of the message, applicable for `message` items.27672768    - Message items of role `system` support only `input_text` content2769    - Message items of role `user` support `input_text` and `input_audio`2770      content2771    - Message items of role `assistant` support `text` content.27722773    - `id: optional string`27742775      ID of a previous conversation item to reference (for `item_reference`2776      content types in `response.create` events). These can reference both2777      client and server created items.27782779    - `audio: optional string`27802781      Base64-encoded audio bytes, used for `input_audio` content type.27822783    - `text: optional string`27842785      The text content, used for `input_text` and `text` content types.27862787    - `transcript: optional string`27882789      The transcript of the audio, used for `input_audio` content type.27902791    - `type: optional "input_audio" or "input_text" or "item_reference" or "text"`27922793      The content type (`input_text`, `input_audio`, `item_reference`, `text`).27942795      - `"input_audio"`27962797      - `"input_text"`27982799      - `"item_reference"`28002801      - `"text"`28022803  - `name: optional string`28042805    The name of the function being called (for `function_call` items).28062807  - `object: optional "realtime.item"`28082809    Identifier for the API object being returned - always `realtime.item`.28102811    - `"realtime.item"`28122813  - `output: optional string`28142815    The output of the function call (for `function_call_output` items).28162817  - `role: optional "user" or "assistant" or "system"`28182819    The role of the message sender (`user`, `assistant`, `system`), only2820    applicable for `message` items.28212822    - `"user"`28232824    - `"assistant"`28252826    - `"system"`28272828  - `status: optional "completed" or "incomplete" or "in_progress"`28292830    The status of the item (`completed`, `incomplete`, `in_progress`). These have no effect2831    on the conversation, but are accepted for consistency with the2832    `conversation.item.created` event.28332834    - `"completed"`28352836    - `"incomplete"`28372838    - `"in_progress"`28392840  - `type: optional "message" or "function_call" or "function_call_output"`28412842    The type of the item (`message`, `function_call`, `function_call_output`, `item_reference`).28432844    - `"message"`28452846    - `"function_call"`28472848    - `"function_call_output"`28492850### Input Audio Buffer Append Event28512852- `InputAudioBufferAppendEvent object { audio, type, event_id }`28532854  Send this event to append audio bytes to the input audio buffer. The audio2855  buffer is temporary storage you can write to and later commit. A "commit" will create a new2856  user message item in the conversation history from the buffer content and clear the buffer.2857  Input audio transcription (if enabled) will be generated when the buffer is committed.28582859  If VAD is enabled the audio buffer is used to detect speech and the server will decide2860  when to commit. When Server VAD is disabled, you must commit the audio buffer2861  manually. Input audio noise reduction operates on writes to the audio buffer.28622863  The client may choose how much audio to place in each event up to a maximum2864  of 15 MiB, for example streaming smaller chunks from the client may allow the2865  VAD to be more responsive. Unlike most other client events, the server will2866  not send a confirmation response to this event.28672868  - `audio: string`28692870    Base64-encoded audio bytes. This must be in the format specified by the2871    `input_audio_format` field in the session configuration.28722873  - `type: "input_audio_buffer.append"`28742875    The event type, must be `input_audio_buffer.append`.28762877    - `"input_audio_buffer.append"`28782879  - `event_id: optional string`28802881    Optional client-generated ID used to identify this event.28822883### Input Audio Buffer Clear Event28842885- `InputAudioBufferClearEvent object { type, event_id }`28862887  Send this event to clear the audio bytes in the buffer. The server will2888  respond with an `input_audio_buffer.cleared` event.28892890  - `type: "input_audio_buffer.clear"`28912892    The event type, must be `input_audio_buffer.clear`.28932894    - `"input_audio_buffer.clear"`28952896  - `event_id: optional string`28972898    Optional client-generated ID used to identify this event.28992900### Input Audio Buffer Cleared Event29012902- `InputAudioBufferClearedEvent object { event_id, type }`29032904  Returned when the input audio buffer is cleared by the client with a2905  `input_audio_buffer.clear` event.29062907  - `event_id: string`29082909    The unique ID of the server event.29102911  - `type: "input_audio_buffer.cleared"`29122913    The event type, must be `input_audio_buffer.cleared`.29142915    - `"input_audio_buffer.cleared"`29162917### Input Audio Buffer Commit Event29182919- `InputAudioBufferCommitEvent object { type, event_id }`29202921  Send this event to commit the user input audio buffer, which will create a  new user message item in the conversation. This event will produce an error  if the input audio buffer is empty. When in Server VAD mode, the client does  not need to send this event, the server will commit the audio buffer  automatically.29222923  Committing the input audio buffer will trigger input audio transcription  (if enabled in session configuration), but it will not create a response  from the model. The server will respond with an `input_audio_buffer.committed` event.29242925  - `type: "input_audio_buffer.commit"`29262927    The event type, must be `input_audio_buffer.commit`.29282929    - `"input_audio_buffer.commit"`29302931  - `event_id: optional string`29322933    Optional client-generated ID used to identify this event.29342935### Input Audio Buffer Committed Event29362937- `InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id }`29382939  Returned when an input audio buffer is committed, either by the client or2940  automatically in server VAD mode. The `item_id` property is the ID of the user2941  message item that will be created, thus a `conversation.item.created` event2942  will also be sent to the client.29432944  - `event_id: string`29452946    The unique ID of the server event.29472948  - `item_id: string`29492950    The ID of the user message item that will be created.29512952  - `type: "input_audio_buffer.committed"`29532954    The event type, must be `input_audio_buffer.committed`.29552956    - `"input_audio_buffer.committed"`29572958  - `previous_item_id: optional string or null`29592960    The ID of the preceding item after which the new item will be inserted.2961    Can be `null` if the item has no predecessor.29622963### Input Audio Buffer Dtmf Event Received Event29642965- `InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type }`29662967  **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that2968  represents a telephone keypad press (0–9, *, #, A–D). The `event` property2969  is the keypad that the user press. The `received_at` is the UTC Unix Timestamp2970  that the server received the event.29712972  - `event: string`29732974    The telephone keypad that was pressed by the user.29752976  - `received_at: number`29772978    UTC Unix Timestamp when DTMF Event was received by server.29792980  - `type: "input_audio_buffer.dtmf_event_received"`29812982    The event type, must be `input_audio_buffer.dtmf_event_received`.29832984    - `"input_audio_buffer.dtmf_event_received"`29852986### Input Audio Buffer Speech Started Event29872988- `InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type }`29892990  Sent by the server when in `server_vad` mode to indicate that speech has been2991  detected in the audio buffer. This can happen any time audio is added to the2992  buffer (unless speech is already detected). The client may want to use this2993  event to interrupt audio playback or provide visual feedback to the user.29942995  The client should expect to receive a `input_audio_buffer.speech_stopped` event2996  when speech stops. The `item_id` property is the ID of the user message item2997  that will be created when speech stops and will also be included in the2998  `input_audio_buffer.speech_stopped` event (unless the client manually commits2999  the audio buffer during VAD activation).30003001  - `audio_start_ms: number`30023003    Milliseconds from the start of all audio written to the buffer during the3004    session when speech was first detected. This will correspond to the3005    beginning of audio sent to the model, and thus includes the3006    `prefix_padding_ms` configured in the Session.30073008  - `event_id: string`30093010    The unique ID of the server event.30113012  - `item_id: string`30133014    The ID of the user message item that will be created when speech stops.30153016  - `type: "input_audio_buffer.speech_started"`30173018    The event type, must be `input_audio_buffer.speech_started`.30193020    - `"input_audio_buffer.speech_started"`30213022### Input Audio Buffer Speech Stopped Event30233024- `InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type }`30253026  Returned in `server_vad` mode when the server detects the end of speech in3027  the audio buffer. The server will also send an `conversation.item.created`3028  event with the user message item that is created from the audio buffer.30293030  - `audio_end_ms: number`30313032    Milliseconds since the session started when speech stopped. This will3033    correspond to the end of audio sent to the model, and thus includes the3034    `min_silence_duration_ms` configured in the Session.30353036  - `event_id: string`30373038    The unique ID of the server event.30393040  - `item_id: string`30413042    The ID of the user message item that will be created.30433044  - `type: "input_audio_buffer.speech_stopped"`30453046    The event type, must be `input_audio_buffer.speech_stopped`.30473048    - `"input_audio_buffer.speech_stopped"`30493050### Input Audio Buffer Timeout Triggered30513052- `InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more }`30533054  Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured3055  with `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that3056  there hasn't been any speech detected for the configured duration.30573058  The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last3059  model response up to the triggering time, as an offset from the beginning of audio written3060  to the input audio buffer. This means it demarcates the segment of audio that was silent and3061  the difference between the start and end values will roughly match the configured timeout.30623063  The empty audio will be committed to the conversation as an `input_audio` item (there will be a3064  `input_audio_buffer.committed` event) and a model response will be generated. There may be speech3065  that didn't trigger VAD but is still detected by the model, so the model may respond with3066  something relevant to the conversation or a prompt to continue speaking.30673068  - `audio_end_ms: number`30693070    Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered.30713072  - `audio_start_ms: number`30733074    Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.30753076  - `event_id: string`30773078    The unique ID of the server event.30793080  - `item_id: string`30813082    The ID of the item associated with this segment.30833084  - `type: "input_audio_buffer.timeout_triggered"`30853086    The event type, must be `input_audio_buffer.timeout_triggered`.30873088    - `"input_audio_buffer.timeout_triggered"`30893090### Log Prob Properties30913092- `LogProbProperties object { token, bytes, logprob }`30933094  A log probability object.30953096  - `token: string`30973098    The token that was used to generate the log probability.30993100  - `bytes: array of number`31013102    The bytes that were used to generate the log probability.31033104  - `logprob: number`31053106    The log probability of the token.31073108### Mcp List Tools Completed31093110- `McpListToolsCompleted object { event_id, item_id, type }`31113112  Returned when listing MCP tools has completed for an item.31133114  - `event_id: string`31153116    The unique ID of the server event.31173118  - `item_id: string`31193120    The ID of the MCP list tools item.31213122  - `type: "mcp_list_tools.completed"`31233124    The event type, must be `mcp_list_tools.completed`.31253126    - `"mcp_list_tools.completed"`31273128### Mcp List Tools Failed31293130- `McpListToolsFailed object { event_id, item_id, type }`31313132  Returned when listing MCP tools has failed for an item.31333134  - `event_id: string`31353136    The unique ID of the server event.31373138  - `item_id: string`31393140    The ID of the MCP list tools item.31413142  - `type: "mcp_list_tools.failed"`31433144    The event type, must be `mcp_list_tools.failed`.31453146    - `"mcp_list_tools.failed"`31473148### Mcp List Tools In Progress31493150- `McpListToolsInProgress object { event_id, item_id, type }`31513152  Returned when listing MCP tools is in progress for an item.31533154  - `event_id: string`31553156    The unique ID of the server event.31573158  - `item_id: string`31593160    The ID of the MCP list tools item.31613162  - `type: "mcp_list_tools.in_progress"`31633164    The event type, must be `mcp_list_tools.in_progress`.31653166    - `"mcp_list_tools.in_progress"`31673168### Noise Reduction Type31693170- `NoiseReductionType = "near_field" or "far_field"`31713172  Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.31733174  - `"near_field"`31753176  - `"far_field"`31773178### Output Audio Buffer Clear Event31793180- `OutputAudioBufferClearEvent object { type, event_id }`31813182  **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to3183  stop generating audio and emit a `output_audio_buffer.cleared` event. This3184  event should be preceded by a `response.cancel` client event to stop the3185  generation of the current response.3186  [Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).31873188  - `type: "output_audio_buffer.clear"`31893190    The event type, must be `output_audio_buffer.clear`.31913192    - `"output_audio_buffer.clear"`31933194  - `event_id: optional string`31953196    The unique ID of the client event used for error handling.31973198### Rate Limits Updated Event31993200- `RateLimitsUpdatedEvent object { event_id, rate_limits, type }`32013202  Emitted at the beginning of a Response to indicate the updated rate limits.3203  When a Response is created some tokens will be "reserved" for the output3204  tokens, the rate limits shown here reflect that reservation, which is then3205  adjusted accordingly once the Response is completed.32063207  - `event_id: string`32083209    The unique ID of the server event.32103211  - `rate_limits: array of object { limit, name, remaining, reset_seconds }`32123213    List of rate limit information.32143215    - `limit: optional number`32163217      The maximum allowed value for the rate limit.32183219    - `name: optional "requests" or "tokens"`32203221      The name of the rate limit (`requests`, `tokens`).32223223      - `"requests"`32243225      - `"tokens"`32263227    - `remaining: optional number`32283229      The remaining value before the limit is reached.32303231    - `reset_seconds: optional number`32323233      Seconds until the rate limit resets.32343235  - `type: "rate_limits.updated"`32363237    The event type, must be `rate_limits.updated`.32383239    - `"rate_limits.updated"`32403241### Realtime Audio Config32423243- `RealtimeAudioConfig object { input, output }`32443245  Configuration for input and output audio.32463247  - `input: optional RealtimeAudioConfigInput`32483249    - `format: optional RealtimeAudioFormats`32503251      The format of the input audio.32523253      - `PCMAudio object { rate, type }`32543255        The PCM audio format. Only a 24kHz sample rate is supported.32563257        - `rate: optional 24000`32583259          The sample rate of the audio. Always `24000`.32603261          - `24000`32623263        - `type: optional "audio/pcm"`32643265          The audio format. Always `audio/pcm`.32663267          - `"audio/pcm"`32683269      - `PCMUAudio object { type }`32703271        The G.711 μ-law format.32723273        - `type: optional "audio/pcmu"`32743275          The audio format. Always `audio/pcmu`.32763277          - `"audio/pcmu"`32783279      - `PCMAAudio object { type }`32803281        The G.711 A-law format.32823283        - `type: optional "audio/pcma"`32843285          The audio format. Always `audio/pcma`.32863287          - `"audio/pcma"`32883289    - `noise_reduction: optional object { type }`32903291      Configuration for input audio noise reduction. This can be set to `null` to turn off.3292      Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.3293      Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.32943295      - `type: optional NoiseReductionType`32963297        Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.32983299        - `"near_field"`33003301        - `"far_field"`33023303    - `transcription: optional AudioTranscription`33043305      Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.33063307      - `delay: optional "minimal" or "low" or "medium" or 2 more`33083309        Controls how long the model waits before emitting transcription text.3310        Higher values can improve transcription accuracy at the cost of latency.3311        Only supported with `gpt-realtime-whisper` in GA Realtime sessions.33123313        - `"minimal"`33143315        - `"low"`33163317        - `"medium"`33183319        - `"high"`33203321        - `"xhigh"`33223323      - `keywords: optional array of string`33243325        Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.33263327      - `language: optional string`33283329        The language of the input audio. Supplying the input language in3330        [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format3331        will improve accuracy and latency.33323333      - `languages: optional array of string`33343335        Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.33363337      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`33383339        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.33403341        - `string`33423343        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`33443345          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.33463347          - `"whisper-1"`33483349          - `"gpt-transcribe"`33503351          - `"gpt-live-transcribe"`33523353          - `"gpt-4o-mini-transcribe"`33543355          - `"gpt-4o-mini-transcribe-2025-12-15"`33563357          - `"gpt-4o-transcribe"`33583359          - `"gpt-4o-transcribe-diarize"`33603361          - `"gpt-realtime-whisper"`33623363      - `prompt: optional string`33643365        An optional text to guide the model's style or continue a previous audio3366        segment.3367        For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).3368        For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".3369        Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.33703371    - `turn_detection: optional RealtimeAudioInputTurnDetection or null`33723373      Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.33743375      Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.33763377      Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.33783379      For `gpt-realtime-whisper` transcription sessions, turn detection must be3380      set to `null`; VAD is not supported.33813382      - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`33833384        Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.33853386        - `type: "server_vad"`33873388          Type of turn detection, `server_vad` to turn on simple Server VAD.33893390          - `"server_vad"`33913392        - `create_response: optional boolean`33933394          Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.33953396          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.33973398        - `idle_timeout_ms: optional number or null`33993400          Optional timeout after which a model response will be triggered automatically. This is3401          useful for situations in which a long pause from the user is unexpected, such as a phone3402          call. The model will effectively prompt the user to continue the conversation based3403          on the current context.34043405          The timeout value will be applied after the last model response's audio has finished playing,3406          i.e. it's set to the `response.done` time plus audio playback duration.34073408          An `input_audio_buffer.timeout_triggered` event (plus events3409          associated with the Response) will be emitted when the timeout is reached.3410          Idle timeout is currently only supported for `server_vad` mode.34113412        - `interrupt_response: optional boolean`34133414          Whether or not to automatically interrupt (cancel) any ongoing response with output to the default3415          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.34163417          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.34183419        - `prefix_padding_ms: optional number`34203421          Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in3422          milliseconds). Defaults to 300ms.34233424        - `silence_duration_ms: optional number`34253426          Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults3427          to 500ms. With shorter values the model will respond more quickly,3428          but may jump in on short pauses from the user.34293430        - `threshold: optional number`34313432          Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A3433          higher threshold will require louder audio to activate the model, and3434          thus might perform better in noisy environments.34353436      - `SemanticVad object { type, create_response, eagerness, interrupt_response }`34373438        Server-side semantic turn detection which uses a model to determine when the user has finished speaking.34393440        - `type: "semantic_vad"`34413442          Type of turn detection, `semantic_vad` to turn on Semantic VAD.34433444          - `"semantic_vad"`34453446        - `create_response: optional boolean`34473448          Whether or not to automatically generate a response when a VAD stop event occurs.34493450        - `eagerness: optional "low" or "medium" or "high" or "auto"`34513452          Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.34533454          - `"low"`34553456          - `"medium"`34573458          - `"high"`34593460          - `"auto"`34613462        - `interrupt_response: optional boolean`34633464          Whether or not to automatically interrupt any ongoing response with output to the default3465          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.34663467  - `output: optional RealtimeAudioConfigOutput`34683469    - `format: optional RealtimeAudioFormats`34703471      The format of the output audio.34723473    - `speed: optional number`34743475      The speed of the model's spoken response as a multiple of the original speed.3476      1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.34773478      This parameter is a post-processing adjustment to the audio after it is generated, it's3479      also possible to prompt the model to speak faster or slower.34803481    - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`34823483      The voice the model uses to respond. Supported built-in voices are3484      `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,3485      `marin`, and `cedar`. You may also provide a custom voice object with3486      an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed3487      during the session once the model has responded with audio at least once.3488      We recommend `marin` and `cedar` for best quality.34893490      - `string`34913492      - `"alloy" or "ash" or "ballad" or 7 more`34933494        - `"alloy"`34953496        - `"ash"`34973498        - `"ballad"`34993500        - `"coral"`35013502        - `"echo"`35033504        - `"sage"`35053506        - `"shimmer"`35073508        - `"verse"`35093510        - `"marin"`35113512        - `"cedar"`35133514      - `ID object { id }`35153516        Custom voice reference.35173518        - `id: string`35193520          The custom voice ID, e.g. `voice_1234`.35213522### Realtime Audio Config Input35233524- `RealtimeAudioConfigInput object { format, noise_reduction, transcription, turn_detection }`35253526  - `format: optional RealtimeAudioFormats`35273528    The format of the input audio.35293530    - `PCMAudio object { rate, type }`35313532      The PCM audio format. Only a 24kHz sample rate is supported.35333534      - `rate: optional 24000`35353536        The sample rate of the audio. Always `24000`.35373538        - `24000`35393540      - `type: optional "audio/pcm"`35413542        The audio format. Always `audio/pcm`.35433544        - `"audio/pcm"`35453546    - `PCMUAudio object { type }`35473548      The G.711 μ-law format.35493550      - `type: optional "audio/pcmu"`35513552        The audio format. Always `audio/pcmu`.35533554        - `"audio/pcmu"`35553556    - `PCMAAudio object { type }`35573558      The G.711 A-law format.35593560      - `type: optional "audio/pcma"`35613562        The audio format. Always `audio/pcma`.35633564        - `"audio/pcma"`35653566  - `noise_reduction: optional object { type }`35673568    Configuration for input audio noise reduction. This can be set to `null` to turn off.3569    Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.3570    Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.35713572    - `type: optional NoiseReductionType`35733574      Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.35753576      - `"near_field"`35773578      - `"far_field"`35793580  - `transcription: optional AudioTranscription`35813582    Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.35833584    - `delay: optional "minimal" or "low" or "medium" or 2 more`35853586      Controls how long the model waits before emitting transcription text.3587      Higher values can improve transcription accuracy at the cost of latency.3588      Only supported with `gpt-realtime-whisper` in GA Realtime sessions.35893590      - `"minimal"`35913592      - `"low"`35933594      - `"medium"`35953596      - `"high"`35973598      - `"xhigh"`35993600    - `keywords: optional array of string`36013602      Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.36033604    - `language: optional string`36053606      The language of the input audio. Supplying the input language in3607      [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format3608      will improve accuracy and latency.36093610    - `languages: optional array of string`36113612      Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.36133614    - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`36153616      The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.36173618      - `string`36193620      - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`36213622        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.36233624        - `"whisper-1"`36253626        - `"gpt-transcribe"`36273628        - `"gpt-live-transcribe"`36293630        - `"gpt-4o-mini-transcribe"`36313632        - `"gpt-4o-mini-transcribe-2025-12-15"`36333634        - `"gpt-4o-transcribe"`36353636        - `"gpt-4o-transcribe-diarize"`36373638        - `"gpt-realtime-whisper"`36393640    - `prompt: optional string`36413642      An optional text to guide the model's style or continue a previous audio3643      segment.3644      For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).3645      For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".3646      Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.36473648  - `turn_detection: optional RealtimeAudioInputTurnDetection or null`36493650    Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.36513652    Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.36533654    Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.36553656    For `gpt-realtime-whisper` transcription sessions, turn detection must be3657    set to `null`; VAD is not supported.36583659    - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`36603661      Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.36623663      - `type: "server_vad"`36643665        Type of turn detection, `server_vad` to turn on simple Server VAD.36663667        - `"server_vad"`36683669      - `create_response: optional boolean`36703671        Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.36723673        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.36743675      - `idle_timeout_ms: optional number or null`36763677        Optional timeout after which a model response will be triggered automatically. This is3678        useful for situations in which a long pause from the user is unexpected, such as a phone3679        call. The model will effectively prompt the user to continue the conversation based3680        on the current context.36813682        The timeout value will be applied after the last model response's audio has finished playing,3683        i.e. it's set to the `response.done` time plus audio playback duration.36843685        An `input_audio_buffer.timeout_triggered` event (plus events3686        associated with the Response) will be emitted when the timeout is reached.3687        Idle timeout is currently only supported for `server_vad` mode.36883689      - `interrupt_response: optional boolean`36903691        Whether or not to automatically interrupt (cancel) any ongoing response with output to the default3692        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.36933694        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.36953696      - `prefix_padding_ms: optional number`36973698        Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in3699        milliseconds). Defaults to 300ms.37003701      - `silence_duration_ms: optional number`37023703        Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults3704        to 500ms. With shorter values the model will respond more quickly,3705        but may jump in on short pauses from the user.37063707      - `threshold: optional number`37083709        Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A3710        higher threshold will require louder audio to activate the model, and3711        thus might perform better in noisy environments.37123713    - `SemanticVad object { type, create_response, eagerness, interrupt_response }`37143715      Server-side semantic turn detection which uses a model to determine when the user has finished speaking.37163717      - `type: "semantic_vad"`37183719        Type of turn detection, `semantic_vad` to turn on Semantic VAD.37203721        - `"semantic_vad"`37223723      - `create_response: optional boolean`37243725        Whether or not to automatically generate a response when a VAD stop event occurs.37263727      - `eagerness: optional "low" or "medium" or "high" or "auto"`37283729        Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.37303731        - `"low"`37323733        - `"medium"`37343735        - `"high"`37363737        - `"auto"`37383739      - `interrupt_response: optional boolean`37403741        Whether or not to automatically interrupt any ongoing response with output to the default3742        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.37433744### Realtime Audio Config Output37453746- `RealtimeAudioConfigOutput object { format, speed, voice }`37473748  - `format: optional RealtimeAudioFormats`37493750    The format of the output audio.37513752    - `PCMAudio object { rate, type }`37533754      The PCM audio format. Only a 24kHz sample rate is supported.37553756      - `rate: optional 24000`37573758        The sample rate of the audio. Always `24000`.37593760        - `24000`37613762      - `type: optional "audio/pcm"`37633764        The audio format. Always `audio/pcm`.37653766        - `"audio/pcm"`37673768    - `PCMUAudio object { type }`37693770      The G.711 μ-law format.37713772      - `type: optional "audio/pcmu"`37733774        The audio format. Always `audio/pcmu`.37753776        - `"audio/pcmu"`37773778    - `PCMAAudio object { type }`37793780      The G.711 A-law format.37813782      - `type: optional "audio/pcma"`37833784        The audio format. Always `audio/pcma`.37853786        - `"audio/pcma"`37873788  - `speed: optional number`37893790    The speed of the model's spoken response as a multiple of the original speed.3791    1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.37923793    This parameter is a post-processing adjustment to the audio after it is generated, it's3794    also possible to prompt the model to speak faster or slower.37953796  - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`37973798    The voice the model uses to respond. Supported built-in voices are3799    `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,3800    `marin`, and `cedar`. You may also provide a custom voice object with3801    an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed3802    during the session once the model has responded with audio at least once.3803    We recommend `marin` and `cedar` for best quality.38043805    - `string`38063807    - `"alloy" or "ash" or "ballad" or 7 more`38083809      - `"alloy"`38103811      - `"ash"`38123813      - `"ballad"`38143815      - `"coral"`38163817      - `"echo"`38183819      - `"sage"`38203821      - `"shimmer"`38223823      - `"verse"`38243825      - `"marin"`38263827      - `"cedar"`38283829    - `ID object { id }`38303831      Custom voice reference.38323833      - `id: string`38343835        The custom voice ID, e.g. `voice_1234`.38363837### Realtime Audio Formats38383839- `RealtimeAudioFormats = object { rate, type }  or object { type }  or object { type }`38403841  The PCM audio format. Only a 24kHz sample rate is supported.38423843  - `PCMAudio object { rate, type }`38443845    The PCM audio format. Only a 24kHz sample rate is supported.38463847    - `rate: optional 24000`38483849      The sample rate of the audio. Always `24000`.38503851      - `24000`38523853    - `type: optional "audio/pcm"`38543855      The audio format. Always `audio/pcm`.38563857      - `"audio/pcm"`38583859  - `PCMUAudio object { type }`38603861    The G.711 μ-law format.38623863    - `type: optional "audio/pcmu"`38643865      The audio format. Always `audio/pcmu`.38663867      - `"audio/pcmu"`38683869  - `PCMAAudio object { type }`38703871    The G.711 A-law format.38723873    - `type: optional "audio/pcma"`38743875      The audio format. Always `audio/pcma`.38763877      - `"audio/pcma"`38783879### Realtime Audio Input Turn Detection38803881- `RealtimeAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }`38823883  Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.38843885  Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.38863887  Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.38883889  For `gpt-realtime-whisper` transcription sessions, turn detection must be3890  set to `null`; VAD is not supported.38913892  - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`38933894    Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.38953896    - `type: "server_vad"`38973898      Type of turn detection, `server_vad` to turn on simple Server VAD.38993900      - `"server_vad"`39013902    - `create_response: optional boolean`39033904      Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.39053906      If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.39073908    - `idle_timeout_ms: optional number or null`39093910      Optional timeout after which a model response will be triggered automatically. This is3911      useful for situations in which a long pause from the user is unexpected, such as a phone3912      call. The model will effectively prompt the user to continue the conversation based3913      on the current context.39143915      The timeout value will be applied after the last model response's audio has finished playing,3916      i.e. it's set to the `response.done` time plus audio playback duration.39173918      An `input_audio_buffer.timeout_triggered` event (plus events3919      associated with the Response) will be emitted when the timeout is reached.3920      Idle timeout is currently only supported for `server_vad` mode.39213922    - `interrupt_response: optional boolean`39233924      Whether or not to automatically interrupt (cancel) any ongoing response with output to the default3925      conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.39263927      If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.39283929    - `prefix_padding_ms: optional number`39303931      Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in3932      milliseconds). Defaults to 300ms.39333934    - `silence_duration_ms: optional number`39353936      Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults3937      to 500ms. With shorter values the model will respond more quickly,3938      but may jump in on short pauses from the user.39393940    - `threshold: optional number`39413942      Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A3943      higher threshold will require louder audio to activate the model, and3944      thus might perform better in noisy environments.39453946  - `SemanticVad object { type, create_response, eagerness, interrupt_response }`39473948    Server-side semantic turn detection which uses a model to determine when the user has finished speaking.39493950    - `type: "semantic_vad"`39513952      Type of turn detection, `semantic_vad` to turn on Semantic VAD.39533954      - `"semantic_vad"`39553956    - `create_response: optional boolean`39573958      Whether or not to automatically generate a response when a VAD stop event occurs.39593960    - `eagerness: optional "low" or "medium" or "high" or "auto"`39613962      Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.39633964      - `"low"`39653966      - `"medium"`39673968      - `"high"`39693970      - `"auto"`39713972    - `interrupt_response: optional boolean`39733974      Whether or not to automatically interrupt any ongoing response with output to the default3975      conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.39763977### Realtime Client Event39783979- `RealtimeClientEvent = ConversationItemCreateEvent or ConversationItemDeleteEvent or ConversationItemRetrieveEvent or 8 more`39803981  A realtime client event.39823983  - `ConversationItemCreateEvent object { item, type, event_id, previous_item_id }`39843985    Add a new Item to the Conversation's context, including messages, function3986    calls, and function call responses. This event can be used both to populate a3987    "history" of the conversation and to add new items mid-stream, but has the3988    current limitation that it cannot populate assistant audio messages.39893990    If successful, the server will emit a `conversation.item.added` event and,3991    when the item is finalized, a `conversation.item.done` event. Otherwise, an3992    `error` event will be sent.39933994    - `item: ConversationItem`39953996      A single item within a Realtime conversation.39973998      - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`39994000        A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.40014002        - `content: array of object { text, type }`40034004          The content of the message.40054006          - `text: optional string`40074008            The text content.40094010          - `type: optional "input_text"`40114012            The content type. Always `input_text` for system messages.40134014            - `"input_text"`40154016        - `role: "system"`40174018          The role of the message sender. Always `system`.40194020          - `"system"`40214022        - `type: "message"`40234024          The type of the item. Always `message`.40254026          - `"message"`40274028        - `id: optional string`40294030          The unique ID of the item. This may be provided by the client or generated by the server.40314032        - `object: optional "realtime.item"`40334034          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.40354036          - `"realtime.item"`40374038        - `status: optional "completed" or "incomplete" or "in_progress"`40394040          The status of the item. Has no effect on the conversation.40414042          - `"completed"`40434044          - `"incomplete"`40454046          - `"in_progress"`40474048      - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`40494050        A user message item in a Realtime conversation.40514052        - `content: array of object { audio, detail, image_url, 3 more }`40534054          The content of the message.40554056          - `audio: optional string`40574058            Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.40594060          - `detail: optional "auto" or "low" or "high"`40614062            The detail level of the image (for `input_image`). `auto` will default to `high`.40634064            - `"auto"`40654066            - `"low"`40674068            - `"high"`40694070          - `image_url: optional string`40714072            Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.40734074          - `text: optional string`40754076            The text content (for `input_text`).40774078          - `transcript: optional string`40794080            Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.40814082          - `type: optional "input_text" or "input_audio" or "input_image"`40834084            The content type (`input_text`, `input_audio`, or `input_image`).40854086            - `"input_text"`40874088            - `"input_audio"`40894090            - `"input_image"`40914092        - `role: "user"`40934094          The role of the message sender. Always `user`.40954096          - `"user"`40974098        - `type: "message"`40994100          The type of the item. Always `message`.41014102          - `"message"`41034104        - `id: optional string`41054106          The unique ID of the item. This may be provided by the client or generated by the server.41074108        - `object: optional "realtime.item"`41094110          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.41114112          - `"realtime.item"`41134114        - `status: optional "completed" or "incomplete" or "in_progress"`41154116          The status of the item. Has no effect on the conversation.41174118          - `"completed"`41194120          - `"incomplete"`41214122          - `"in_progress"`41234124      - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`41254126        An assistant message item in a Realtime conversation.41274128        - `content: array of object { audio, text, transcript, type }`41294130          The content of the message.41314132          - `audio: optional string`41334134            Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.41354136          - `text: optional string`41374138            The text content.41394140          - `transcript: optional string`41414142            The transcript of the audio content, this will always be present if the output type is `audio`.41434144          - `type: optional "output_text" or "output_audio"`41454146            The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.41474148            - `"output_text"`41494150            - `"output_audio"`41514152        - `role: "assistant"`41534154          The role of the message sender. Always `assistant`.41554156          - `"assistant"`41574158        - `type: "message"`41594160          The type of the item. Always `message`.41614162          - `"message"`41634164        - `id: optional string`41654166          The unique ID of the item. This may be provided by the client or generated by the server.41674168        - `object: optional "realtime.item"`41694170          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.41714172          - `"realtime.item"`41734174        - `status: optional "completed" or "incomplete" or "in_progress"`41754176          The status of the item. Has no effect on the conversation.41774178          - `"completed"`41794180          - `"incomplete"`41814182          - `"in_progress"`41834184      - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`41854186        A function call item in a Realtime conversation.41874188        - `arguments: string`41894190          The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.41914192        - `name: string`41934194          The name of the function being called.41954196        - `type: "function_call"`41974198          The type of the item. Always `function_call`.41994200          - `"function_call"`42014202        - `id: optional string`42034204          The unique ID of the item. This may be provided by the client or generated by the server.42054206        - `call_id: optional string`42074208          The ID of the function call.42094210        - `object: optional "realtime.item"`42114212          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.42134214          - `"realtime.item"`42154216        - `status: optional "completed" or "incomplete" or "in_progress"`42174218          The status of the item. Has no effect on the conversation.42194220          - `"completed"`42214222          - `"incomplete"`42234224          - `"in_progress"`42254226      - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`42274228        A function call output item in a Realtime conversation.42294230        - `call_id: string`42314232          The ID of the function call this output is for.42334234        - `output: string`42354236          The output of the function call, this is free text and can contain any information or simply be empty.42374238        - `type: "function_call_output"`42394240          The type of the item. Always `function_call_output`.42414242          - `"function_call_output"`42434244        - `id: optional string`42454246          The unique ID of the item. This may be provided by the client or generated by the server.42474248        - `object: optional "realtime.item"`42494250          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.42514252          - `"realtime.item"`42534254        - `status: optional "completed" or "incomplete" or "in_progress"`42554256          The status of the item. Has no effect on the conversation.42574258          - `"completed"`42594260          - `"incomplete"`42614262          - `"in_progress"`42634264      - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`42654266        A Realtime item responding to an MCP approval request.42674268        - `id: string`42694270          The unique ID of the approval response.42714272        - `approval_request_id: string`42734274          The ID of the approval request being answered.42754276        - `approve: boolean`42774278          Whether the request was approved.42794280        - `type: "mcp_approval_response"`42814282          The type of the item. Always `mcp_approval_response`.42834284          - `"mcp_approval_response"`42854286        - `reason: optional string or null`42874288          Optional reason for the decision.42894290      - `RealtimeMcpListTools object { server_label, tools, type, id }`42914292        A Realtime item listing tools available on an MCP server.42934294        - `server_label: string`42954296          The label of the MCP server.42974298        - `tools: array of object { input_schema, name, annotations, description }`42994300          The tools available on the server.43014302          - `input_schema: unknown`43034304            The JSON schema describing the tool's input.43054306          - `name: string`43074308            The name of the tool.43094310          - `annotations: optional unknown or null`43114312            Additional annotations about the tool.43134314          - `description: optional string or null`43154316            The description of the tool.43174318        - `type: "mcp_list_tools"`43194320          The type of the item. Always `mcp_list_tools`.43214322          - `"mcp_list_tools"`43234324        - `id: optional string`43254326          The unique ID of the list.43274328      - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`43294330        A Realtime item representing an invocation of a tool on an MCP server.43314332        - `id: string`43334334          The unique ID of the tool call.43354336        - `arguments: string`43374338          A JSON string of the arguments passed to the tool.43394340        - `name: string`43414342          The name of the tool that was run.43434344        - `server_label: string`43454346          The label of the MCP server running the tool.43474348        - `type: "mcp_call"`43494350          The type of the item. Always `mcp_call`.43514352          - `"mcp_call"`43534354        - `approval_request_id: optional string or null`43554356          The ID of an associated approval request, if any.43574358        - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`43594360          The error from the tool call, if any.43614362          - `RealtimeMcpProtocolError object { code, message, type }`43634364            - `code: number`43654366            - `message: string`43674368            - `type: "protocol_error"`43694370              - `"protocol_error"`43714372          - `RealtimeMcpToolExecutionError object { message, type }`43734374            - `message: string`43754376            - `type: "tool_execution_error"`43774378              - `"tool_execution_error"`43794380          - `RealtimeMcphttpError object { code, message, type }`43814382            - `code: number`43834384            - `message: string`43854386            - `type: "http_error"`43874388              - `"http_error"`43894390        - `output: optional string or null`43914392          The output from the tool call.43934394      - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`43954396        A Realtime item requesting human approval of a tool invocation.43974398        - `id: string`43994400          The unique ID of the approval request.44014402        - `arguments: string`44034404          A JSON string of arguments for the tool.44054406        - `name: string`44074408          The name of the tool to run.44094410        - `server_label: string`44114412          The label of the MCP server making the request.44134414        - `type: "mcp_approval_request"`44154416          The type of the item. Always `mcp_approval_request`.44174418          - `"mcp_approval_request"`44194420    - `type: "conversation.item.create"`44214422      The event type, must be `conversation.item.create`.44234424      - `"conversation.item.create"`44254426    - `event_id: optional string`44274428      Optional client-generated ID used to identify this event.44294430    - `previous_item_id: optional string`44314432      The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation.44334434      If set to `root`, the new item will be added to the beginning of the conversation.44354436      If set to an existing ID, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.44374438  - `ConversationItemDeleteEvent object { item_id, type, event_id }`44394440    Send this event when you want to remove any item from the conversation4441    history. The server will respond with a `conversation.item.deleted` event,4442    unless the item does not exist in the conversation history, in which case the4443    server will respond with an error.44444445    - `item_id: string`44464447      The ID of the item to delete.44484449    - `type: "conversation.item.delete"`44504451      The event type, must be `conversation.item.delete`.44524453      - `"conversation.item.delete"`44544455    - `event_id: optional string`44564457      Optional client-generated ID used to identify this event.44584459  - `ConversationItemRetrieveEvent object { item_id, type, event_id }`44604461    Send this event when you want to retrieve the server's representation of a specific item in the conversation history. This is useful, for example, to inspect user audio after noise cancellation and VAD.4462    The server will respond with a `conversation.item.retrieved` event,4463    unless the item does not exist in the conversation history, in which case the4464    server will respond with an error.44654466    - `item_id: string`44674468      The ID of the item to retrieve.44694470    - `type: "conversation.item.retrieve"`44714472      The event type, must be `conversation.item.retrieve`.44734474      - `"conversation.item.retrieve"`44754476    - `event_id: optional string`44774478      Optional client-generated ID used to identify this event.44794480  - `ConversationItemTruncateEvent object { audio_end_ms, content_index, item_id, 2 more }`44814482    Send this event to truncate a previous assistant message’s audio. The server4483    will produce audio faster than realtime, so this event is useful when the user4484    interrupts to truncate audio that has already been sent to the client but not4485    yet played. This will synchronize the server's understanding of the audio with4486    the client's playback.44874488    Truncating audio will delete the server-side text transcript to ensure there4489    is not text in the context that hasn't been heard by the user.44904491    If successful, the server will respond with a `conversation.item.truncated`4492    event.44934494    - `audio_end_ms: number`44954496      Inclusive duration up to which audio is truncated, in milliseconds. If4497      the audio_end_ms is greater than the actual audio duration, the server4498      will respond with an error.44994500    - `content_index: number`45014502      The index of the content part to truncate. Set this to `0`.45034504    - `item_id: string`45054506      The ID of the assistant message item to truncate. Only assistant message4507      items can be truncated.45084509    - `type: "conversation.item.truncate"`45104511      The event type, must be `conversation.item.truncate`.45124513      - `"conversation.item.truncate"`45144515    - `event_id: optional string`45164517      Optional client-generated ID used to identify this event.45184519  - `InputAudioBufferAppendEvent object { audio, type, event_id }`45204521    Send this event to append audio bytes to the input audio buffer. The audio4522    buffer is temporary storage you can write to and later commit. A "commit" will create a new4523    user message item in the conversation history from the buffer content and clear the buffer.4524    Input audio transcription (if enabled) will be generated when the buffer is committed.45254526    If VAD is enabled the audio buffer is used to detect speech and the server will decide4527    when to commit. When Server VAD is disabled, you must commit the audio buffer4528    manually. Input audio noise reduction operates on writes to the audio buffer.45294530    The client may choose how much audio to place in each event up to a maximum4531    of 15 MiB, for example streaming smaller chunks from the client may allow the4532    VAD to be more responsive. Unlike most other client events, the server will4533    not send a confirmation response to this event.45344535    - `audio: string`45364537      Base64-encoded audio bytes. This must be in the format specified by the4538      `input_audio_format` field in the session configuration.45394540    - `type: "input_audio_buffer.append"`45414542      The event type, must be `input_audio_buffer.append`.45434544      - `"input_audio_buffer.append"`45454546    - `event_id: optional string`45474548      Optional client-generated ID used to identify this event.45494550  - `InputAudioBufferClearEvent object { type, event_id }`45514552    Send this event to clear the audio bytes in the buffer. The server will4553    respond with an `input_audio_buffer.cleared` event.45544555    - `type: "input_audio_buffer.clear"`45564557      The event type, must be `input_audio_buffer.clear`.45584559      - `"input_audio_buffer.clear"`45604561    - `event_id: optional string`45624563      Optional client-generated ID used to identify this event.45644565  - `OutputAudioBufferClearEvent object { type, event_id }`45664567    **WebRTC/SIP Only:** Emit to cut off the current audio response. This will trigger the server to4568    stop generating audio and emit a `output_audio_buffer.cleared` event. This4569    event should be preceded by a `response.cancel` client event to stop the4570    generation of the current response.4571    [Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).45724573    - `type: "output_audio_buffer.clear"`45744575      The event type, must be `output_audio_buffer.clear`.45764577      - `"output_audio_buffer.clear"`45784579    - `event_id: optional string`45804581      The unique ID of the client event used for error handling.45824583  - `InputAudioBufferCommitEvent object { type, event_id }`45844585    Send this event to commit the user input audio buffer, which will create a  new user message item in the conversation. This event will produce an error  if the input audio buffer is empty. When in Server VAD mode, the client does  not need to send this event, the server will commit the audio buffer  automatically.45864587    Committing the input audio buffer will trigger input audio transcription  (if enabled in session configuration), but it will not create a response  from the model. The server will respond with an `input_audio_buffer.committed` event.45884589    - `type: "input_audio_buffer.commit"`45904591      The event type, must be `input_audio_buffer.commit`.45924593      - `"input_audio_buffer.commit"`45944595    - `event_id: optional string`45964597      Optional client-generated ID used to identify this event.45984599  - `ResponseCancelEvent object { type, event_id, response_id }`46004601    Send this event to cancel an in-progress response. The server will respond4602    with a `response.done` event with a status of `response.status=cancelled`. If4603    there is no response to cancel, the server will respond with an error. It's safe4604    to call `response.cancel` even if no response is in progress, an error will be4605    returned the session will remain unaffected.46064607    - `type: "response.cancel"`46084609      The event type, must be `response.cancel`.46104611      - `"response.cancel"`46124613    - `event_id: optional string`46144615      Optional client-generated ID used to identify this event.46164617    - `response_id: optional string`46184619      A specific response ID to cancel - if not provided, will cancel an4620      in-progress response in the default conversation.46214622  - `ResponseCreateEvent object { type, event_id, response }`46234624    This event instructs the server to create a Response, which means triggering4625    model inference. When in Server VAD mode, the server will create Responses4626    automatically.46274628    A Response will include at least one Item, and may have two, in which case4629    the second will be a function call. These Items will be appended to the4630    conversation history by default.46314632    The server will respond with a `response.created` event, events for Items4633    and content created, and finally a `response.done` event to indicate the4634    Response is complete.46354636    The `response.create` event includes inference configuration like4637    `instructions` and `tools`. If these are set, they will override the Session's4638    configuration for this Response only.46394640    Responses can be created out-of-band of the default Conversation, meaning that they can4641    have arbitrary input, and it's possible to disable writing the output to the Conversation.4642    Only one Response can write to the default Conversation at a time, but otherwise multiple4643    Responses can be created in parallel. The `metadata` field is a good way to disambiguate4644    multiple simultaneous Responses.46454646    Clients can set `conversation` to `none` to create a Response that does not write to the default4647    Conversation. Arbitrary input can be provided with the `input` field, which is an array accepting4648    raw Items and references to existing Items.46494650    - `type: "response.create"`46514652      The event type, must be `response.create`.46534654      - `"response.create"`46554656    - `event_id: optional string`46574658      Optional client-generated ID used to identify this event.46594660    - `response: optional RealtimeResponseCreateParams`46614662      Create a new Realtime response with these parameters46634664      - `audio: optional RealtimeResponseCreateAudioOutput`46654666        Configuration for audio input and output.46674668        - `output: optional object { format, voice }`46694670          - `format: optional RealtimeAudioFormats`46714672            The format of the output audio.46734674            - `PCMAudio object { rate, type }`46754676              The PCM audio format. Only a 24kHz sample rate is supported.46774678              - `rate: optional 24000`46794680                The sample rate of the audio. Always `24000`.46814682                - `24000`46834684              - `type: optional "audio/pcm"`46854686                The audio format. Always `audio/pcm`.46874688                - `"audio/pcm"`46894690            - `PCMUAudio object { type }`46914692              The G.711 μ-law format.46934694              - `type: optional "audio/pcmu"`46954696                The audio format. Always `audio/pcmu`.46974698                - `"audio/pcmu"`46994700            - `PCMAAudio object { type }`47014702              The G.711 A-law format.47034704              - `type: optional "audio/pcma"`47054706                The audio format. Always `audio/pcma`.47074708                - `"audio/pcma"`47094710          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`47114712            The voice the model uses to respond. Supported built-in voices are4713            `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,4714            `marin`, and `cedar`. You may also provide a custom voice object with4715            an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed4716            during the session once the model has responded with audio at least once.4717            We recommend `marin` and `cedar` for best quality.47184719            - `string`47204721            - `"alloy" or "ash" or "ballad" or 7 more`47224723              - `"alloy"`47244725              - `"ash"`47264727              - `"ballad"`47284729              - `"coral"`47304731              - `"echo"`47324733              - `"sage"`47344735              - `"shimmer"`47364737              - `"verse"`47384739              - `"marin"`47404741              - `"cedar"`47424743            - `ID object { id }`47444745              Custom voice reference.47464747              - `id: string`47484749                The custom voice ID, e.g. `voice_1234`.47504751      - `conversation: optional string or "auto" or "none"`47524753        Controls which conversation the response is added to. Currently supports4754        `auto` and `none`, with `auto` as the default value. The `auto` value4755        means that the contents of the response will be added to the default4756        conversation. Set this to `none` to create an out-of-band response which4757        will not add items to default conversation.47584759        - `string`47604761        - `"auto" or "none"`47624763          Controls which conversation the response is added to. Currently supports4764          `auto` and `none`, with `auto` as the default value. The `auto` value4765          means that the contents of the response will be added to the default4766          conversation. Set this to `none` to create an out-of-band response which4767          will not add items to default conversation.47684769          - `"auto"`47704771          - `"none"`47724773      - `input: optional array of ConversationItem`47744775        Input items to include in the prompt for the model. Using this field4776        creates a new context for this Response instead of using the default4777        conversation. An empty array `[]` will clear the context for this Response.4778        Note that this can include references to items that previously appeared in the session4779        using their id.47804781        - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`47824783          A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.47844785        - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`47864787          A user message item in a Realtime conversation.47884789        - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`47904791          An assistant message item in a Realtime conversation.47924793        - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`47944795          A function call item in a Realtime conversation.47964797        - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`47984799          A function call output item in a Realtime conversation.48004801        - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`48024803          A Realtime item responding to an MCP approval request.48044805        - `RealtimeMcpListTools object { server_label, tools, type, id }`48064807          A Realtime item listing tools available on an MCP server.48084809        - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`48104811          A Realtime item representing an invocation of a tool on an MCP server.48124813        - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`48144815          A Realtime item requesting human approval of a tool invocation.48164817      - `instructions: optional string`48184819        The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.4820        Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.48214822      - `max_output_tokens: optional number or "inf"`48234824        Maximum number of output tokens for a single assistant response,4825        inclusive of tool calls. Provide an integer between 1 and 4096 to4826        limit output tokens, or `inf` for the maximum available tokens for a4827        given model. Defaults to `inf`.48284829        - `number`48304831        - `"inf"`48324833          - `"inf"`48344835      - `metadata: optional Metadata or null`48364837        Set of 16 key-value pairs that can be attached to an object. This can be4838        useful for storing additional information about the object in a structured4839        format, and querying for objects via API or the dashboard.48404841        Keys are strings with a maximum length of 64 characters. Values are strings4842        with a maximum length of 512 characters.48434844      - `output_modalities: optional array of "text" or "audio"`48454846        The set of modalities the model used to respond, currently the only possible values are4847        `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the4848        output to mode `text` will disable audio output from the model.48494850        - `"text"`48514852        - `"audio"`48534854      - `parallel_tool_calls: optional boolean`48554856        Whether the model may call multiple tools in parallel. Only supported by4857        reasoning Realtime models such as `gpt-realtime-2`.48584859      - `prompt: optional ResponsePrompt or null`48604861        Reference to a prompt template and its variables.4862        [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).48634864        - `id: string`48654866          The unique identifier of the prompt template to use.48674868        - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`48694870          Optional map of values to substitute in for variables in your4871          prompt. The substitution values can either be strings, or other4872          Response input types like images or files.48734874          - `string`48754876          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`48774878            A text input to the model.48794880            - `text: string`48814882              The text input to the model.48834884            - `type: "input_text"`48854886              The type of the input item. Always `input_text`.48874888              - `"input_text"`48894890            - `prompt_cache_breakpoint: optional object { mode }`48914892              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.48934894              - `mode: "explicit"`48954896                The breakpoint mode. Always `explicit`.48974898                - `"explicit"`48994900          - `ResponseInputImage object { detail, type, file_id, 2 more }`49014902            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).49034904            - `detail: ImageDetail`49054906              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.49074908              - `"low"`49094910              - `"high"`49114912              - `"auto"`49134914              - `"original"`49154916            - `type: "input_image"`49174918              The type of the input item. Always `input_image`.49194920              - `"input_image"`49214922            - `file_id: optional string or null`49234924              The ID of the file to be sent to the model.49254926            - `image_url: optional string or null`49274928              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.49294930            - `prompt_cache_breakpoint: optional object { mode }`49314932              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.49334934              - `mode: "explicit"`49354936                The breakpoint mode. Always `explicit`.49374938                - `"explicit"`49394940          - `ResponseInputFile object { type, detail, file_data, 4 more }`49414942            A file input to the model.49434944            - `type: "input_file"`49454946              The type of the input item. Always `input_file`.49474948              - `"input_file"`49494950            - `detail: optional "auto" or "low" or "high"`49514952              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`.49534954              - `"auto"`49554956              - `"low"`49574958              - `"high"`49594960            - `file_data: optional string`49614962              The content of the file to be sent to the model.49634964            - `file_id: optional string or null`49654966              The ID of the file to be sent to the model.49674968            - `file_url: optional string`49694970              The URL of the file to be sent to the model.49714972            - `filename: optional string`49734974              The name of the file to be sent to the model.49754976            - `prompt_cache_breakpoint: optional object { mode }`49774978              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.49794980              - `mode: "explicit"`49814982                The breakpoint mode. Always `explicit`.49834984                - `"explicit"`49854986        - `version: optional string or null`49874988          Optional version of the prompt template.49894990      - `reasoning: optional RealtimeReasoning`49914992        Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.49934994        - `effort: optional RealtimeReasoningEffort`49954996          Constrains effort on reasoning for reasoning-capable Realtime models such as4997          `gpt-realtime-2`.49984999          - `"minimal"`50005001          - `"low"`50025003          - `"medium"`50045005          - `"high"`50065007          - `"xhigh"`50085009      - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`50105011        How the model chooses tools. Provide one of the string modes or force a specific5012        function/MCP tool.50135014        - `ToolChoiceOptions = "none" or "auto" or "required"`50155016          Controls which (if any) tool is called by the model.50175018          `none` means the model will not call any tool and instead generates a message.50195020          `auto` means the model can pick between generating a message or calling one or5021          more tools.50225023          `required` means the model must call one or more tools.50245025          - `"none"`50265027          - `"auto"`50285029          - `"required"`50305031        - `ToolChoiceFunction object { name, type }`50325033          Use this option to force the model to call a specific function.50345035          - `name: string`50365037            The name of the function to call.50385039          - `type: "function"`50405041            For function calling, the type is always `function`.50425043            - `"function"`50445045        - `ToolChoiceMcp object { server_label, type, name }`50465047          Use this option to force the model to call a specific tool on a remote MCP server.50485049          - `server_label: string`50505051            The label of the MCP server to use.50525053          - `type: "mcp"`50545055            For MCP tools, the type is always `mcp`.50565057            - `"mcp"`50585059          - `name: optional string or null`50605061            The name of the tool to call on the server.50625063      - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`50645065        Tools available to the model.50665067        - `RealtimeFunctionTool object { description, name, parameters, type }`50685069          - `description: optional string`50705071            The description of the function, including guidance on when and how5072            to call it, and guidance about what to tell the user when calling5073            (if anything).50745075          - `name: optional string`50765077            The name of the function.50785079          - `parameters: optional unknown`50805081            Parameters of the function in JSON Schema.50825083          - `type: optional "function"`50845085            The type of the tool, i.e. `function`.50865087            - `"function"`50885089        - `McpTool object { server_label, type, allowed_callers, 9 more }`50905091          Give the model access to additional tools via remote Model Context Protocol5092          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).50935094          - `server_label: string`50955096            A label for this MCP server, used to identify it in tool calls.50975098          - `type: "mcp"`50995100            The type of the MCP tool. Always `mcp`.51015102            - `"mcp"`51035104          - `allowed_callers: optional array of "direct" or "programmatic" or null`51055106            The tool invocation context(s).51075108            - `"direct"`51095110            - `"programmatic"`51115112          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`51135114            List of allowed tool names or a filter object.51155116            - `McpAllowedTools = array of string`51175118              A string array of allowed tool names51195120            - `McpToolFilter object { read_only, tool_names }`51215122              A filter object to specify which tools are allowed.51235124              - `read_only: optional boolean`51255126                Indicates whether or not a tool modifies data or is read-only. If an5127                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5128                it will match this filter.51295130              - `tool_names: optional array of string`51315132                List of allowed tool names.51335134          - `authorization: optional string`51355136            An OAuth access token that can be used with a remote MCP server, either5137            with a custom MCP server URL or a service connector. Your application5138            must handle the OAuth authorization flow and provide the token here.51395140          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`51415142            Identifier for service connectors, like those available in ChatGPT. One of5143            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5144            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).51455146            This field is deprecated for models released after September 1, 2026.5147            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5148            connect through a Secure MCP Tunnel.51495150            Currently supported `connector_id` values are:51515152            - Dropbox: `connector_dropbox`5153            - Gmail: `connector_gmail`5154            - Google Calendar: `connector_googlecalendar`5155            - Google Drive: `connector_googledrive`5156            - Microsoft Teams: `connector_microsoftteams`5157            - Outlook Calendar: `connector_outlookcalendar`5158            - Outlook Email: `connector_outlookemail`5159            - SharePoint: `connector_sharepoint`51605161            - `"connector_dropbox"`51625163            - `"connector_gmail"`51645165            - `"connector_googlecalendar"`51665167            - `"connector_googledrive"`51685169            - `"connector_microsoftteams"`51705171            - `"connector_outlookcalendar"`51725173            - `"connector_outlookemail"`51745175            - `"connector_sharepoint"`51765177          - `defer_loading: optional boolean`51785179            Whether this MCP tool is deferred and discovered via tool search.51805181          - `headers: optional map[string] or null`51825183            Optional HTTP headers to send to the MCP server. Use for authentication5184            or other purposes.51855186          - `require_approval: optional object { always, never }  or "always" or "never" or null`51875188            Specify which of the MCP server's tools require approval.51895190            - `McpToolApprovalFilter object { always, never }`51915192              Specify which of the MCP server's tools require approval. Can be5193              `always`, `never`, or a filter object associated with tools5194              that require approval.51955196              - `always: optional object { read_only, tool_names }`51975198                A filter object to specify which tools are allowed.51995200                - `read_only: optional boolean`52015202                  Indicates whether or not a tool modifies data or is read-only. If an5203                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5204                  it will match this filter.52055206                - `tool_names: optional array of string`52075208                  List of allowed tool names.52095210              - `never: optional object { read_only, tool_names }`52115212                A filter object to specify which tools are allowed.52135214                - `read_only: optional boolean`52155216                  Indicates whether or not a tool modifies data or is read-only. If an5217                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5218                  it will match this filter.52195220                - `tool_names: optional array of string`52215222                  List of allowed tool names.52235224            - `McpToolApprovalSetting = "always" or "never"`52255226              Specify a single approval policy for all tools. One of `always` or5227              `never`. When set to `always`, all tools will require approval. When5228              set to `never`, all tools will not require approval.52295230              - `"always"`52315232              - `"never"`52335234          - `server_description: optional string`52355236            Optional description of the MCP server, used to provide more context.52375238          - `server_url: optional string`52395240            The URL for the MCP server. One of `server_url`, `connector_id`, or5241            `tunnel_id` must be provided.52425243          - `tunnel_id: optional string`52445245            The Secure MCP Tunnel ID to use instead of a direct server URL. One of5246            `server_url`, `connector_id`, or `tunnel_id` must be provided.52475248  - `SessionUpdateEvent object { session, type, event_id }`52495250    Send this event to update the session’s configuration.5251    The client may send this event at any time to update any field5252    except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.52535254    When the server receives a `session.update`, it will respond5255    with a `session.updated` event showing the full, effective configuration.5256    Only the fields that are present in the `session.update` are updated. To clear a field like5257    `instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.5258    To clear a field like `turn_detection`, pass `null`.52595260    - `session: RealtimeSessionCreateRequest or RealtimeTranscriptionSessionCreateRequest`52615262      Update the Realtime session. Choose either a realtime5263      session or a transcription session.52645265      - `RealtimeSessionCreateRequest object { type, audio, include, 11 more }`52665267        Realtime session object configuration.52685269        - `type: "realtime"`52705271          The type of session to create. Always `realtime` for the Realtime API.52725273          - `"realtime"`52745275        - `audio: optional RealtimeAudioConfig`52765277          Configuration for input and output audio.52785279          - `input: optional RealtimeAudioConfigInput`52805281            - `format: optional RealtimeAudioFormats`52825283              The format of the input audio.52845285            - `noise_reduction: optional object { type }`52865287              Configuration for input audio noise reduction. This can be set to `null` to turn off.5288              Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.5289              Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.52905291              - `type: optional NoiseReductionType`52925293                Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.52945295                - `"near_field"`52965297                - `"far_field"`52985299            - `transcription: optional AudioTranscription`53005301              Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.53025303              - `delay: optional "minimal" or "low" or "medium" or 2 more`53045305                Controls how long the model waits before emitting transcription text.5306                Higher values can improve transcription accuracy at the cost of latency.5307                Only supported with `gpt-realtime-whisper` in GA Realtime sessions.53085309                - `"minimal"`53105311                - `"low"`53125313                - `"medium"`53145315                - `"high"`53165317                - `"xhigh"`53185319              - `keywords: optional array of string`53205321                Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.53225323              - `language: optional string`53245325                The language of the input audio. Supplying the input language in5326                [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format5327                will improve accuracy and latency.53285329              - `languages: optional array of string`53305331                Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.53325333              - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`53345335                The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.53365337                - `string`53385339                - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`53405341                  The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.53425343                  - `"whisper-1"`53445345                  - `"gpt-transcribe"`53465347                  - `"gpt-live-transcribe"`53485349                  - `"gpt-4o-mini-transcribe"`53505351                  - `"gpt-4o-mini-transcribe-2025-12-15"`53525353                  - `"gpt-4o-transcribe"`53545355                  - `"gpt-4o-transcribe-diarize"`53565357                  - `"gpt-realtime-whisper"`53585359              - `prompt: optional string`53605361                An optional text to guide the model's style or continue a previous audio5362                segment.5363                For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).5364                For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".5365                Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.53665367            - `turn_detection: optional RealtimeAudioInputTurnDetection or null`53685369              Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.53705371              Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.53725373              Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.53745375              For `gpt-realtime-whisper` transcription sessions, turn detection must be5376              set to `null`; VAD is not supported.53775378              - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`53795380                Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.53815382                - `type: "server_vad"`53835384                  Type of turn detection, `server_vad` to turn on simple Server VAD.53855386                  - `"server_vad"`53875388                - `create_response: optional boolean`53895390                  Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.53915392                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.53935394                - `idle_timeout_ms: optional number or null`53955396                  Optional timeout after which a model response will be triggered automatically. This is5397                  useful for situations in which a long pause from the user is unexpected, such as a phone5398                  call. The model will effectively prompt the user to continue the conversation based5399                  on the current context.54005401                  The timeout value will be applied after the last model response's audio has finished playing,5402                  i.e. it's set to the `response.done` time plus audio playback duration.54035404                  An `input_audio_buffer.timeout_triggered` event (plus events5405                  associated with the Response) will be emitted when the timeout is reached.5406                  Idle timeout is currently only supported for `server_vad` mode.54075408                - `interrupt_response: optional boolean`54095410                  Whether or not to automatically interrupt (cancel) any ongoing response with output to the default5411                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.54125413                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.54145415                - `prefix_padding_ms: optional number`54165417                  Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in5418                  milliseconds). Defaults to 300ms.54195420                - `silence_duration_ms: optional number`54215422                  Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults5423                  to 500ms. With shorter values the model will respond more quickly,5424                  but may jump in on short pauses from the user.54255426                - `threshold: optional number`54275428                  Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A5429                  higher threshold will require louder audio to activate the model, and5430                  thus might perform better in noisy environments.54315432              - `SemanticVad object { type, create_response, eagerness, interrupt_response }`54335434                Server-side semantic turn detection which uses a model to determine when the user has finished speaking.54355436                - `type: "semantic_vad"`54375438                  Type of turn detection, `semantic_vad` to turn on Semantic VAD.54395440                  - `"semantic_vad"`54415442                - `create_response: optional boolean`54435444                  Whether or not to automatically generate a response when a VAD stop event occurs.54455446                - `eagerness: optional "low" or "medium" or "high" or "auto"`54475448                  Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.54495450                  - `"low"`54515452                  - `"medium"`54535454                  - `"high"`54555456                  - `"auto"`54575458                - `interrupt_response: optional boolean`54595460                  Whether or not to automatically interrupt any ongoing response with output to the default5461                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.54625463          - `output: optional RealtimeAudioConfigOutput`54645465            - `format: optional RealtimeAudioFormats`54665467              The format of the output audio.54685469            - `speed: optional number`54705471              The speed of the model's spoken response as a multiple of the original speed.5472              1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.54735474              This parameter is a post-processing adjustment to the audio after it is generated, it's5475              also possible to prompt the model to speak faster or slower.54765477            - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`54785479              The voice the model uses to respond. Supported built-in voices are5480              `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,5481              `marin`, and `cedar`. You may also provide a custom voice object with5482              an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed5483              during the session once the model has responded with audio at least once.5484              We recommend `marin` and `cedar` for best quality.54855486              - `string`54875488              - `"alloy" or "ash" or "ballad" or 7 more`54895490                - `"alloy"`54915492                - `"ash"`54935494                - `"ballad"`54955496                - `"coral"`54975498                - `"echo"`54995500                - `"sage"`55015502                - `"shimmer"`55035504                - `"verse"`55055506                - `"marin"`55075508                - `"cedar"`55095510              - `ID object { id }`55115512                Custom voice reference.55135514                - `id: string`55155516                  The custom voice ID, e.g. `voice_1234`.55175518        - `include: optional array of "item.input_audio_transcription.logprobs"`55195520          Additional fields to include in server outputs.55215522          `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.55235524          - `"item.input_audio_transcription.logprobs"`55255526        - `instructions: optional string`55275528          The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.55295530          Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.55315532        - `max_output_tokens: optional number or "inf"`55335534          Maximum number of output tokens for a single assistant response,5535          inclusive of tool calls. Provide an integer between 1 and 4096 to5536          limit output tokens, or `inf` for the maximum available tokens for a5537          given model. Defaults to `inf`.55385539          - `number`55405541          - `"inf"`55425543            - `"inf"`55445545        - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`55465547          The Realtime model used for this session.55485549          - `string`55505551          - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`55525553            The Realtime model used for this session.55545555            - `"gpt-realtime"`55565557            - `"gpt-realtime-1.5"`55585559            - `"gpt-realtime-2"`55605561            - `"gpt-realtime-2.1"`55625563            - `"gpt-realtime-2.1-mini"`55645565            - `"gpt-realtime-2025-08-28"`55665567            - `"gpt-4o-realtime-preview"`55685569            - `"gpt-4o-realtime-preview-2024-10-01"`55705571            - `"gpt-4o-realtime-preview-2024-12-17"`55725573            - `"gpt-4o-realtime-preview-2025-06-03"`55745575            - `"gpt-4o-mini-realtime-preview"`55765577            - `"gpt-4o-mini-realtime-preview-2024-12-17"`55785579            - `"gpt-realtime-mini"`55805581            - `"gpt-realtime-mini-2025-10-06"`55825583            - `"gpt-realtime-mini-2025-12-15"`55845585            - `"gpt-audio-1.5"`55865587            - `"gpt-audio-mini"`55885589            - `"gpt-audio-mini-2025-10-06"`55905591            - `"gpt-audio-mini-2025-12-15"`55925593        - `output_modalities: optional array of "text" or "audio"`55945595          The set of modalities the model can respond with. It defaults to `["audio"]`, indicating5596          that the model will respond with audio plus a transcript. `["text"]` can be used to make5597          the model respond with text only. It is not possible to request both `text` and `audio` at the same time.55985599          - `"text"`56005601          - `"audio"`56025603        - `parallel_tool_calls: optional boolean`56045605          Whether the model may call multiple tools in parallel. Only supported by5606          reasoning Realtime models such as `gpt-realtime-2`.56075608        - `prompt: optional ResponsePrompt or null`56095610          Reference to a prompt template and its variables.5611          [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).56125613        - `reasoning: optional RealtimeReasoning`56145615          Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.56165617        - `tool_choice: optional RealtimeToolChoiceConfig`56185619          How the model chooses tools. Provide one of the string modes or force a specific5620          function/MCP tool.56215622          - `ToolChoiceOptions = "none" or "auto" or "required"`56235624            Controls which (if any) tool is called by the model.56255626            `none` means the model will not call any tool and instead generates a message.56275628            `auto` means the model can pick between generating a message or calling one or5629            more tools.56305631            `required` means the model must call one or more tools.56325633          - `ToolChoiceFunction object { name, type }`56345635            Use this option to force the model to call a specific function.56365637          - `ToolChoiceMcp object { server_label, type, name }`56385639            Use this option to force the model to call a specific tool on a remote MCP server.56405641        - `tools: optional RealtimeToolsConfig`56425643          Tools available to the model.56445645          - `RealtimeFunctionTool object { description, name, parameters, type }`56465647          - `McpTool object { server_label, type, allowed_callers, 9 more }`56485649            Give the model access to additional tools via remote Model Context Protocol5650            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).56515652            - `server_label: string`56535654              A label for this MCP server, used to identify it in tool calls.56555656            - `type: "mcp"`56575658              The type of the MCP tool. Always `mcp`.56595660              - `"mcp"`56615662            - `allowed_callers: optional array of "direct" or "programmatic" or null`56635664              The tool invocation context(s).56655666              - `"direct"`56675668              - `"programmatic"`56695670            - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`56715672              List of allowed tool names or a filter object.56735674              - `McpAllowedTools = array of string`56755676                A string array of allowed tool names56775678              - `McpToolFilter object { read_only, tool_names }`56795680                A filter object to specify which tools are allowed.56815682                - `read_only: optional boolean`56835684                  Indicates whether or not a tool modifies data or is read-only. If an5685                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5686                  it will match this filter.56875688                - `tool_names: optional array of string`56895690                  List of allowed tool names.56915692            - `authorization: optional string`56935694              An OAuth access token that can be used with a remote MCP server, either5695              with a custom MCP server URL or a service connector. Your application5696              must handle the OAuth authorization flow and provide the token here.56975698            - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`56995700              Identifier for service connectors, like those available in ChatGPT. One of5701              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more5702              about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).57035704              This field is deprecated for models released after September 1, 2026.5705              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to5706              connect through a Secure MCP Tunnel.57075708              Currently supported `connector_id` values are:57095710              - Dropbox: `connector_dropbox`5711              - Gmail: `connector_gmail`5712              - Google Calendar: `connector_googlecalendar`5713              - Google Drive: `connector_googledrive`5714              - Microsoft Teams: `connector_microsoftteams`5715              - Outlook Calendar: `connector_outlookcalendar`5716              - Outlook Email: `connector_outlookemail`5717              - SharePoint: `connector_sharepoint`57185719              - `"connector_dropbox"`57205721              - `"connector_gmail"`57225723              - `"connector_googlecalendar"`57245725              - `"connector_googledrive"`57265727              - `"connector_microsoftteams"`57285729              - `"connector_outlookcalendar"`57305731              - `"connector_outlookemail"`57325733              - `"connector_sharepoint"`57345735            - `defer_loading: optional boolean`57365737              Whether this MCP tool is deferred and discovered via tool search.57385739            - `headers: optional map[string] or null`57405741              Optional HTTP headers to send to the MCP server. Use for authentication5742              or other purposes.57435744            - `require_approval: optional object { always, never }  or "always" or "never" or null`57455746              Specify which of the MCP server's tools require approval.57475748              - `McpToolApprovalFilter object { always, never }`57495750                Specify which of the MCP server's tools require approval. Can be5751                `always`, `never`, or a filter object associated with tools5752                that require approval.57535754                - `always: optional object { read_only, tool_names }`57555756                  A filter object to specify which tools are allowed.57575758                  - `read_only: optional boolean`57595760                    Indicates whether or not a tool modifies data or is read-only. If an5761                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5762                    it will match this filter.57635764                  - `tool_names: optional array of string`57655766                    List of allowed tool names.57675768                - `never: optional object { read_only, tool_names }`57695770                  A filter object to specify which tools are allowed.57715772                  - `read_only: optional boolean`57735774                    Indicates whether or not a tool modifies data or is read-only. If an5775                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),5776                    it will match this filter.57775778                  - `tool_names: optional array of string`57795780                    List of allowed tool names.57815782              - `McpToolApprovalSetting = "always" or "never"`57835784                Specify a single approval policy for all tools. One of `always` or5785                `never`. When set to `always`, all tools will require approval. When5786                set to `never`, all tools will not require approval.57875788                - `"always"`57895790                - `"never"`57915792            - `server_description: optional string`57935794              Optional description of the MCP server, used to provide more context.57955796            - `server_url: optional string`57975798              The URL for the MCP server. One of `server_url`, `connector_id`, or5799              `tunnel_id` must be provided.58005801            - `tunnel_id: optional string`58025803              The Secure MCP Tunnel ID to use instead of a direct server URL. One of5804              `server_url`, `connector_id`, or `tunnel_id` must be provided.58055806        - `tracing: optional RealtimeTracingConfig or null`58075808          Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once5809          tracing is enabled for a session, the configuration cannot be modified.58105811          `auto` will create a trace for the session with default values for the5812          workflow name, group id, and metadata.58135814          - `Auto = "auto"`58155816            Enables tracing and sets default values for tracing configuration options. Always `auto`.58175818            - `"auto"`58195820          - `TracingConfiguration object { group_id, metadata, workflow_name }`58215822            Granular configuration for tracing.58235824            - `group_id: optional string`58255826              The group id to attach to this trace to enable filtering and5827              grouping in the Traces Dashboard.58285829            - `metadata: optional unknown`58305831              The arbitrary metadata to attach to this trace to enable5832              filtering in the Traces Dashboard.58335834            - `workflow_name: optional string`58355836              The name of the workflow to attach to this trace. This is used to5837              name the trace in the Traces Dashboard.58385839        - `truncation: optional RealtimeTruncation`58405841          When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.58425843          Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.58445845          Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.58465847          Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.58485849          - `"auto" or "disabled"`58505851            The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.58525853            - `"auto"`58545855            - `"disabled"`58565857          - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`58585859            Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.58605861            - `retention_ratio: number`58625863              Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.58645865            - `type: "retention_ratio"`58665867              Use retention ratio truncation.58685869              - `"retention_ratio"`58705871            - `token_limits: optional object { post_instructions }`58725873              Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.58745875              - `post_instructions: optional number`58765877                Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.58785879      - `RealtimeTranscriptionSessionCreateRequest object { type, audio, include }`58805881        Realtime transcription session object configuration.58825883        - `type: "transcription"`58845885          The type of session to create. Always `transcription` for transcription sessions.58865887          - `"transcription"`58885889        - `audio: optional RealtimeTranscriptionSessionAudio`58905891          Configuration for input and output audio.58925893          - `input: optional RealtimeTranscriptionSessionAudioInput`58945895            - `format: optional RealtimeAudioFormats`58965897              The PCM audio format. Only a 24kHz sample rate is supported.58985899            - `noise_reduction: optional object { type }`59005901              Configuration for input audio noise reduction. This can be set to `null` to turn off.5902              Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.5903              Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.59045905              - `type: optional NoiseReductionType`59065907                Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.59085909            - `transcription: optional AudioTranscription`59105911              Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.59125913            - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`59145915              Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.59165917              Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.59185919              Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.59205921              For `gpt-realtime-whisper` transcription sessions, turn detection must be5922              set to `null`; VAD is not supported.59235924              - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`59255926                Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.59275928                - `type: "server_vad"`59295930                  Type of turn detection, `server_vad` to turn on simple Server VAD.59315932                  - `"server_vad"`59335934                - `create_response: optional boolean`59355936                  Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.59375938                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.59395940                - `idle_timeout_ms: optional number or null`59415942                  Optional timeout after which a model response will be triggered automatically. This is5943                  useful for situations in which a long pause from the user is unexpected, such as a phone5944                  call. The model will effectively prompt the user to continue the conversation based5945                  on the current context.59465947                  The timeout value will be applied after the last model response's audio has finished playing,5948                  i.e. it's set to the `response.done` time plus audio playback duration.59495950                  An `input_audio_buffer.timeout_triggered` event (plus events5951                  associated with the Response) will be emitted when the timeout is reached.5952                  Idle timeout is currently only supported for `server_vad` mode.59535954                - `interrupt_response: optional boolean`59555956                  Whether or not to automatically interrupt (cancel) any ongoing response with output to the default5957                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.59585959                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.59605961                - `prefix_padding_ms: optional number`59625963                  Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in5964                  milliseconds). Defaults to 300ms.59655966                - `silence_duration_ms: optional number`59675968                  Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults5969                  to 500ms. With shorter values the model will respond more quickly,5970                  but may jump in on short pauses from the user.59715972                - `threshold: optional number`59735974                  Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A5975                  higher threshold will require louder audio to activate the model, and5976                  thus might perform better in noisy environments.59775978              - `SemanticVad object { type, create_response, eagerness, interrupt_response }`59795980                Server-side semantic turn detection which uses a model to determine when the user has finished speaking.59815982                - `type: "semantic_vad"`59835984                  Type of turn detection, `semantic_vad` to turn on Semantic VAD.59855986                  - `"semantic_vad"`59875988                - `create_response: optional boolean`59895990                  Whether or not to automatically generate a response when a VAD stop event occurs.59915992                - `eagerness: optional "low" or "medium" or "high" or "auto"`59935994                  Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.59955996                  - `"low"`59975998                  - `"medium"`59996000                  - `"high"`60016002                  - `"auto"`60036004                - `interrupt_response: optional boolean`60056006                  Whether or not to automatically interrupt any ongoing response with output to the default6007                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.60086009        - `include: optional array of "item.input_audio_transcription.logprobs"`60106011          Additional fields to include in server outputs.60126013          `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.60146015          - `"item.input_audio_transcription.logprobs"`60166017    - `type: "session.update"`60186019      The event type, must be `session.update`.60206021      - `"session.update"`60226023    - `event_id: optional string`60246025      Optional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.60266027### Realtime Conversation Item Assistant Message60286029- `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`60306031  An assistant message item in a Realtime conversation.60326033  - `content: array of object { audio, text, transcript, type }`60346035    The content of the message.60366037    - `audio: optional string`60386039      Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.60406041    - `text: optional string`60426043      The text content.60446045    - `transcript: optional string`60466047      The transcript of the audio content, this will always be present if the output type is `audio`.60486049    - `type: optional "output_text" or "output_audio"`60506051      The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.60526053      - `"output_text"`60546055      - `"output_audio"`60566057  - `role: "assistant"`60586059    The role of the message sender. Always `assistant`.60606061    - `"assistant"`60626063  - `type: "message"`60646065    The type of the item. Always `message`.60666067    - `"message"`60686069  - `id: optional string`60706071    The unique ID of the item. This may be provided by the client or generated by the server.60726073  - `object: optional "realtime.item"`60746075    Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.60766077    - `"realtime.item"`60786079  - `status: optional "completed" or "incomplete" or "in_progress"`60806081    The status of the item. Has no effect on the conversation.60826083    - `"completed"`60846085    - `"incomplete"`60866087    - `"in_progress"`60886089### Realtime Conversation Item Function Call60906091- `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`60926093  A function call item in a Realtime conversation.60946095  - `arguments: string`60966097    The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.60986099  - `name: string`61006101    The name of the function being called.61026103  - `type: "function_call"`61046105    The type of the item. Always `function_call`.61066107    - `"function_call"`61086109  - `id: optional string`61106111    The unique ID of the item. This may be provided by the client or generated by the server.61126113  - `call_id: optional string`61146115    The ID of the function call.61166117  - `object: optional "realtime.item"`61186119    Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.61206121    - `"realtime.item"`61226123  - `status: optional "completed" or "incomplete" or "in_progress"`61246125    The status of the item. Has no effect on the conversation.61266127    - `"completed"`61286129    - `"incomplete"`61306131    - `"in_progress"`61326133### Realtime Conversation Item Function Call Output61346135- `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`61366137  A function call output item in a Realtime conversation.61386139  - `call_id: string`61406141    The ID of the function call this output is for.61426143  - `output: string`61446145    The output of the function call, this is free text and can contain any information or simply be empty.61466147  - `type: "function_call_output"`61486149    The type of the item. Always `function_call_output`.61506151    - `"function_call_output"`61526153  - `id: optional string`61546155    The unique ID of the item. This may be provided by the client or generated by the server.61566157  - `object: optional "realtime.item"`61586159    Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.61606161    - `"realtime.item"`61626163  - `status: optional "completed" or "incomplete" or "in_progress"`61646165    The status of the item. Has no effect on the conversation.61666167    - `"completed"`61686169    - `"incomplete"`61706171    - `"in_progress"`61726173### Realtime Conversation Item System Message61746175- `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`61766177  A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.61786179  - `content: array of object { text, type }`61806181    The content of the message.61826183    - `text: optional string`61846185      The text content.61866187    - `type: optional "input_text"`61886189      The content type. Always `input_text` for system messages.61906191      - `"input_text"`61926193  - `role: "system"`61946195    The role of the message sender. Always `system`.61966197    - `"system"`61986199  - `type: "message"`62006201    The type of the item. Always `message`.62026203    - `"message"`62046205  - `id: optional string`62066207    The unique ID of the item. This may be provided by the client or generated by the server.62086209  - `object: optional "realtime.item"`62106211    Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.62126213    - `"realtime.item"`62146215  - `status: optional "completed" or "incomplete" or "in_progress"`62166217    The status of the item. Has no effect on the conversation.62186219    - `"completed"`62206221    - `"incomplete"`62226223    - `"in_progress"`62246225### Realtime Conversation Item User Message62266227- `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`62286229  A user message item in a Realtime conversation.62306231  - `content: array of object { audio, detail, image_url, 3 more }`62326233    The content of the message.62346235    - `audio: optional string`62366237      Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.62386239    - `detail: optional "auto" or "low" or "high"`62406241      The detail level of the image (for `input_image`). `auto` will default to `high`.62426243      - `"auto"`62446245      - `"low"`62466247      - `"high"`62486249    - `image_url: optional string`62506251      Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.62526253    - `text: optional string`62546255      The text content (for `input_text`).62566257    - `transcript: optional string`62586259      Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.62606261    - `type: optional "input_text" or "input_audio" or "input_image"`62626263      The content type (`input_text`, `input_audio`, or `input_image`).62646265      - `"input_text"`62666267      - `"input_audio"`62686269      - `"input_image"`62706271  - `role: "user"`62726273    The role of the message sender. Always `user`.62746275    - `"user"`62766277  - `type: "message"`62786279    The type of the item. Always `message`.62806281    - `"message"`62826283  - `id: optional string`62846285    The unique ID of the item. This may be provided by the client or generated by the server.62866287  - `object: optional "realtime.item"`62886289    Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.62906291    - `"realtime.item"`62926293  - `status: optional "completed" or "incomplete" or "in_progress"`62946295    The status of the item. Has no effect on the conversation.62966297    - `"completed"`62986299    - `"incomplete"`63006301    - `"in_progress"`63026303### Realtime Error63046305- `RealtimeError object { message, type, code, 2 more }`63066307  Details of the error.63086309  - `message: string`63106311    A human-readable error message.63126313  - `type: string`63146315    The type of error (e.g., "invalid_request_error", "server_error").63166317  - `code: optional string or null`63186319    Error code, if any.63206321  - `event_id: optional string or null`63226323    The event_id of the client event that caused the error, if applicable.63246325  - `param: optional string or null`63266327    Parameter related to the error, if any.63286329### Realtime Error Event63306331- `RealtimeErrorEvent object { error, event_id, type }`63326333  Returned when an error occurs, which could be a client problem or a server6334  problem. Most errors are recoverable and the session will stay open, we6335  recommend to implementors to monitor and log error messages by default.63366337  - `error: RealtimeError`63386339    Details of the error.63406341    - `message: string`63426343      A human-readable error message.63446345    - `type: string`63466347      The type of error (e.g., "invalid_request_error", "server_error").63486349    - `code: optional string or null`63506351      Error code, if any.63526353    - `event_id: optional string or null`63546355      The event_id of the client event that caused the error, if applicable.63566357    - `param: optional string or null`63586359      Parameter related to the error, if any.63606361  - `event_id: string`63626363    The unique ID of the server event.63646365  - `type: "error"`63666367    The event type, must be `error`.63686369    - `"error"`63706371### Realtime Function Tool63726373- `RealtimeFunctionTool object { description, name, parameters, type }`63746375  - `description: optional string`63766377    The description of the function, including guidance on when and how6378    to call it, and guidance about what to tell the user when calling6379    (if anything).63806381  - `name: optional string`63826383    The name of the function.63846385  - `parameters: optional unknown`63866387    Parameters of the function in JSON Schema.63886389  - `type: optional "function"`63906391    The type of the tool, i.e. `function`.63926393    - `"function"`63946395### Realtime Mcp Approval Request63966397- `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`63986399  A Realtime item requesting human approval of a tool invocation.64006401  - `id: string`64026403    The unique ID of the approval request.64046405  - `arguments: string`64066407    A JSON string of arguments for the tool.64086409  - `name: string`64106411    The name of the tool to run.64126413  - `server_label: string`64146415    The label of the MCP server making the request.64166417  - `type: "mcp_approval_request"`64186419    The type of the item. Always `mcp_approval_request`.64206421    - `"mcp_approval_request"`64226423### Realtime Mcp Approval Response64246425- `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`64266427  A Realtime item responding to an MCP approval request.64286429  - `id: string`64306431    The unique ID of the approval response.64326433  - `approval_request_id: string`64346435    The ID of the approval request being answered.64366437  - `approve: boolean`64386439    Whether the request was approved.64406441  - `type: "mcp_approval_response"`64426443    The type of the item. Always `mcp_approval_response`.64446445    - `"mcp_approval_response"`64466447  - `reason: optional string or null`64486449    Optional reason for the decision.64506451### Realtime Mcp List Tools64526453- `RealtimeMcpListTools object { server_label, tools, type, id }`64546455  A Realtime item listing tools available on an MCP server.64566457  - `server_label: string`64586459    The label of the MCP server.64606461  - `tools: array of object { input_schema, name, annotations, description }`64626463    The tools available on the server.64646465    - `input_schema: unknown`64666467      The JSON schema describing the tool's input.64686469    - `name: string`64706471      The name of the tool.64726473    - `annotations: optional unknown or null`64746475      Additional annotations about the tool.64766477    - `description: optional string or null`64786479      The description of the tool.64806481  - `type: "mcp_list_tools"`64826483    The type of the item. Always `mcp_list_tools`.64846485    - `"mcp_list_tools"`64866487  - `id: optional string`64886489    The unique ID of the list.64906491### Realtime Mcp Protocol Error64926493- `RealtimeMcpProtocolError object { code, message, type }`64946495  - `code: number`64966497  - `message: string`64986499  - `type: "protocol_error"`65006501    - `"protocol_error"`65026503### Realtime Mcp Tool Call65046505- `RealtimeMcpToolCall object { id, arguments, name, 5 more }`65066507  A Realtime item representing an invocation of a tool on an MCP server.65086509  - `id: string`65106511    The unique ID of the tool call.65126513  - `arguments: string`65146515    A JSON string of the arguments passed to the tool.65166517  - `name: string`65186519    The name of the tool that was run.65206521  - `server_label: string`65226523    The label of the MCP server running the tool.65246525  - `type: "mcp_call"`65266527    The type of the item. Always `mcp_call`.65286529    - `"mcp_call"`65306531  - `approval_request_id: optional string or null`65326533    The ID of an associated approval request, if any.65346535  - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`65366537    The error from the tool call, if any.65386539    - `RealtimeMcpProtocolError object { code, message, type }`65406541      - `code: number`65426543      - `message: string`65446545      - `type: "protocol_error"`65466547        - `"protocol_error"`65486549    - `RealtimeMcpToolExecutionError object { message, type }`65506551      - `message: string`65526553      - `type: "tool_execution_error"`65546555        - `"tool_execution_error"`65566557    - `RealtimeMcphttpError object { code, message, type }`65586559      - `code: number`65606561      - `message: string`65626563      - `type: "http_error"`65646565        - `"http_error"`65666567  - `output: optional string or null`65686569    The output from the tool call.65706571### Realtime Mcp Tool Execution Error65726573- `RealtimeMcpToolExecutionError object { message, type }`65746575  - `message: string`65766577  - `type: "tool_execution_error"`65786579    - `"tool_execution_error"`65806581### Realtime Mcphttp Error65826583- `RealtimeMcphttpError object { code, message, type }`65846585  - `code: number`65866587  - `message: string`65886589  - `type: "http_error"`65906591    - `"http_error"`65926593### Realtime Reasoning65946595- `RealtimeReasoning object { effort }`65966597  Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.65986599  - `effort: optional RealtimeReasoningEffort`66006601    Constrains effort on reasoning for reasoning-capable Realtime models such as6602    `gpt-realtime-2`.66036604    - `"minimal"`66056606    - `"low"`66076608    - `"medium"`66096610    - `"high"`66116612    - `"xhigh"`66136614### Realtime Reasoning Effort66156616- `RealtimeReasoningEffort = "minimal" or "low" or "medium" or 2 more`66176618  Constrains effort on reasoning for reasoning-capable Realtime models such as6619  `gpt-realtime-2`.66206621  - `"minimal"`66226623  - `"low"`66246625  - `"medium"`66266627  - `"high"`66286629  - `"xhigh"`66306631### Realtime Response66326633- `RealtimeResponse object { id, audio, conversation_id, 8 more }`66346635  The response resource.66366637  - `id: optional string`66386639    The unique ID of the response, will look like `resp_1234`.66406641  - `audio: optional object { output }`66426643    Configuration for audio output.66446645    - `output: optional object { format, voice }`66466647      - `format: optional RealtimeAudioFormats`66486649        The format of the output audio.66506651        - `PCMAudio object { rate, type }`66526653          The PCM audio format. Only a 24kHz sample rate is supported.66546655          - `rate: optional 24000`66566657            The sample rate of the audio. Always `24000`.66586659            - `24000`66606661          - `type: optional "audio/pcm"`66626663            The audio format. Always `audio/pcm`.66646665            - `"audio/pcm"`66666667        - `PCMUAudio object { type }`66686669          The G.711 μ-law format.66706671          - `type: optional "audio/pcmu"`66726673            The audio format. Always `audio/pcmu`.66746675            - `"audio/pcmu"`66766677        - `PCMAAudio object { type }`66786679          The G.711 A-law format.66806681          - `type: optional "audio/pcma"`66826683            The audio format. Always `audio/pcma`.66846685            - `"audio/pcma"`66866687      - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`66886689        The voice the model uses to respond. Voice cannot be changed during the6690        session once the model has responded with audio at least once. Current6691        voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,6692        `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for6693        best quality.66946695        - `string`66966697        - `"alloy" or "ash" or "ballad" or 7 more`66986699          The voice the model uses to respond. Voice cannot be changed during the6700          session once the model has responded with audio at least once. Current6701          voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,6702          `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for6703          best quality.67046705          - `"alloy"`67066707          - `"ash"`67086709          - `"ballad"`67106711          - `"coral"`67126713          - `"echo"`67146715          - `"sage"`67166717          - `"shimmer"`67186719          - `"verse"`67206721          - `"marin"`67226723          - `"cedar"`67246725  - `conversation_id: optional string`67266727    Which conversation the response is added to, determined by the `conversation`6728    field in the `response.create` event. If `auto`, the response will be added to6729    the default conversation and the value of `conversation_id` will be an id like6730    `conv_1234`. If `none`, the response will not be added to any conversation and6731    the value of `conversation_id` will be `null`. If responses are being triggered6732    automatically by VAD the response will be added to the default conversation67336734  - `max_output_tokens: optional number or "inf"`67356736    Maximum number of output tokens for a single assistant response,6737    inclusive of tool calls, that was used in this response.67386739    - `number`67406741    - `"inf"`67426743      - `"inf"`67446745  - `metadata: optional Metadata or null`67466747    Set of 16 key-value pairs that can be attached to an object. This can be6748    useful for storing additional information about the object in a structured6749    format, and querying for objects via API or the dashboard.67506751    Keys are strings with a maximum length of 64 characters. Values are strings6752    with a maximum length of 512 characters.67536754  - `object: optional "realtime.response"`67556756    The object type, must be `realtime.response`.67576758    - `"realtime.response"`67596760  - `output: optional array of ConversationItem`67616762    The list of output items generated by the response.67636764    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`67656766      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.67676768      - `content: array of object { text, type }`67696770        The content of the message.67716772        - `text: optional string`67736774          The text content.67756776        - `type: optional "input_text"`67776778          The content type. Always `input_text` for system messages.67796780          - `"input_text"`67816782      - `role: "system"`67836784        The role of the message sender. Always `system`.67856786        - `"system"`67876788      - `type: "message"`67896790        The type of the item. Always `message`.67916792        - `"message"`67936794      - `id: optional string`67956796        The unique ID of the item. This may be provided by the client or generated by the server.67976798      - `object: optional "realtime.item"`67996800        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.68016802        - `"realtime.item"`68036804      - `status: optional "completed" or "incomplete" or "in_progress"`68056806        The status of the item. Has no effect on the conversation.68076808        - `"completed"`68096810        - `"incomplete"`68116812        - `"in_progress"`68136814    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`68156816      A user message item in a Realtime conversation.68176818      - `content: array of object { audio, detail, image_url, 3 more }`68196820        The content of the message.68216822        - `audio: optional string`68236824          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.68256826        - `detail: optional "auto" or "low" or "high"`68276828          The detail level of the image (for `input_image`). `auto` will default to `high`.68296830          - `"auto"`68316832          - `"low"`68336834          - `"high"`68356836        - `image_url: optional string`68376838          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.68396840        - `text: optional string`68416842          The text content (for `input_text`).68436844        - `transcript: optional string`68456846          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.68476848        - `type: optional "input_text" or "input_audio" or "input_image"`68496850          The content type (`input_text`, `input_audio`, or `input_image`).68516852          - `"input_text"`68536854          - `"input_audio"`68556856          - `"input_image"`68576858      - `role: "user"`68596860        The role of the message sender. Always `user`.68616862        - `"user"`68636864      - `type: "message"`68656866        The type of the item. Always `message`.68676868        - `"message"`68696870      - `id: optional string`68716872        The unique ID of the item. This may be provided by the client or generated by the server.68736874      - `object: optional "realtime.item"`68756876        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.68776878        - `"realtime.item"`68796880      - `status: optional "completed" or "incomplete" or "in_progress"`68816882        The status of the item. Has no effect on the conversation.68836884        - `"completed"`68856886        - `"incomplete"`68876888        - `"in_progress"`68896890    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`68916892      An assistant message item in a Realtime conversation.68936894      - `content: array of object { audio, text, transcript, type }`68956896        The content of the message.68976898        - `audio: optional string`68996900          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.69016902        - `text: optional string`69036904          The text content.69056906        - `transcript: optional string`69076908          The transcript of the audio content, this will always be present if the output type is `audio`.69096910        - `type: optional "output_text" or "output_audio"`69116912          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.69136914          - `"output_text"`69156916          - `"output_audio"`69176918      - `role: "assistant"`69196920        The role of the message sender. Always `assistant`.69216922        - `"assistant"`69236924      - `type: "message"`69256926        The type of the item. Always `message`.69276928        - `"message"`69296930      - `id: optional string`69316932        The unique ID of the item. This may be provided by the client or generated by the server.69336934      - `object: optional "realtime.item"`69356936        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.69376938        - `"realtime.item"`69396940      - `status: optional "completed" or "incomplete" or "in_progress"`69416942        The status of the item. Has no effect on the conversation.69436944        - `"completed"`69456946        - `"incomplete"`69476948        - `"in_progress"`69496950    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`69516952      A function call item in a Realtime conversation.69536954      - `arguments: string`69556956        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.69576958      - `name: string`69596960        The name of the function being called.69616962      - `type: "function_call"`69636964        The type of the item. Always `function_call`.69656966        - `"function_call"`69676968      - `id: optional string`69696970        The unique ID of the item. This may be provided by the client or generated by the server.69716972      - `call_id: optional string`69736974        The ID of the function call.69756976      - `object: optional "realtime.item"`69776978        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.69796980        - `"realtime.item"`69816982      - `status: optional "completed" or "incomplete" or "in_progress"`69836984        The status of the item. Has no effect on the conversation.69856986        - `"completed"`69876988        - `"incomplete"`69896990        - `"in_progress"`69916992    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`69936994      A function call output item in a Realtime conversation.69956996      - `call_id: string`69976998        The ID of the function call this output is for.69997000      - `output: string`70017002        The output of the function call, this is free text and can contain any information or simply be empty.70037004      - `type: "function_call_output"`70057006        The type of the item. Always `function_call_output`.70077008        - `"function_call_output"`70097010      - `id: optional string`70117012        The unique ID of the item. This may be provided by the client or generated by the server.70137014      - `object: optional "realtime.item"`70157016        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.70177018        - `"realtime.item"`70197020      - `status: optional "completed" or "incomplete" or "in_progress"`70217022        The status of the item. Has no effect on the conversation.70237024        - `"completed"`70257026        - `"incomplete"`70277028        - `"in_progress"`70297030    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`70317032      A Realtime item responding to an MCP approval request.70337034      - `id: string`70357036        The unique ID of the approval response.70377038      - `approval_request_id: string`70397040        The ID of the approval request being answered.70417042      - `approve: boolean`70437044        Whether the request was approved.70457046      - `type: "mcp_approval_response"`70477048        The type of the item. Always `mcp_approval_response`.70497050        - `"mcp_approval_response"`70517052      - `reason: optional string or null`70537054        Optional reason for the decision.70557056    - `RealtimeMcpListTools object { server_label, tools, type, id }`70577058      A Realtime item listing tools available on an MCP server.70597060      - `server_label: string`70617062        The label of the MCP server.70637064      - `tools: array of object { input_schema, name, annotations, description }`70657066        The tools available on the server.70677068        - `input_schema: unknown`70697070          The JSON schema describing the tool's input.70717072        - `name: string`70737074          The name of the tool.70757076        - `annotations: optional unknown or null`70777078          Additional annotations about the tool.70797080        - `description: optional string or null`70817082          The description of the tool.70837084      - `type: "mcp_list_tools"`70857086        The type of the item. Always `mcp_list_tools`.70877088        - `"mcp_list_tools"`70897090      - `id: optional string`70917092        The unique ID of the list.70937094    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`70957096      A Realtime item representing an invocation of a tool on an MCP server.70977098      - `id: string`70997100        The unique ID of the tool call.71017102      - `arguments: string`71037104        A JSON string of the arguments passed to the tool.71057106      - `name: string`71077108        The name of the tool that was run.71097110      - `server_label: string`71117112        The label of the MCP server running the tool.71137114      - `type: "mcp_call"`71157116        The type of the item. Always `mcp_call`.71177118        - `"mcp_call"`71197120      - `approval_request_id: optional string or null`71217122        The ID of an associated approval request, if any.71237124      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`71257126        The error from the tool call, if any.71277128        - `RealtimeMcpProtocolError object { code, message, type }`71297130          - `code: number`71317132          - `message: string`71337134          - `type: "protocol_error"`71357136            - `"protocol_error"`71377138        - `RealtimeMcpToolExecutionError object { message, type }`71397140          - `message: string`71417142          - `type: "tool_execution_error"`71437144            - `"tool_execution_error"`71457146        - `RealtimeMcphttpError object { code, message, type }`71477148          - `code: number`71497150          - `message: string`71517152          - `type: "http_error"`71537154            - `"http_error"`71557156      - `output: optional string or null`71577158        The output from the tool call.71597160    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`71617162      A Realtime item requesting human approval of a tool invocation.71637164      - `id: string`71657166        The unique ID of the approval request.71677168      - `arguments: string`71697170        A JSON string of arguments for the tool.71717172      - `name: string`71737174        The name of the tool to run.71757176      - `server_label: string`71777178        The label of the MCP server making the request.71797180      - `type: "mcp_approval_request"`71817182        The type of the item. Always `mcp_approval_request`.71837184        - `"mcp_approval_request"`71857186  - `output_modalities: optional array of "text" or "audio"`71877188    The set of modalities the model used to respond, currently the only possible values are7189    `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the7190    output to mode `text` will disable audio output from the model.71917192    - `"text"`71937194    - `"audio"`71957196  - `status: optional "completed" or "cancelled" or "failed" or 2 more`71977198    The final status of the response (`completed`, `cancelled`, `failed`, or7199    `incomplete`, `in_progress`).72007201    - `"completed"`72027203    - `"cancelled"`72047205    - `"failed"`72067207    - `"incomplete"`72087209    - `"in_progress"`72107211  - `status_details: optional RealtimeResponseStatus`72127213    Additional details about the status.72147215    - `error: optional object { code, type }`72167217      A description of the error that caused the response to fail,7218      populated when the `status` is `failed`.72197220      - `code: optional string`72217222        Error code, if any.72237224      - `type: optional string`72257226        The type of error.72277228    - `reason: optional "turn_detected" or "client_cancelled" or "max_output_tokens" or "content_filter"`72297230      The reason the Response did not complete. For a `cancelled` Response,  one of `turn_detected` (the server VAD detected a new start of speech)  or `client_cancelled` (the client sent a cancel event). For an  `incomplete` Response, one of `max_output_tokens` or `content_filter`  (the server-side safety filter activated and cut off the response).72317232      - `"turn_detected"`72337234      - `"client_cancelled"`72357236      - `"max_output_tokens"`72377238      - `"content_filter"`72397240    - `type: optional "completed" or "cancelled" or "failed" or "incomplete"`72417242      The type of error that caused the response to fail, corresponding7243      with the `status` field (`completed`, `cancelled`, `incomplete`,7244      `failed`).72457246      - `"completed"`72477248      - `"cancelled"`72497250      - `"failed"`72517252      - `"incomplete"`72537254  - `usage: optional RealtimeResponseUsage`72557256    Usage statistics for the Response, this will correspond to billing. A7257    Realtime API session will maintain a conversation context and append new7258    Items to the Conversation, thus output from previous turns (text and7259    audio tokens) will become the input for later turns.72607261    - `input_token_details: optional RealtimeResponseUsageInputTokenDetails`72627263      Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.72647265      - `audio_tokens: optional number`72667267        The number of audio tokens used as input for the Response.72687269      - `cached_tokens: optional number`72707271        The number of cached tokens used as input for the Response.72727273      - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`72747275        Details about the cached tokens used as input for the Response.72767277        - `audio_tokens: optional number`72787279          The number of cached audio tokens used as input for the Response.72807281        - `image_tokens: optional number`72827283          The number of cached image tokens used as input for the Response.72847285        - `text_tokens: optional number`72867287          The number of cached text tokens used as input for the Response.72887289      - `image_tokens: optional number`72907291        The number of image tokens used as input for the Response.72927293      - `text_tokens: optional number`72947295        The number of text tokens used as input for the Response.72967297    - `input_tokens: optional number`72987299      The number of input tokens used in the Response, including text and7300      audio tokens.73017302    - `output_token_details: optional RealtimeResponseUsageOutputTokenDetails`73037304      Details about the output tokens used in the Response.73057306      - `audio_tokens: optional number`73077308        The number of audio tokens used in the Response.73097310      - `text_tokens: optional number`73117312        The number of text tokens used in the Response.73137314    - `output_tokens: optional number`73157316      The number of output tokens sent in the Response, including text and7317      audio tokens.73187319    - `total_tokens: optional number`73207321      The total number of tokens in the Response including input and output7322      text and audio tokens.73237324### Realtime Response Create Audio Output73257326- `RealtimeResponseCreateAudioOutput object { output }`73277328  Configuration for audio input and output.73297330  - `output: optional object { format, voice }`73317332    - `format: optional RealtimeAudioFormats`73337334      The format of the output audio.73357336      - `PCMAudio object { rate, type }`73377338        The PCM audio format. Only a 24kHz sample rate is supported.73397340        - `rate: optional 24000`73417342          The sample rate of the audio. Always `24000`.73437344          - `24000`73457346        - `type: optional "audio/pcm"`73477348          The audio format. Always `audio/pcm`.73497350          - `"audio/pcm"`73517352      - `PCMUAudio object { type }`73537354        The G.711 μ-law format.73557356        - `type: optional "audio/pcmu"`73577358          The audio format. Always `audio/pcmu`.73597360          - `"audio/pcmu"`73617362      - `PCMAAudio object { type }`73637364        The G.711 A-law format.73657366        - `type: optional "audio/pcma"`73677368          The audio format. Always `audio/pcma`.73697370          - `"audio/pcma"`73717372    - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`73737374      The voice the model uses to respond. Supported built-in voices are7375      `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,7376      `marin`, and `cedar`. You may also provide a custom voice object with7377      an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed7378      during the session once the model has responded with audio at least once.7379      We recommend `marin` and `cedar` for best quality.73807381      - `string`73827383      - `"alloy" or "ash" or "ballad" or 7 more`73847385        - `"alloy"`73867387        - `"ash"`73887389        - `"ballad"`73907391        - `"coral"`73927393        - `"echo"`73947395        - `"sage"`73967397        - `"shimmer"`73987399        - `"verse"`74007401        - `"marin"`74027403        - `"cedar"`74047405      - `ID object { id }`74067407        Custom voice reference.74087409        - `id: string`74107411          The custom voice ID, e.g. `voice_1234`.74127413### Realtime Response Create Params74147415- `RealtimeResponseCreateParams object { audio, conversation, input, 9 more }`74167417  Create a new Realtime response with these parameters74187419  - `audio: optional RealtimeResponseCreateAudioOutput`74207421    Configuration for audio input and output.74227423    - `output: optional object { format, voice }`74247425      - `format: optional RealtimeAudioFormats`74267427        The format of the output audio.74287429        - `PCMAudio object { rate, type }`74307431          The PCM audio format. Only a 24kHz sample rate is supported.74327433          - `rate: optional 24000`74347435            The sample rate of the audio. Always `24000`.74367437            - `24000`74387439          - `type: optional "audio/pcm"`74407441            The audio format. Always `audio/pcm`.74427443            - `"audio/pcm"`74447445        - `PCMUAudio object { type }`74467447          The G.711 μ-law format.74487449          - `type: optional "audio/pcmu"`74507451            The audio format. Always `audio/pcmu`.74527453            - `"audio/pcmu"`74547455        - `PCMAAudio object { type }`74567457          The G.711 A-law format.74587459          - `type: optional "audio/pcma"`74607461            The audio format. Always `audio/pcma`.74627463            - `"audio/pcma"`74647465      - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`74667467        The voice the model uses to respond. Supported built-in voices are7468        `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,7469        `marin`, and `cedar`. You may also provide a custom voice object with7470        an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed7471        during the session once the model has responded with audio at least once.7472        We recommend `marin` and `cedar` for best quality.74737474        - `string`74757476        - `"alloy" or "ash" or "ballad" or 7 more`74777478          - `"alloy"`74797480          - `"ash"`74817482          - `"ballad"`74837484          - `"coral"`74857486          - `"echo"`74877488          - `"sage"`74897490          - `"shimmer"`74917492          - `"verse"`74937494          - `"marin"`74957496          - `"cedar"`74977498        - `ID object { id }`74997500          Custom voice reference.75017502          - `id: string`75037504            The custom voice ID, e.g. `voice_1234`.75057506  - `conversation: optional string or "auto" or "none"`75077508    Controls which conversation the response is added to. Currently supports7509    `auto` and `none`, with `auto` as the default value. The `auto` value7510    means that the contents of the response will be added to the default7511    conversation. Set this to `none` to create an out-of-band response which7512    will not add items to default conversation.75137514    - `string`75157516    - `"auto" or "none"`75177518      Controls which conversation the response is added to. Currently supports7519      `auto` and `none`, with `auto` as the default value. The `auto` value7520      means that the contents of the response will be added to the default7521      conversation. Set this to `none` to create an out-of-band response which7522      will not add items to default conversation.75237524      - `"auto"`75257526      - `"none"`75277528  - `input: optional array of ConversationItem`75297530    Input items to include in the prompt for the model. Using this field7531    creates a new context for this Response instead of using the default7532    conversation. An empty array `[]` will clear the context for this Response.7533    Note that this can include references to items that previously appeared in the session7534    using their id.75357536    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`75377538      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.75397540      - `content: array of object { text, type }`75417542        The content of the message.75437544        - `text: optional string`75457546          The text content.75477548        - `type: optional "input_text"`75497550          The content type. Always `input_text` for system messages.75517552          - `"input_text"`75537554      - `role: "system"`75557556        The role of the message sender. Always `system`.75577558        - `"system"`75597560      - `type: "message"`75617562        The type of the item. Always `message`.75637564        - `"message"`75657566      - `id: optional string`75677568        The unique ID of the item. This may be provided by the client or generated by the server.75697570      - `object: optional "realtime.item"`75717572        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.75737574        - `"realtime.item"`75757576      - `status: optional "completed" or "incomplete" or "in_progress"`75777578        The status of the item. Has no effect on the conversation.75797580        - `"completed"`75817582        - `"incomplete"`75837584        - `"in_progress"`75857586    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`75877588      A user message item in a Realtime conversation.75897590      - `content: array of object { audio, detail, image_url, 3 more }`75917592        The content of the message.75937594        - `audio: optional string`75957596          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.75977598        - `detail: optional "auto" or "low" or "high"`75997600          The detail level of the image (for `input_image`). `auto` will default to `high`.76017602          - `"auto"`76037604          - `"low"`76057606          - `"high"`76077608        - `image_url: optional string`76097610          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.76117612        - `text: optional string`76137614          The text content (for `input_text`).76157616        - `transcript: optional string`76177618          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.76197620        - `type: optional "input_text" or "input_audio" or "input_image"`76217622          The content type (`input_text`, `input_audio`, or `input_image`).76237624          - `"input_text"`76257626          - `"input_audio"`76277628          - `"input_image"`76297630      - `role: "user"`76317632        The role of the message sender. Always `user`.76337634        - `"user"`76357636      - `type: "message"`76377638        The type of the item. Always `message`.76397640        - `"message"`76417642      - `id: optional string`76437644        The unique ID of the item. This may be provided by the client or generated by the server.76457646      - `object: optional "realtime.item"`76477648        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.76497650        - `"realtime.item"`76517652      - `status: optional "completed" or "incomplete" or "in_progress"`76537654        The status of the item. Has no effect on the conversation.76557656        - `"completed"`76577658        - `"incomplete"`76597660        - `"in_progress"`76617662    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`76637664      An assistant message item in a Realtime conversation.76657666      - `content: array of object { audio, text, transcript, type }`76677668        The content of the message.76697670        - `audio: optional string`76717672          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.76737674        - `text: optional string`76757676          The text content.76777678        - `transcript: optional string`76797680          The transcript of the audio content, this will always be present if the output type is `audio`.76817682        - `type: optional "output_text" or "output_audio"`76837684          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.76857686          - `"output_text"`76877688          - `"output_audio"`76897690      - `role: "assistant"`76917692        The role of the message sender. Always `assistant`.76937694        - `"assistant"`76957696      - `type: "message"`76977698        The type of the item. Always `message`.76997700        - `"message"`77017702      - `id: optional string`77037704        The unique ID of the item. This may be provided by the client or generated by the server.77057706      - `object: optional "realtime.item"`77077708        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.77097710        - `"realtime.item"`77117712      - `status: optional "completed" or "incomplete" or "in_progress"`77137714        The status of the item. Has no effect on the conversation.77157716        - `"completed"`77177718        - `"incomplete"`77197720        - `"in_progress"`77217722    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`77237724      A function call item in a Realtime conversation.77257726      - `arguments: string`77277728        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.77297730      - `name: string`77317732        The name of the function being called.77337734      - `type: "function_call"`77357736        The type of the item. Always `function_call`.77377738        - `"function_call"`77397740      - `id: optional string`77417742        The unique ID of the item. This may be provided by the client or generated by the server.77437744      - `call_id: optional string`77457746        The ID of the function call.77477748      - `object: optional "realtime.item"`77497750        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.77517752        - `"realtime.item"`77537754      - `status: optional "completed" or "incomplete" or "in_progress"`77557756        The status of the item. Has no effect on the conversation.77577758        - `"completed"`77597760        - `"incomplete"`77617762        - `"in_progress"`77637764    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`77657766      A function call output item in a Realtime conversation.77677768      - `call_id: string`77697770        The ID of the function call this output is for.77717772      - `output: string`77737774        The output of the function call, this is free text and can contain any information or simply be empty.77757776      - `type: "function_call_output"`77777778        The type of the item. Always `function_call_output`.77797780        - `"function_call_output"`77817782      - `id: optional string`77837784        The unique ID of the item. This may be provided by the client or generated by the server.77857786      - `object: optional "realtime.item"`77877788        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.77897790        - `"realtime.item"`77917792      - `status: optional "completed" or "incomplete" or "in_progress"`77937794        The status of the item. Has no effect on the conversation.77957796        - `"completed"`77977798        - `"incomplete"`77997800        - `"in_progress"`78017802    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`78037804      A Realtime item responding to an MCP approval request.78057806      - `id: string`78077808        The unique ID of the approval response.78097810      - `approval_request_id: string`78117812        The ID of the approval request being answered.78137814      - `approve: boolean`78157816        Whether the request was approved.78177818      - `type: "mcp_approval_response"`78197820        The type of the item. Always `mcp_approval_response`.78217822        - `"mcp_approval_response"`78237824      - `reason: optional string or null`78257826        Optional reason for the decision.78277828    - `RealtimeMcpListTools object { server_label, tools, type, id }`78297830      A Realtime item listing tools available on an MCP server.78317832      - `server_label: string`78337834        The label of the MCP server.78357836      - `tools: array of object { input_schema, name, annotations, description }`78377838        The tools available on the server.78397840        - `input_schema: unknown`78417842          The JSON schema describing the tool's input.78437844        - `name: string`78457846          The name of the tool.78477848        - `annotations: optional unknown or null`78497850          Additional annotations about the tool.78517852        - `description: optional string or null`78537854          The description of the tool.78557856      - `type: "mcp_list_tools"`78577858        The type of the item. Always `mcp_list_tools`.78597860        - `"mcp_list_tools"`78617862      - `id: optional string`78637864        The unique ID of the list.78657866    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`78677868      A Realtime item representing an invocation of a tool on an MCP server.78697870      - `id: string`78717872        The unique ID of the tool call.78737874      - `arguments: string`78757876        A JSON string of the arguments passed to the tool.78777878      - `name: string`78797880        The name of the tool that was run.78817882      - `server_label: string`78837884        The label of the MCP server running the tool.78857886      - `type: "mcp_call"`78877888        The type of the item. Always `mcp_call`.78897890        - `"mcp_call"`78917892      - `approval_request_id: optional string or null`78937894        The ID of an associated approval request, if any.78957896      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`78977898        The error from the tool call, if any.78997900        - `RealtimeMcpProtocolError object { code, message, type }`79017902          - `code: number`79037904          - `message: string`79057906          - `type: "protocol_error"`79077908            - `"protocol_error"`79097910        - `RealtimeMcpToolExecutionError object { message, type }`79117912          - `message: string`79137914          - `type: "tool_execution_error"`79157916            - `"tool_execution_error"`79177918        - `RealtimeMcphttpError object { code, message, type }`79197920          - `code: number`79217922          - `message: string`79237924          - `type: "http_error"`79257926            - `"http_error"`79277928      - `output: optional string or null`79297930        The output from the tool call.79317932    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`79337934      A Realtime item requesting human approval of a tool invocation.79357936      - `id: string`79377938        The unique ID of the approval request.79397940      - `arguments: string`79417942        A JSON string of arguments for the tool.79437944      - `name: string`79457946        The name of the tool to run.79477948      - `server_label: string`79497950        The label of the MCP server making the request.79517952      - `type: "mcp_approval_request"`79537954        The type of the item. Always `mcp_approval_request`.79557956        - `"mcp_approval_request"`79577958  - `instructions: optional string`79597960    The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.7961    Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.79627963  - `max_output_tokens: optional number or "inf"`79647965    Maximum number of output tokens for a single assistant response,7966    inclusive of tool calls. Provide an integer between 1 and 4096 to7967    limit output tokens, or `inf` for the maximum available tokens for a7968    given model. Defaults to `inf`.79697970    - `number`79717972    - `"inf"`79737974      - `"inf"`79757976  - `metadata: optional Metadata or null`79777978    Set of 16 key-value pairs that can be attached to an object. This can be7979    useful for storing additional information about the object in a structured7980    format, and querying for objects via API or the dashboard.79817982    Keys are strings with a maximum length of 64 characters. Values are strings7983    with a maximum length of 512 characters.79847985  - `output_modalities: optional array of "text" or "audio"`79867987    The set of modalities the model used to respond, currently the only possible values are7988    `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the7989    output to mode `text` will disable audio output from the model.79907991    - `"text"`79927993    - `"audio"`79947995  - `parallel_tool_calls: optional boolean`79967997    Whether the model may call multiple tools in parallel. Only supported by7998    reasoning Realtime models such as `gpt-realtime-2`.79998000  - `prompt: optional ResponsePrompt or null`80018002    Reference to a prompt template and its variables.8003    [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).80048005    - `id: string`80068007      The unique identifier of the prompt template to use.80088009    - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`80108011      Optional map of values to substitute in for variables in your8012      prompt. The substitution values can either be strings, or other8013      Response input types like images or files.80148015      - `string`80168017      - `ResponseInputText object { text, type, prompt_cache_breakpoint }`80188019        A text input to the model.80208021        - `text: string`80228023          The text input to the model.80248025        - `type: "input_text"`80268027          The type of the input item. Always `input_text`.80288029          - `"input_text"`80308031        - `prompt_cache_breakpoint: optional object { mode }`80328033          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.80348035          - `mode: "explicit"`80368037            The breakpoint mode. Always `explicit`.80388039            - `"explicit"`80408041      - `ResponseInputImage object { detail, type, file_id, 2 more }`80428043        An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).80448045        - `detail: ImageDetail`80468047          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.80488049          - `"low"`80508051          - `"high"`80528053          - `"auto"`80548055          - `"original"`80568057        - `type: "input_image"`80588059          The type of the input item. Always `input_image`.80608061          - `"input_image"`80628063        - `file_id: optional string or null`80648065          The ID of the file to be sent to the model.80668067        - `image_url: optional string or null`80688069          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.80708071        - `prompt_cache_breakpoint: optional object { mode }`80728073          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.80748075          - `mode: "explicit"`80768077            The breakpoint mode. Always `explicit`.80788079            - `"explicit"`80808081      - `ResponseInputFile object { type, detail, file_data, 4 more }`80828083        A file input to the model.80848085        - `type: "input_file"`80868087          The type of the input item. Always `input_file`.80888089          - `"input_file"`80908091        - `detail: optional "auto" or "low" or "high"`80928093          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`.80948095          - `"auto"`80968097          - `"low"`80988099          - `"high"`81008101        - `file_data: optional string`81028103          The content of the file to be sent to the model.81048105        - `file_id: optional string or null`81068107          The ID of the file to be sent to the model.81088109        - `file_url: optional string`81108111          The URL of the file to be sent to the model.81128113        - `filename: optional string`81148115          The name of the file to be sent to the model.81168117        - `prompt_cache_breakpoint: optional object { mode }`81188119          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.81208121          - `mode: "explicit"`81228123            The breakpoint mode. Always `explicit`.81248125            - `"explicit"`81268127    - `version: optional string or null`81288129      Optional version of the prompt template.81308131  - `reasoning: optional RealtimeReasoning`81328133    Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.81348135    - `effort: optional RealtimeReasoningEffort`81368137      Constrains effort on reasoning for reasoning-capable Realtime models such as8138      `gpt-realtime-2`.81398140      - `"minimal"`81418142      - `"low"`81438144      - `"medium"`81458146      - `"high"`81478148      - `"xhigh"`81498150  - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`81518152    How the model chooses tools. Provide one of the string modes or force a specific8153    function/MCP tool.81548155    - `ToolChoiceOptions = "none" or "auto" or "required"`81568157      Controls which (if any) tool is called by the model.81588159      `none` means the model will not call any tool and instead generates a message.81608161      `auto` means the model can pick between generating a message or calling one or8162      more tools.81638164      `required` means the model must call one or more tools.81658166      - `"none"`81678168      - `"auto"`81698170      - `"required"`81718172    - `ToolChoiceFunction object { name, type }`81738174      Use this option to force the model to call a specific function.81758176      - `name: string`81778178        The name of the function to call.81798180      - `type: "function"`81818182        For function calling, the type is always `function`.81838184        - `"function"`81858186    - `ToolChoiceMcp object { server_label, type, name }`81878188      Use this option to force the model to call a specific tool on a remote MCP server.81898190      - `server_label: string`81918192        The label of the MCP server to use.81938194      - `type: "mcp"`81958196        For MCP tools, the type is always `mcp`.81978198        - `"mcp"`81998200      - `name: optional string or null`82018202        The name of the tool to call on the server.82038204  - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`82058206    Tools available to the model.82078208    - `RealtimeFunctionTool object { description, name, parameters, type }`82098210      - `description: optional string`82118212        The description of the function, including guidance on when and how8213        to call it, and guidance about what to tell the user when calling8214        (if anything).82158216      - `name: optional string`82178218        The name of the function.82198220      - `parameters: optional unknown`82218222        Parameters of the function in JSON Schema.82238224      - `type: optional "function"`82258226        The type of the tool, i.e. `function`.82278228        - `"function"`82298230    - `McpTool object { server_label, type, allowed_callers, 9 more }`82318232      Give the model access to additional tools via remote Model Context Protocol8233      (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).82348235      - `server_label: string`82368237        A label for this MCP server, used to identify it in tool calls.82388239      - `type: "mcp"`82408241        The type of the MCP tool. Always `mcp`.82428243        - `"mcp"`82448245      - `allowed_callers: optional array of "direct" or "programmatic" or null`82468247        The tool invocation context(s).82488249        - `"direct"`82508251        - `"programmatic"`82528253      - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`82548255        List of allowed tool names or a filter object.82568257        - `McpAllowedTools = array of string`82588259          A string array of allowed tool names82608261        - `McpToolFilter object { read_only, tool_names }`82628263          A filter object to specify which tools are allowed.82648265          - `read_only: optional boolean`82668267            Indicates whether or not a tool modifies data or is read-only. If an8268            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8269            it will match this filter.82708271          - `tool_names: optional array of string`82728273            List of allowed tool names.82748275      - `authorization: optional string`82768277        An OAuth access token that can be used with a remote MCP server, either8278        with a custom MCP server URL or a service connector. Your application8279        must handle the OAuth authorization flow and provide the token here.82808281      - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`82828283        Identifier for service connectors, like those available in ChatGPT. One of8284        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more8285        about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).82868287        This field is deprecated for models released after September 1, 2026.8288        Use `server_url` to connect to a remote MCP server, or `tunnel_id` to8289        connect through a Secure MCP Tunnel.82908291        Currently supported `connector_id` values are:82928293        - Dropbox: `connector_dropbox`8294        - Gmail: `connector_gmail`8295        - Google Calendar: `connector_googlecalendar`8296        - Google Drive: `connector_googledrive`8297        - Microsoft Teams: `connector_microsoftteams`8298        - Outlook Calendar: `connector_outlookcalendar`8299        - Outlook Email: `connector_outlookemail`8300        - SharePoint: `connector_sharepoint`83018302        - `"connector_dropbox"`83038304        - `"connector_gmail"`83058306        - `"connector_googlecalendar"`83078308        - `"connector_googledrive"`83098310        - `"connector_microsoftteams"`83118312        - `"connector_outlookcalendar"`83138314        - `"connector_outlookemail"`83158316        - `"connector_sharepoint"`83178318      - `defer_loading: optional boolean`83198320        Whether this MCP tool is deferred and discovered via tool search.83218322      - `headers: optional map[string] or null`83238324        Optional HTTP headers to send to the MCP server. Use for authentication8325        or other purposes.83268327      - `require_approval: optional object { always, never }  or "always" or "never" or null`83288329        Specify which of the MCP server's tools require approval.83308331        - `McpToolApprovalFilter object { always, never }`83328333          Specify which of the MCP server's tools require approval. Can be8334          `always`, `never`, or a filter object associated with tools8335          that require approval.83368337          - `always: optional object { read_only, tool_names }`83388339            A filter object to specify which tools are allowed.83408341            - `read_only: optional boolean`83428343              Indicates whether or not a tool modifies data or is read-only. If an8344              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8345              it will match this filter.83468347            - `tool_names: optional array of string`83488349              List of allowed tool names.83508351          - `never: optional object { read_only, tool_names }`83528353            A filter object to specify which tools are allowed.83548355            - `read_only: optional boolean`83568357              Indicates whether or not a tool modifies data or is read-only. If an8358              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),8359              it will match this filter.83608361            - `tool_names: optional array of string`83628363              List of allowed tool names.83648365        - `McpToolApprovalSetting = "always" or "never"`83668367          Specify a single approval policy for all tools. One of `always` or8368          `never`. When set to `always`, all tools will require approval. When8369          set to `never`, all tools will not require approval.83708371          - `"always"`83728373          - `"never"`83748375      - `server_description: optional string`83768377        Optional description of the MCP server, used to provide more context.83788379      - `server_url: optional string`83808381        The URL for the MCP server. One of `server_url`, `connector_id`, or8382        `tunnel_id` must be provided.83838384      - `tunnel_id: optional string`83858386        The Secure MCP Tunnel ID to use instead of a direct server URL. One of8387        `server_url`, `connector_id`, or `tunnel_id` must be provided.83888389### Realtime Response Status83908391- `RealtimeResponseStatus object { error, reason, type }`83928393  Additional details about the status.83948395  - `error: optional object { code, type }`83968397    A description of the error that caused the response to fail,8398    populated when the `status` is `failed`.83998400    - `code: optional string`84018402      Error code, if any.84038404    - `type: optional string`84058406      The type of error.84078408  - `reason: optional "turn_detected" or "client_cancelled" or "max_output_tokens" or "content_filter"`84098410    The reason the Response did not complete. For a `cancelled` Response,  one of `turn_detected` (the server VAD detected a new start of speech)  or `client_cancelled` (the client sent a cancel event). For an  `incomplete` Response, one of `max_output_tokens` or `content_filter`  (the server-side safety filter activated and cut off the response).84118412    - `"turn_detected"`84138414    - `"client_cancelled"`84158416    - `"max_output_tokens"`84178418    - `"content_filter"`84198420  - `type: optional "completed" or "cancelled" or "failed" or "incomplete"`84218422    The type of error that caused the response to fail, corresponding8423    with the `status` field (`completed`, `cancelled`, `incomplete`,8424    `failed`).84258426    - `"completed"`84278428    - `"cancelled"`84298430    - `"failed"`84318432    - `"incomplete"`84338434### Realtime Response Usage84358436- `RealtimeResponseUsage object { input_token_details, input_tokens, output_token_details, 2 more }`84378438  Usage statistics for the Response, this will correspond to billing. A8439  Realtime API session will maintain a conversation context and append new8440  Items to the Conversation, thus output from previous turns (text and8441  audio tokens) will become the input for later turns.84428443  - `input_token_details: optional RealtimeResponseUsageInputTokenDetails`84448445    Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.84468447    - `audio_tokens: optional number`84488449      The number of audio tokens used as input for the Response.84508451    - `cached_tokens: optional number`84528453      The number of cached tokens used as input for the Response.84548455    - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`84568457      Details about the cached tokens used as input for the Response.84588459      - `audio_tokens: optional number`84608461        The number of cached audio tokens used as input for the Response.84628463      - `image_tokens: optional number`84648465        The number of cached image tokens used as input for the Response.84668467      - `text_tokens: optional number`84688469        The number of cached text tokens used as input for the Response.84708471    - `image_tokens: optional number`84728473      The number of image tokens used as input for the Response.84748475    - `text_tokens: optional number`84768477      The number of text tokens used as input for the Response.84788479  - `input_tokens: optional number`84808481    The number of input tokens used in the Response, including text and8482    audio tokens.84838484  - `output_token_details: optional RealtimeResponseUsageOutputTokenDetails`84858486    Details about the output tokens used in the Response.84878488    - `audio_tokens: optional number`84898490      The number of audio tokens used in the Response.84918492    - `text_tokens: optional number`84938494      The number of text tokens used in the Response.84958496  - `output_tokens: optional number`84978498    The number of output tokens sent in the Response, including text and8499    audio tokens.85008501  - `total_tokens: optional number`85028503    The total number of tokens in the Response including input and output8504    text and audio tokens.85058506### Realtime Response Usage Input Token Details85078508- `RealtimeResponseUsageInputTokenDetails object { audio_tokens, cached_tokens, cached_tokens_details, 2 more }`85098510  Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.85118512  - `audio_tokens: optional number`85138514    The number of audio tokens used as input for the Response.85158516  - `cached_tokens: optional number`85178518    The number of cached tokens used as input for the Response.85198520  - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`85218522    Details about the cached tokens used as input for the Response.85238524    - `audio_tokens: optional number`85258526      The number of cached audio tokens used as input for the Response.85278528    - `image_tokens: optional number`85298530      The number of cached image tokens used as input for the Response.85318532    - `text_tokens: optional number`85338534      The number of cached text tokens used as input for the Response.85358536  - `image_tokens: optional number`85378538    The number of image tokens used as input for the Response.85398540  - `text_tokens: optional number`85418542    The number of text tokens used as input for the Response.85438544### Realtime Response Usage Output Token Details85458546- `RealtimeResponseUsageOutputTokenDetails object { audio_tokens, text_tokens }`85478548  Details about the output tokens used in the Response.85498550  - `audio_tokens: optional number`85518552    The number of audio tokens used in the Response.85538554  - `text_tokens: optional number`85558556    The number of text tokens used in the Response.85578558### Realtime Server Event85598560- `RealtimeServerEvent = ConversationCreatedEvent or ConversationItemCreatedEvent or ConversationItemDeletedEvent or 43 more`85618562  A realtime server event.85638564  - `ConversationCreatedEvent object { conversation, event_id, type }`85658566    Returned when a conversation is created. Emitted right after session creation.85678568    - `conversation: object { id, object }`85698570      The conversation resource.85718572      - `id: optional string`85738574        The unique ID of the conversation.85758576      - `object: optional string`85778578        The object type, must be `realtime.conversation`.85798580    - `event_id: string`85818582      The unique ID of the server event.85838584    - `type: "conversation.created"`85858586      The event type, must be `conversation.created`.85878588      - `"conversation.created"`85898590  - `ConversationItemCreatedEvent object { event_id, item, type, previous_item_id }`85918592    Returned when a conversation item is created. There are several scenarios that produce this event:85938594    - The server is generating a Response, which if successful will produce8595      either one or two Items, which will be of type `message`8596      (role `assistant`) or type `function_call`.8597    - The input audio buffer has been committed, either by the client or the8598      server (in `server_vad` mode). The server will take the content of the8599      input audio buffer and add it to a new user message Item.8600    - The client has sent a `conversation.item.create` event to add a new Item8601      to the Conversation.86028603    - `event_id: string`86048605      The unique ID of the server event.86068607    - `item: ConversationItem`86088609      A single item within a Realtime conversation.86108611      - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`86128613        A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.86148615        - `content: array of object { text, type }`86168617          The content of the message.86188619          - `text: optional string`86208621            The text content.86228623          - `type: optional "input_text"`86248625            The content type. Always `input_text` for system messages.86268627            - `"input_text"`86288629        - `role: "system"`86308631          The role of the message sender. Always `system`.86328633          - `"system"`86348635        - `type: "message"`86368637          The type of the item. Always `message`.86388639          - `"message"`86408641        - `id: optional string`86428643          The unique ID of the item. This may be provided by the client or generated by the server.86448645        - `object: optional "realtime.item"`86468647          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.86488649          - `"realtime.item"`86508651        - `status: optional "completed" or "incomplete" or "in_progress"`86528653          The status of the item. Has no effect on the conversation.86548655          - `"completed"`86568657          - `"incomplete"`86588659          - `"in_progress"`86608661      - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`86628663        A user message item in a Realtime conversation.86648665        - `content: array of object { audio, detail, image_url, 3 more }`86668667          The content of the message.86688669          - `audio: optional string`86708671            Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.86728673          - `detail: optional "auto" or "low" or "high"`86748675            The detail level of the image (for `input_image`). `auto` will default to `high`.86768677            - `"auto"`86788679            - `"low"`86808681            - `"high"`86828683          - `image_url: optional string`86848685            Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.86868687          - `text: optional string`86888689            The text content (for `input_text`).86908691          - `transcript: optional string`86928693            Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.86948695          - `type: optional "input_text" or "input_audio" or "input_image"`86968697            The content type (`input_text`, `input_audio`, or `input_image`).86988699            - `"input_text"`87008701            - `"input_audio"`87028703            - `"input_image"`87048705        - `role: "user"`87068707          The role of the message sender. Always `user`.87088709          - `"user"`87108711        - `type: "message"`87128713          The type of the item. Always `message`.87148715          - `"message"`87168717        - `id: optional string`87188719          The unique ID of the item. This may be provided by the client or generated by the server.87208721        - `object: optional "realtime.item"`87228723          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.87248725          - `"realtime.item"`87268727        - `status: optional "completed" or "incomplete" or "in_progress"`87288729          The status of the item. Has no effect on the conversation.87308731          - `"completed"`87328733          - `"incomplete"`87348735          - `"in_progress"`87368737      - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`87388739        An assistant message item in a Realtime conversation.87408741        - `content: array of object { audio, text, transcript, type }`87428743          The content of the message.87448745          - `audio: optional string`87468747            Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.87488749          - `text: optional string`87508751            The text content.87528753          - `transcript: optional string`87548755            The transcript of the audio content, this will always be present if the output type is `audio`.87568757          - `type: optional "output_text" or "output_audio"`87588759            The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.87608761            - `"output_text"`87628763            - `"output_audio"`87648765        - `role: "assistant"`87668767          The role of the message sender. Always `assistant`.87688769          - `"assistant"`87708771        - `type: "message"`87728773          The type of the item. Always `message`.87748775          - `"message"`87768777        - `id: optional string`87788779          The unique ID of the item. This may be provided by the client or generated by the server.87808781        - `object: optional "realtime.item"`87828783          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.87848785          - `"realtime.item"`87868787        - `status: optional "completed" or "incomplete" or "in_progress"`87888789          The status of the item. Has no effect on the conversation.87908791          - `"completed"`87928793          - `"incomplete"`87948795          - `"in_progress"`87968797      - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`87988799        A function call item in a Realtime conversation.88008801        - `arguments: string`88028803          The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.88048805        - `name: string`88068807          The name of the function being called.88088809        - `type: "function_call"`88108811          The type of the item. Always `function_call`.88128813          - `"function_call"`88148815        - `id: optional string`88168817          The unique ID of the item. This may be provided by the client or generated by the server.88188819        - `call_id: optional string`88208821          The ID of the function call.88228823        - `object: optional "realtime.item"`88248825          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.88268827          - `"realtime.item"`88288829        - `status: optional "completed" or "incomplete" or "in_progress"`88308831          The status of the item. Has no effect on the conversation.88328833          - `"completed"`88348835          - `"incomplete"`88368837          - `"in_progress"`88388839      - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`88408841        A function call output item in a Realtime conversation.88428843        - `call_id: string`88448845          The ID of the function call this output is for.88468847        - `output: string`88488849          The output of the function call, this is free text and can contain any information or simply be empty.88508851        - `type: "function_call_output"`88528853          The type of the item. Always `function_call_output`.88548855          - `"function_call_output"`88568857        - `id: optional string`88588859          The unique ID of the item. This may be provided by the client or generated by the server.88608861        - `object: optional "realtime.item"`88628863          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.88648865          - `"realtime.item"`88668867        - `status: optional "completed" or "incomplete" or "in_progress"`88688869          The status of the item. Has no effect on the conversation.88708871          - `"completed"`88728873          - `"incomplete"`88748875          - `"in_progress"`88768877      - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`88788879        A Realtime item responding to an MCP approval request.88808881        - `id: string`88828883          The unique ID of the approval response.88848885        - `approval_request_id: string`88868887          The ID of the approval request being answered.88888889        - `approve: boolean`88908891          Whether the request was approved.88928893        - `type: "mcp_approval_response"`88948895          The type of the item. Always `mcp_approval_response`.88968897          - `"mcp_approval_response"`88988899        - `reason: optional string or null`89008901          Optional reason for the decision.89028903      - `RealtimeMcpListTools object { server_label, tools, type, id }`89048905        A Realtime item listing tools available on an MCP server.89068907        - `server_label: string`89088909          The label of the MCP server.89108911        - `tools: array of object { input_schema, name, annotations, description }`89128913          The tools available on the server.89148915          - `input_schema: unknown`89168917            The JSON schema describing the tool's input.89188919          - `name: string`89208921            The name of the tool.89228923          - `annotations: optional unknown or null`89248925            Additional annotations about the tool.89268927          - `description: optional string or null`89288929            The description of the tool.89308931        - `type: "mcp_list_tools"`89328933          The type of the item. Always `mcp_list_tools`.89348935          - `"mcp_list_tools"`89368937        - `id: optional string`89388939          The unique ID of the list.89408941      - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`89428943        A Realtime item representing an invocation of a tool on an MCP server.89448945        - `id: string`89468947          The unique ID of the tool call.89488949        - `arguments: string`89508951          A JSON string of the arguments passed to the tool.89528953        - `name: string`89548955          The name of the tool that was run.89568957        - `server_label: string`89588959          The label of the MCP server running the tool.89608961        - `type: "mcp_call"`89628963          The type of the item. Always `mcp_call`.89648965          - `"mcp_call"`89668967        - `approval_request_id: optional string or null`89688969          The ID of an associated approval request, if any.89708971        - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`89728973          The error from the tool call, if any.89748975          - `RealtimeMcpProtocolError object { code, message, type }`89768977            - `code: number`89788979            - `message: string`89808981            - `type: "protocol_error"`89828983              - `"protocol_error"`89848985          - `RealtimeMcpToolExecutionError object { message, type }`89868987            - `message: string`89888989            - `type: "tool_execution_error"`89908991              - `"tool_execution_error"`89928993          - `RealtimeMcphttpError object { code, message, type }`89948995            - `code: number`89968997            - `message: string`89988999            - `type: "http_error"`90009001              - `"http_error"`90029003        - `output: optional string or null`90049005          The output from the tool call.90069007      - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`90089009        A Realtime item requesting human approval of a tool invocation.90109011        - `id: string`90129013          The unique ID of the approval request.90149015        - `arguments: string`90169017          A JSON string of arguments for the tool.90189019        - `name: string`90209021          The name of the tool to run.90229023        - `server_label: string`90249025          The label of the MCP server making the request.90269027        - `type: "mcp_approval_request"`90289029          The type of the item. Always `mcp_approval_request`.90309031          - `"mcp_approval_request"`90329033    - `type: "conversation.item.created"`90349035      The event type, must be `conversation.item.created`.90369037      - `"conversation.item.created"`90389039    - `previous_item_id: optional string or null`90409041      The ID of the preceding item in the Conversation context, allows the9042      client to understand the order of the conversation. Can be `null` if the9043      item has no predecessor.90449045  - `ConversationItemDeletedEvent object { event_id, item_id, type }`90469047    Returned when an item in the conversation is deleted by the client with a9048    `conversation.item.delete` event. This event is used to synchronize the9049    server's understanding of the conversation history with the client's view.90509051    - `event_id: string`90529053      The unique ID of the server event.90549055    - `item_id: string`90569057      The ID of the item that was deleted.90589059    - `type: "conversation.item.deleted"`90609061      The event type, must be `conversation.item.deleted`.90629063      - `"conversation.item.deleted"`90649065  - `ConversationItemInputAudioTranscriptionCompletedEvent object { content_index, event_id, item_id, 5 more }`90669067    This event is the output of audio transcription for user audio written to the9068    user audio buffer. Transcription begins when the input audio buffer is9069    committed by the client or server (when VAD is enabled). Transcription runs9070    asynchronously with Response creation, so this event may come before or after9071    the Response events.90729073    Realtime API models accept audio natively, and thus input transcription is a9074    separate process run on a separate ASR (Automatic Speech Recognition) model.9075    The transcript may diverge somewhat from the model's interpretation, and9076    should be treated as a rough guide.90779078    - `content_index: number`90799080      The index of the content part containing the audio.90819082    - `event_id: string`90839084      The unique ID of the server event.90859086    - `item_id: string`90879088      The ID of the item containing the audio that is being transcribed.90899090    - `transcript: string`90919092      The transcribed text.90939094    - `type: "conversation.item.input_audio_transcription.completed"`90959096      The event type, must be9097      `conversation.item.input_audio_transcription.completed`.90989099      - `"conversation.item.input_audio_transcription.completed"`91009101    - `usage: object { input_tokens, output_tokens, total_tokens, 2 more }  or object { seconds, type }`91029103      Usage statistics for the transcription, this is billed according to the ASR model's pricing rather than the realtime model's pricing.91049105      - `Tokens object { input_tokens, output_tokens, total_tokens, 2 more }`91069107        Usage statistics for models billed by token usage.91089109        - `input_tokens: number`91109111          Number of input tokens billed for this request.91129113        - `output_tokens: number`91149115          Number of output tokens generated.91169117        - `total_tokens: number`91189119          Total number of tokens used (input + output).91209121        - `type: "tokens"`91229123          The type of the usage object. Always `tokens` for this variant.91249125          - `"tokens"`91269127        - `input_token_details: optional object { audio_tokens, text_tokens }`91289129          Details about the input tokens billed for this request.91309131          - `audio_tokens: optional number`91329133            Number of audio tokens billed for this request.91349135          - `text_tokens: optional number`91369137            Number of text tokens billed for this request.91389139      - `Duration object { seconds, type }`91409141        Usage statistics for models billed by audio input duration.91429143        - `seconds: number`91449145          Duration of the input audio in seconds.91469147        - `type: "duration"`91489149          The type of the usage object. Always `duration` for this variant.91509151          - `"duration"`91529153    - `languages: optional array of TranscriptionLanguage`91549155      The languages detected in the audio. Returned by `gpt-transcribe`. An empty array indicates that no language could be reliably detected.91569157      - `code: string`91589159        The code of a language detected in the audio.91609161    - `logprobs: optional array of LogProbProperties or null`91629163      The log probabilities of the transcription.91649165      - `token: string`91669167        The token that was used to generate the log probability.91689169      - `bytes: array of number`91709171        The bytes that were used to generate the log probability.91729173      - `logprob: number`91749175        The log probability of the token.91769177  - `ConversationItemInputAudioTranscriptionDeltaEvent object { event_id, item_id, type, 3 more }`91789179    Returned when the text value of an input audio transcription content part is updated with incremental transcription results.91809181    - `event_id: string`91829183      The unique ID of the server event.91849185    - `item_id: string`91869187      The ID of the item containing the audio that is being transcribed.91889189    - `type: "conversation.item.input_audio_transcription.delta"`91909191      The event type, must be `conversation.item.input_audio_transcription.delta`.91929193      - `"conversation.item.input_audio_transcription.delta"`91949195    - `content_index: optional number`91969197      The index of the content part in the item's content array.91989199    - `delta: optional string`92009201      The text delta.92029203    - `logprobs: optional array of LogProbProperties or null`92049205      The log probabilities of the transcription. These can be enabled by configurating the session with `"include": ["item.input_audio_transcription.logprobs"]`. Each entry in the array corresponds a log probability of which token would be selected for this chunk of transcription. This can help to identify if it was possible there were multiple valid options for a given chunk of transcription.92069207      - `token: string`92089209        The token that was used to generate the log probability.92109211      - `bytes: array of number`92129213        The bytes that were used to generate the log probability.92149215      - `logprob: number`92169217        The log probability of the token.92189219  - `ConversationItemInputAudioTranscriptionFailedEvent object { content_index, error, event_id, 2 more }`92209221    Returned when input audio transcription is configured, and a transcription9222    request for a user message failed. These events are separate from other9223    `error` events so that the client can identify the related Item.92249225    - `content_index: number`92269227      The index of the content part containing the audio.92289229    - `error: object { code, message, param, type }`92309231      Details of the transcription error.92329233      - `code: optional string`92349235        Error code, if any.92369237      - `message: optional string`92389239        A human-readable error message.92409241      - `param: optional string`92429243        Parameter related to the error, if any.92449245      - `type: optional string`92469247        The type of error.92489249    - `event_id: string`92509251      The unique ID of the server event.92529253    - `item_id: string`92549255      The ID of the user message item.92569257    - `type: "conversation.item.input_audio_transcription.failed"`92589259      The event type, must be9260      `conversation.item.input_audio_transcription.failed`.92619262      - `"conversation.item.input_audio_transcription.failed"`92639264  - `ConversationItemRetrieved object { event_id, item, type }`92659266    Returned when a conversation item is retrieved with `conversation.item.retrieve`. This is provided as a way to fetch the server's representation of an item, for example to get access to the post-processed audio data after noise cancellation and VAD. It includes the full content of the Item, including audio data.92679268    - `event_id: string`92699270      The unique ID of the server event.92719272    - `item: ConversationItem`92739274      A single item within a Realtime conversation.92759276    - `type: "conversation.item.retrieved"`92779278      The event type, must be `conversation.item.retrieved`.92799280      - `"conversation.item.retrieved"`92819282  - `ConversationItemTruncatedEvent object { audio_end_ms, content_index, event_id, 2 more }`92839284    Returned when an earlier assistant audio message item is truncated by the9285    client with a `conversation.item.truncate` event. This event is used to9286    synchronize the server's understanding of the audio with the client's playback.92879288    This action will truncate the audio and remove the server-side text transcript9289    to ensure there is no text in the context that hasn't been heard by the user.92909291    - `audio_end_ms: number`92929293      The duration up to which the audio was truncated, in milliseconds.92949295    - `content_index: number`92969297      The index of the content part that was truncated.92989299    - `event_id: string`93009301      The unique ID of the server event.93029303    - `item_id: string`93049305      The ID of the assistant message item that was truncated.93069307    - `type: "conversation.item.truncated"`93089309      The event type, must be `conversation.item.truncated`.93109311      - `"conversation.item.truncated"`93129313  - `RealtimeErrorEvent object { error, event_id, type }`93149315    Returned when an error occurs, which could be a client problem or a server9316    problem. Most errors are recoverable and the session will stay open, we9317    recommend to implementors to monitor and log error messages by default.93189319    - `error: RealtimeError`93209321      Details of the error.93229323      - `message: string`93249325        A human-readable error message.93269327      - `type: string`93289329        The type of error (e.g., "invalid_request_error", "server_error").93309331      - `code: optional string or null`93329333        Error code, if any.93349335      - `event_id: optional string or null`93369337        The event_id of the client event that caused the error, if applicable.93389339      - `param: optional string or null`93409341        Parameter related to the error, if any.93429343    - `event_id: string`93449345      The unique ID of the server event.93469347    - `type: "error"`93489349      The event type, must be `error`.93509351      - `"error"`93529353  - `InputAudioBufferClearedEvent object { event_id, type }`93549355    Returned when the input audio buffer is cleared by the client with a9356    `input_audio_buffer.clear` event.93579358    - `event_id: string`93599360      The unique ID of the server event.93619362    - `type: "input_audio_buffer.cleared"`93639364      The event type, must be `input_audio_buffer.cleared`.93659366      - `"input_audio_buffer.cleared"`93679368  - `InputAudioBufferCommittedEvent object { event_id, item_id, type, previous_item_id }`93699370    Returned when an input audio buffer is committed, either by the client or9371    automatically in server VAD mode. The `item_id` property is the ID of the user9372    message item that will be created, thus a `conversation.item.created` event9373    will also be sent to the client.93749375    - `event_id: string`93769377      The unique ID of the server event.93789379    - `item_id: string`93809381      The ID of the user message item that will be created.93829383    - `type: "input_audio_buffer.committed"`93849385      The event type, must be `input_audio_buffer.committed`.93869387      - `"input_audio_buffer.committed"`93889389    - `previous_item_id: optional string or null`93909391      The ID of the preceding item after which the new item will be inserted.9392      Can be `null` if the item has no predecessor.93939394  - `InputAudioBufferDtmfEventReceivedEvent object { event, received_at, type }`93959396    **SIP Only:** Returned when an DTMF event is received. A DTMF event is a message that9397    represents a telephone keypad press (0–9, *, #, A–D). The `event` property9398    is the keypad that the user press. The `received_at` is the UTC Unix Timestamp9399    that the server received the event.94009401    - `event: string`94029403      The telephone keypad that was pressed by the user.94049405    - `received_at: number`94069407      UTC Unix Timestamp when DTMF Event was received by server.94089409    - `type: "input_audio_buffer.dtmf_event_received"`94109411      The event type, must be `input_audio_buffer.dtmf_event_received`.94129413      - `"input_audio_buffer.dtmf_event_received"`94149415  - `InputAudioBufferSpeechStartedEvent object { audio_start_ms, event_id, item_id, type }`94169417    Sent by the server when in `server_vad` mode to indicate that speech has been9418    detected in the audio buffer. This can happen any time audio is added to the9419    buffer (unless speech is already detected). The client may want to use this9420    event to interrupt audio playback or provide visual feedback to the user.94219422    The client should expect to receive a `input_audio_buffer.speech_stopped` event9423    when speech stops. The `item_id` property is the ID of the user message item9424    that will be created when speech stops and will also be included in the9425    `input_audio_buffer.speech_stopped` event (unless the client manually commits9426    the audio buffer during VAD activation).94279428    - `audio_start_ms: number`94299430      Milliseconds from the start of all audio written to the buffer during the9431      session when speech was first detected. This will correspond to the9432      beginning of audio sent to the model, and thus includes the9433      `prefix_padding_ms` configured in the Session.94349435    - `event_id: string`94369437      The unique ID of the server event.94389439    - `item_id: string`94409441      The ID of the user message item that will be created when speech stops.94429443    - `type: "input_audio_buffer.speech_started"`94449445      The event type, must be `input_audio_buffer.speech_started`.94469447      - `"input_audio_buffer.speech_started"`94489449  - `InputAudioBufferSpeechStoppedEvent object { audio_end_ms, event_id, item_id, type }`94509451    Returned in `server_vad` mode when the server detects the end of speech in9452    the audio buffer. The server will also send an `conversation.item.created`9453    event with the user message item that is created from the audio buffer.94549455    - `audio_end_ms: number`94569457      Milliseconds since the session started when speech stopped. This will9458      correspond to the end of audio sent to the model, and thus includes the9459      `min_silence_duration_ms` configured in the Session.94609461    - `event_id: string`94629463      The unique ID of the server event.94649465    - `item_id: string`94669467      The ID of the user message item that will be created.94689469    - `type: "input_audio_buffer.speech_stopped"`94709471      The event type, must be `input_audio_buffer.speech_stopped`.94729473      - `"input_audio_buffer.speech_stopped"`94749475  - `RateLimitsUpdatedEvent object { event_id, rate_limits, type }`94769477    Emitted at the beginning of a Response to indicate the updated rate limits.9478    When a Response is created some tokens will be "reserved" for the output9479    tokens, the rate limits shown here reflect that reservation, which is then9480    adjusted accordingly once the Response is completed.94819482    - `event_id: string`94839484      The unique ID of the server event.94859486    - `rate_limits: array of object { limit, name, remaining, reset_seconds }`94879488      List of rate limit information.94899490      - `limit: optional number`94919492        The maximum allowed value for the rate limit.94939494      - `name: optional "requests" or "tokens"`94959496        The name of the rate limit (`requests`, `tokens`).94979498        - `"requests"`94999500        - `"tokens"`95019502      - `remaining: optional number`95039504        The remaining value before the limit is reached.95059506      - `reset_seconds: optional number`95079508        Seconds until the rate limit resets.95099510    - `type: "rate_limits.updated"`95119512      The event type, must be `rate_limits.updated`.95139514      - `"rate_limits.updated"`95159516  - `ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more }`95179518    Returned when the model-generated audio is updated.95199520    - `content_index: number`95219522      The index of the content part in the item's content array.95239524    - `delta: string`95259526      Base64-encoded audio data delta.95279528    - `event_id: string`95299530      The unique ID of the server event.95319532    - `item_id: string`95339534      The ID of the item.95359536    - `output_index: number`95379538      The index of the output item in the response.95399540    - `response_id: string`95419542      The ID of the response.95439544    - `type: "response.output_audio.delta"`95459546      The event type, must be `response.output_audio.delta`.95479548      - `"response.output_audio.delta"`95499550  - `ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more }`95519552    Returned when the model-generated audio is done. Also emitted when a Response9553    is interrupted, incomplete, or cancelled.95549555    - `content_index: number`95569557      The index of the content part in the item's content array.95589559    - `event_id: string`95609561      The unique ID of the server event.95629563    - `item_id: string`95649565      The ID of the item.95669567    - `output_index: number`95689569      The index of the output item in the response.95709571    - `response_id: string`95729573      The ID of the response.95749575    - `type: "response.output_audio.done"`95769577      The event type, must be `response.output_audio.done`.95789579      - `"response.output_audio.done"`95809581  - `ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more }`95829583    Returned when the model-generated transcription of audio output is updated.95849585    - `content_index: number`95869587      The index of the content part in the item's content array.95889589    - `delta: string`95909591      The transcript delta.95929593    - `event_id: string`95949595      The unique ID of the server event.95969597    - `item_id: string`95989599      The ID of the item.96009601    - `output_index: number`96029603      The index of the output item in the response.96049605    - `response_id: string`96069607      The ID of the response.96089609    - `type: "response.output_audio_transcript.delta"`96109611      The event type, must be `response.output_audio_transcript.delta`.96129613      - `"response.output_audio_transcript.delta"`96149615  - `ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more }`96169617    Returned when the model-generated transcription of audio output is done9618    streaming. Also emitted when a Response is interrupted, incomplete, or9619    cancelled.96209621    - `content_index: number`96229623      The index of the content part in the item's content array.96249625    - `event_id: string`96269627      The unique ID of the server event.96289629    - `item_id: string`96309631      The ID of the item.96329633    - `output_index: number`96349635      The index of the output item in the response.96369637    - `response_id: string`96389639      The ID of the response.96409641    - `transcript: string`96429643      The final transcript of the audio.96449645    - `type: "response.output_audio_transcript.done"`96469647      The event type, must be `response.output_audio_transcript.done`.96489649      - `"response.output_audio_transcript.done"`96509651  - `ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more }`96529653    Returned when a new content part is added to an assistant message item during9654    response generation.96559656    - `content_index: number`96579658      The index of the content part in the item's content array.96599660    - `event_id: string`96619662      The unique ID of the server event.96639664    - `item_id: string`96659666      The ID of the item to which the content part was added.96679668    - `output_index: number`96699670      The index of the output item in the response.96719672    - `part: object { audio, text, transcript, type }`96739674      The content part that was added.96759676      - `audio: optional string`96779678        Base64-encoded audio data (if type is "audio").96799680      - `text: optional string`96819682        The text content (if type is "text").96839684      - `transcript: optional string`96859686        The transcript of the audio (if type is "audio").96879688      - `type: optional "audio" or "text"`96899690        The content type ("text", "audio").96919692        - `"audio"`96939694        - `"text"`96959696    - `response_id: string`96979698      The ID of the response.96999700    - `type: "response.content_part.added"`97019702      The event type, must be `response.content_part.added`.97039704      - `"response.content_part.added"`97059706  - `ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more }`97079708    Returned when a content part is done streaming in an assistant message item.9709    Also emitted when a Response is interrupted, incomplete, or cancelled.97109711    - `content_index: number`97129713      The index of the content part in the item's content array.97149715    - `event_id: string`97169717      The unique ID of the server event.97189719    - `item_id: string`97209721      The ID of the item.97229723    - `output_index: number`97249725      The index of the output item in the response.97269727    - `part: object { audio, text, transcript, type }`97289729      The content part that is done.97309731      - `audio: optional string`97329733        Base64-encoded audio data (if type is "audio").97349735      - `text: optional string`97369737        The text content (if type is "text").97389739      - `transcript: optional string`97409741        The transcript of the audio (if type is "audio").97429743      - `type: optional "audio" or "text"`97449745        The content type ("text", "audio").97469747        - `"audio"`97489749        - `"text"`97509751    - `response_id: string`97529753      The ID of the response.97549755    - `type: "response.content_part.done"`97569757      The event type, must be `response.content_part.done`.97589759      - `"response.content_part.done"`97609761  - `ResponseCreatedEvent object { event_id, response, type }`97629763    Returned when a new Response is created. The first event of response creation,9764    where the response is in an initial state of `in_progress`.97659766    - `event_id: string`97679768      The unique ID of the server event.97699770    - `response: RealtimeResponse`97719772      The response resource.97739774      - `id: optional string`97759776        The unique ID of the response, will look like `resp_1234`.97779778      - `audio: optional object { output }`97799780        Configuration for audio output.97819782        - `output: optional object { format, voice }`97839784          - `format: optional RealtimeAudioFormats`97859786            The format of the output audio.97879788            - `PCMAudio object { rate, type }`97899790              The PCM audio format. Only a 24kHz sample rate is supported.97919792              - `rate: optional 24000`97939794                The sample rate of the audio. Always `24000`.97959796                - `24000`97979798              - `type: optional "audio/pcm"`97999800                The audio format. Always `audio/pcm`.98019802                - `"audio/pcm"`98039804            - `PCMUAudio object { type }`98059806              The G.711 μ-law format.98079808              - `type: optional "audio/pcmu"`98099810                The audio format. Always `audio/pcmu`.98119812                - `"audio/pcmu"`98139814            - `PCMAAudio object { type }`98159816              The G.711 A-law format.98179818              - `type: optional "audio/pcma"`98199820                The audio format. Always `audio/pcma`.98219822                - `"audio/pcma"`98239824          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`98259826            The voice the model uses to respond. Voice cannot be changed during the9827            session once the model has responded with audio at least once. Current9828            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,9829            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for9830            best quality.98319832            - `string`98339834            - `"alloy" or "ash" or "ballad" or 7 more`98359836              The voice the model uses to respond. Voice cannot be changed during the9837              session once the model has responded with audio at least once. Current9838              voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,9839              `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for9840              best quality.98419842              - `"alloy"`98439844              - `"ash"`98459846              - `"ballad"`98479848              - `"coral"`98499850              - `"echo"`98519852              - `"sage"`98539854              - `"shimmer"`98559856              - `"verse"`98579858              - `"marin"`98599860              - `"cedar"`98619862      - `conversation_id: optional string`98639864        Which conversation the response is added to, determined by the `conversation`9865        field in the `response.create` event. If `auto`, the response will be added to9866        the default conversation and the value of `conversation_id` will be an id like9867        `conv_1234`. If `none`, the response will not be added to any conversation and9868        the value of `conversation_id` will be `null`. If responses are being triggered9869        automatically by VAD the response will be added to the default conversation98709871      - `max_output_tokens: optional number or "inf"`98729873        Maximum number of output tokens for a single assistant response,9874        inclusive of tool calls, that was used in this response.98759876        - `number`98779878        - `"inf"`98799880          - `"inf"`98819882      - `metadata: optional Metadata or null`98839884        Set of 16 key-value pairs that can be attached to an object. This can be9885        useful for storing additional information about the object in a structured9886        format, and querying for objects via API or the dashboard.98879888        Keys are strings with a maximum length of 64 characters. Values are strings9889        with a maximum length of 512 characters.98909891      - `object: optional "realtime.response"`98929893        The object type, must be `realtime.response`.98949895        - `"realtime.response"`98969897      - `output: optional array of ConversationItem`98989899        The list of output items generated by the response.99009901        - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`99029903          A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.99049905        - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`99069907          A user message item in a Realtime conversation.99089909        - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`99109911          An assistant message item in a Realtime conversation.99129913        - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`99149915          A function call item in a Realtime conversation.99169917        - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`99189919          A function call output item in a Realtime conversation.99209921        - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`99229923          A Realtime item responding to an MCP approval request.99249925        - `RealtimeMcpListTools object { server_label, tools, type, id }`99269927          A Realtime item listing tools available on an MCP server.99289929        - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`99309931          A Realtime item representing an invocation of a tool on an MCP server.99329933        - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`99349935          A Realtime item requesting human approval of a tool invocation.99369937      - `output_modalities: optional array of "text" or "audio"`99389939        The set of modalities the model used to respond, currently the only possible values are9940        `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the9941        output to mode `text` will disable audio output from the model.99429943        - `"text"`99449945        - `"audio"`99469947      - `status: optional "completed" or "cancelled" or "failed" or 2 more`99489949        The final status of the response (`completed`, `cancelled`, `failed`, or9950        `incomplete`, `in_progress`).99519952        - `"completed"`99539954        - `"cancelled"`99559956        - `"failed"`99579958        - `"incomplete"`99599960        - `"in_progress"`99619962      - `status_details: optional RealtimeResponseStatus`99639964        Additional details about the status.99659966        - `error: optional object { code, type }`99679968          A description of the error that caused the response to fail,9969          populated when the `status` is `failed`.99709971          - `code: optional string`99729973            Error code, if any.99749975          - `type: optional string`99769977            The type of error.99789979        - `reason: optional "turn_detected" or "client_cancelled" or "max_output_tokens" or "content_filter"`99809981          The reason the Response did not complete. For a `cancelled` Response,  one of `turn_detected` (the server VAD detected a new start of speech)  or `client_cancelled` (the client sent a cancel event). For an  `incomplete` Response, one of `max_output_tokens` or `content_filter`  (the server-side safety filter activated and cut off the response).99829983          - `"turn_detected"`99849985          - `"client_cancelled"`99869987          - `"max_output_tokens"`99889989          - `"content_filter"`99909991        - `type: optional "completed" or "cancelled" or "failed" or "incomplete"`99929993          The type of error that caused the response to fail, corresponding9994          with the `status` field (`completed`, `cancelled`, `incomplete`,9995          `failed`).99969997          - `"completed"`99989999          - `"cancelled"`1000010001          - `"failed"`1000210003          - `"incomplete"`1000410005      - `usage: optional RealtimeResponseUsage`1000610007        Usage statistics for the Response, this will correspond to billing. A10008        Realtime API session will maintain a conversation context and append new10009        Items to the Conversation, thus output from previous turns (text and10010        audio tokens) will become the input for later turns.1001110012        - `input_token_details: optional RealtimeResponseUsageInputTokenDetails`1001310014          Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.1001510016          - `audio_tokens: optional number`1001710018            The number of audio tokens used as input for the Response.1001910020          - `cached_tokens: optional number`1002110022            The number of cached tokens used as input for the Response.1002310024          - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`1002510026            Details about the cached tokens used as input for the Response.1002710028            - `audio_tokens: optional number`1002910030              The number of cached audio tokens used as input for the Response.1003110032            - `image_tokens: optional number`1003310034              The number of cached image tokens used as input for the Response.1003510036            - `text_tokens: optional number`1003710038              The number of cached text tokens used as input for the Response.1003910040          - `image_tokens: optional number`1004110042            The number of image tokens used as input for the Response.1004310044          - `text_tokens: optional number`1004510046            The number of text tokens used as input for the Response.1004710048        - `input_tokens: optional number`1004910050          The number of input tokens used in the Response, including text and10051          audio tokens.1005210053        - `output_token_details: optional RealtimeResponseUsageOutputTokenDetails`1005410055          Details about the output tokens used in the Response.1005610057          - `audio_tokens: optional number`1005810059            The number of audio tokens used in the Response.1006010061          - `text_tokens: optional number`1006210063            The number of text tokens used in the Response.1006410065        - `output_tokens: optional number`1006610067          The number of output tokens sent in the Response, including text and10068          audio tokens.1006910070        - `total_tokens: optional number`1007110072          The total number of tokens in the Response including input and output10073          text and audio tokens.1007410075    - `type: "response.created"`1007610077      The event type, must be `response.created`.1007810079      - `"response.created"`1008010081  - `ResponseDoneEvent object { event_id, response, type }`1008210083    Returned when a Response is done streaming. Always emitted, no matter the10084    final state. The Response object included in the `response.done` event will10085    include all output Items in the Response but will omit the raw audio data.1008610087    Clients should check the `status` field of the Response to determine if it was successful10088    (`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`.1008910090    A response will contain all output items that were generated during the response, excluding10091    any audio content.1009210093    - `event_id: string`1009410095      The unique ID of the server event.1009610097    - `response: RealtimeResponse`1009810099      The response resource.1010010101    - `type: "response.done"`1010210103      The event type, must be `response.done`.1010410105      - `"response.done"`1010610107  - `ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more }`1010810109    Returned when the model-generated function call arguments are updated.1011010111    - `call_id: string`1011210113      The ID of the function call.1011410115    - `delta: string`1011610117      The arguments delta as a JSON string.1011810119    - `event_id: string`1012010121      The unique ID of the server event.1012210123    - `item_id: string`1012410125      The ID of the function call item.1012610127    - `output_index: number`1012810129      The index of the output item in the response.1013010131    - `response_id: string`1013210133      The ID of the response.1013410135    - `type: "response.function_call_arguments.delta"`1013610137      The event type, must be `response.function_call_arguments.delta`.1013810139      - `"response.function_call_arguments.delta"`1014010141  - `ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more }`1014210143    Returned when the model-generated function call arguments are done streaming.10144    Also emitted when a Response is interrupted, incomplete, or cancelled.1014510146    - `arguments: string`1014710148      The final arguments as a JSON string.1014910150    - `call_id: string`1015110152      The ID of the function call.1015310154    - `event_id: string`1015510156      The unique ID of the server event.1015710158    - `item_id: string`1015910160      The ID of the function call item.1016110162    - `name: string`1016310164      The name of the function that was called.1016510166    - `output_index: number`1016710168      The index of the output item in the response.1016910170    - `response_id: string`1017110172      The ID of the response.1017310174    - `type: "response.function_call_arguments.done"`1017510176      The event type, must be `response.function_call_arguments.done`.1017710178      - `"response.function_call_arguments.done"`1017910180  - `ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more }`1018110182    Returned when a new Item is created during Response generation.1018310184    - `event_id: string`1018510186      The unique ID of the server event.1018710188    - `item: ConversationItem`1018910190      A single item within a Realtime conversation.1019110192    - `output_index: number`1019310194      The index of the output item in the Response.1019510196    - `response_id: string`1019710198      The ID of the Response to which the item belongs.1019910200    - `type: "response.output_item.added"`1020110202      The event type, must be `response.output_item.added`.1020310204      - `"response.output_item.added"`1020510206  - `ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more }`1020710208    Returned when an Item is done streaming. Also emitted when a Response is10209    interrupted, incomplete, or cancelled.1021010211    - `event_id: string`1021210213      The unique ID of the server event.1021410215    - `item: ConversationItem`1021610217      A single item within a Realtime conversation.1021810219    - `output_index: number`1022010221      The index of the output item in the Response.1022210223    - `response_id: string`1022410225      The ID of the Response to which the item belongs.1022610227    - `type: "response.output_item.done"`1022810229      The event type, must be `response.output_item.done`.1023010231      - `"response.output_item.done"`1023210233  - `ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more }`1023410235    Returned when the text value of an "output_text" content part is updated.1023610237    - `content_index: number`1023810239      The index of the content part in the item's content array.1024010241    - `delta: string`1024210243      The text delta.1024410245    - `event_id: string`1024610247      The unique ID of the server event.1024810249    - `item_id: string`1025010251      The ID of the item.1025210253    - `output_index: number`1025410255      The index of the output item in the response.1025610257    - `response_id: string`1025810259      The ID of the response.1026010261    - `type: "response.output_text.delta"`1026210263      The event type, must be `response.output_text.delta`.1026410265      - `"response.output_text.delta"`1026610267  - `ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more }`1026810269    Returned when the text value of an "output_text" content part is done streaming. Also10270    emitted when a Response is interrupted, incomplete, or cancelled.1027110272    - `content_index: number`1027310274      The index of the content part in the item's content array.1027510276    - `event_id: string`1027710278      The unique ID of the server event.1027910280    - `item_id: string`1028110282      The ID of the item.1028310284    - `output_index: number`1028510286      The index of the output item in the response.1028710288    - `response_id: string`1028910290      The ID of the response.1029110292    - `text: string`1029310294      The final text content.1029510296    - `type: "response.output_text.done"`1029710298      The event type, must be `response.output_text.done`.1029910300      - `"response.output_text.done"`1030110302  - `SessionCreatedEvent object { event_id, session, type }`1030310304    Returned when a Session is created. Emitted automatically when a new10305    connection is established as the first server event. This event will contain10306    the default Session configuration.1030710308    - `event_id: string`1030910310      The unique ID of the server event.1031110312    - `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`1031310314      The session configuration.1031510316      - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`1031710318        A Realtime session configuration object.1031910320        - `id: string`1032110322          Unique identifier for the session that looks like `sess_1234567890abcdef`.1032310324        - `object: "realtime.session"`1032510326          The object type. Always `realtime.session`.1032710328          - `"realtime.session"`1032910330        - `type: "realtime"`1033110332          The type of session to create. Always `realtime` for the Realtime API.1033310334          - `"realtime"`1033510336        - `audio: optional object { input, output }`1033710338          Configuration for input and output audio.1033910340          - `input: optional object { format, noise_reduction, transcription, turn_detection }`1034110342            - `format: optional RealtimeAudioFormats`1034310344              The format of the input audio.1034510346            - `noise_reduction: optional object { type }`1034710348              Configuration for input audio noise reduction. This can be set to `null` to turn off.10349              Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.10350              Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1035110352              - `type: optional NoiseReductionType`1035310354                Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1035510356                - `"near_field"`1035710358                - `"far_field"`1035910360            - `transcription: optional object { language, languages, model, prompt }`1036110362              Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1036310364              - `language: optional string`1036510366                The language of the input audio.1036710368              - `languages: optional array of string`1036910370                The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.1037110372              - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1037310374                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1037510376                - `string`1037710378                - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1037910380                  The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1038110382                  - `"whisper-1"`1038310384                  - `"gpt-transcribe"`1038510386                  - `"gpt-live-transcribe"`1038710388                  - `"gpt-4o-mini-transcribe"`1038910390                  - `"gpt-4o-mini-transcribe-2025-12-15"`1039110392                  - `"gpt-4o-transcribe"`1039310394                  - `"gpt-4o-transcribe-diarize"`1039510396                  - `"gpt-realtime-whisper"`1039710398              - `prompt: optional string`1039910400                The prompt configured for input audio transcription, when present.1040110402            - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`1040310404              Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1040510406              Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1040710408              Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1040910410              For `gpt-realtime-whisper` transcription sessions, turn detection must be10411              set to `null`; VAD is not supported.1041210413              - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1041410415                Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1041610417                - `type: "server_vad"`1041810419                  Type of turn detection, `server_vad` to turn on simple Server VAD.1042010421                  - `"server_vad"`1042210423                - `create_response: optional boolean`1042410425                  Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1042610427                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1042810429                - `idle_timeout_ms: optional number or null`1043010431                  Optional timeout after which a model response will be triggered automatically. This is10432                  useful for situations in which a long pause from the user is unexpected, such as a phone10433                  call. The model will effectively prompt the user to continue the conversation based10434                  on the current context.1043510436                  The timeout value will be applied after the last model response's audio has finished playing,10437                  i.e. it's set to the `response.done` time plus audio playback duration.1043810439                  An `input_audio_buffer.timeout_triggered` event (plus events10440                  associated with the Response) will be emitted when the timeout is reached.10441                  Idle timeout is currently only supported for `server_vad` mode.1044210443                - `interrupt_response: optional boolean`1044410445                  Whether or not to automatically interrupt (cancel) any ongoing response with output to the default10446                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1044710448                  If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1044910450                - `prefix_padding_ms: optional number`1045110452                  Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in10453                  milliseconds). Defaults to 300ms.1045410455                - `silence_duration_ms: optional number`1045610457                  Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults10458                  to 500ms. With shorter values the model will respond more quickly,10459                  but may jump in on short pauses from the user.1046010461                - `threshold: optional number`1046210463                  Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A10464                  higher threshold will require louder audio to activate the model, and10465                  thus might perform better in noisy environments.1046610467              - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1046810469                Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1047010471                - `type: "semantic_vad"`1047210473                  Type of turn detection, `semantic_vad` to turn on Semantic VAD.1047410475                  - `"semantic_vad"`1047610477                - `create_response: optional boolean`1047810479                  Whether or not to automatically generate a response when a VAD stop event occurs.1048010481                - `eagerness: optional "low" or "medium" or "high" or "auto"`1048210483                  Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1048410485                  - `"low"`1048610487                  - `"medium"`1048810489                  - `"high"`1049010491                  - `"auto"`1049210493                - `interrupt_response: optional boolean`1049410495                  Whether or not to automatically interrupt any ongoing response with output to the default10496                  conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1049710498          - `output: optional object { format, speed, voice }`1049910500            - `format: optional RealtimeAudioFormats`1050110502              The format of the output audio.1050310504            - `speed: optional number`1050510506              The speed of the model's spoken response as a multiple of the original speed.10507              1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.1050810509              This parameter is a post-processing adjustment to the audio after it is generated, it's10510              also possible to prompt the model to speak faster or slower.1051110512            - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`1051310514              The voice the model uses to respond. Voice cannot be changed during the10515              session once the model has responded with audio at least once. Current10516              voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,10517              `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for10518              best quality.1051910520              - `string`1052110522              - `"alloy" or "ash" or "ballad" or 7 more`1052310524                The voice the model uses to respond. Voice cannot be changed during the10525                session once the model has responded with audio at least once. Current10526                voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,10527                `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for10528                best quality.1052910530                - `"alloy"`1053110532                - `"ash"`1053310534                - `"ballad"`1053510536                - `"coral"`1053710538                - `"echo"`1053910540                - `"sage"`1054110542                - `"shimmer"`1054310544                - `"verse"`1054510546                - `"marin"`1054710548                - `"cedar"`1054910550        - `expires_at: optional number`1055110552          Expiration timestamp for the session, in seconds since epoch.1055310554        - `include: optional array of "item.input_audio_transcription.logprobs"`1055510556          Additional fields to include in server outputs.1055710558          `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1055910560          - `"item.input_audio_transcription.logprobs"`1056110562        - `instructions: optional string`1056310564          The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.1056510566          Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.1056710568        - `max_output_tokens: optional number or "inf"`1056910570          Maximum number of output tokens for a single assistant response,10571          inclusive of tool calls. Provide an integer between 1 and 4096 to10572          limit output tokens, or `inf` for the maximum available tokens for a10573          given model. Defaults to `inf`.1057410575          - `number`1057610577          - `"inf"`1057810579            - `"inf"`1058010581        - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1058210583          The Realtime model used for this session.1058410585          - `string`1058610587          - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1058810589            The Realtime model used for this session.1059010591            - `"gpt-realtime"`1059210593            - `"gpt-realtime-1.5"`1059410595            - `"gpt-realtime-2"`1059610597            - `"gpt-realtime-2.1"`1059810599            - `"gpt-realtime-2.1-mini"`1060010601            - `"gpt-realtime-2025-08-28"`1060210603            - `"gpt-4o-realtime-preview"`1060410605            - `"gpt-4o-realtime-preview-2024-10-01"`1060610607            - `"gpt-4o-realtime-preview-2024-12-17"`1060810609            - `"gpt-4o-realtime-preview-2025-06-03"`1061010611            - `"gpt-4o-mini-realtime-preview"`1061210613            - `"gpt-4o-mini-realtime-preview-2024-12-17"`1061410615            - `"gpt-realtime-mini"`1061610617            - `"gpt-realtime-mini-2025-10-06"`1061810619            - `"gpt-realtime-mini-2025-12-15"`1062010621            - `"gpt-audio-1.5"`1062210623            - `"gpt-audio-mini"`1062410625            - `"gpt-audio-mini-2025-10-06"`1062610627            - `"gpt-audio-mini-2025-12-15"`1062810629        - `output_modalities: optional array of "text" or "audio"`1063010631          The set of modalities the model can respond with. It defaults to `["audio"]`, indicating10632          that the model will respond with audio plus a transcript. `["text"]` can be used to make10633          the model respond with text only. It is not possible to request both `text` and `audio` at the same time.1063410635          - `"text"`1063610637          - `"audio"`1063810639        - `prompt: optional ResponsePrompt or null`1064010641          Reference to a prompt template and its variables.10642          [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1064310644          - `id: string`1064510646            The unique identifier of the prompt template to use.1064710648          - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1064910650            Optional map of values to substitute in for variables in your10651            prompt. The substitution values can either be strings, or other10652            Response input types like images or files.1065310654            - `string`1065510656            - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1065710658              A text input to the model.1065910660              - `text: string`1066110662                The text input to the model.1066310664              - `type: "input_text"`1066510666                The type of the input item. Always `input_text`.1066710668                - `"input_text"`1066910670              - `prompt_cache_breakpoint: optional object { mode }`1067110672                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.1067310674                - `mode: "explicit"`1067510676                  The breakpoint mode. Always `explicit`.1067710678                  - `"explicit"`1067910680            - `ResponseInputImage object { detail, type, file_id, 2 more }`1068110682              An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1068310684              - `detail: ImageDetail`1068510686                The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.1068710688                - `"low"`1068910690                - `"high"`1069110692                - `"auto"`1069310694                - `"original"`1069510696              - `type: "input_image"`1069710698                The type of the input item. Always `input_image`.1069910700                - `"input_image"`1070110702              - `file_id: optional string or null`1070310704                The ID of the file to be sent to the model.1070510706              - `image_url: optional string or null`1070710708                The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1070910710              - `prompt_cache_breakpoint: optional object { mode }`1071110712                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.1071310714                - `mode: "explicit"`1071510716                  The breakpoint mode. Always `explicit`.1071710718                  - `"explicit"`1071910720            - `ResponseInputFile object { type, detail, file_data, 4 more }`1072110722              A file input to the model.1072310724              - `type: "input_file"`1072510726                The type of the input item. Always `input_file`.1072710728                - `"input_file"`1072910730              - `detail: optional "auto" or "low" or "high"`1073110732                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`.1073310734                - `"auto"`1073510736                - `"low"`1073710738                - `"high"`1073910740              - `file_data: optional string`1074110742                The content of the file to be sent to the model.1074310744              - `file_id: optional string or null`1074510746                The ID of the file to be sent to the model.1074710748              - `file_url: optional string`1074910750                The URL of the file to be sent to the model.1075110752              - `filename: optional string`1075310754                The name of the file to be sent to the model.1075510756              - `prompt_cache_breakpoint: optional object { mode }`1075710758                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.1075910760                - `mode: "explicit"`1076110762                  The breakpoint mode. Always `explicit`.1076310764                  - `"explicit"`1076510766          - `version: optional string or null`1076710768            Optional version of the prompt template.1076910770        - `reasoning: optional RealtimeReasoning`1077110772          Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.1077310774          - `effort: optional RealtimeReasoningEffort`1077510776            Constrains effort on reasoning for reasoning-capable Realtime models such as10777            `gpt-realtime-2`.1077810779            - `"minimal"`1078010781            - `"low"`1078210783            - `"medium"`1078410785            - `"high"`1078610787            - `"xhigh"`1078810789        - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`1079010791          How the model chooses tools. Provide one of the string modes or force a specific10792          function/MCP tool.1079310794          - `ToolChoiceOptions = "none" or "auto" or "required"`1079510796            Controls which (if any) tool is called by the model.1079710798            `none` means the model will not call any tool and instead generates a message.1079910800            `auto` means the model can pick between generating a message or calling one or10801            more tools.1080210803            `required` means the model must call one or more tools.1080410805            - `"none"`1080610807            - `"auto"`1080810809            - `"required"`1081010811          - `ToolChoiceFunction object { name, type }`1081210813            Use this option to force the model to call a specific function.1081410815            - `name: string`1081610817              The name of the function to call.1081810819            - `type: "function"`1082010821              For function calling, the type is always `function`.1082210823              - `"function"`1082410825          - `ToolChoiceMcp object { server_label, type, name }`1082610827            Use this option to force the model to call a specific tool on a remote MCP server.1082810829            - `server_label: string`1083010831              The label of the MCP server to use.1083210833            - `type: "mcp"`1083410835              For MCP tools, the type is always `mcp`.1083610837              - `"mcp"`1083810839            - `name: optional string or null`1084010841              The name of the tool to call on the server.1084210843        - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`1084410845          Tools available to the model.1084610847          - `RealtimeFunctionTool object { description, name, parameters, type }`1084810849            - `description: optional string`1085010851              The description of the function, including guidance on when and how10852              to call it, and guidance about what to tell the user when calling10853              (if anything).1085410855            - `name: optional string`1085610857              The name of the function.1085810859            - `parameters: optional unknown`1086010861              Parameters of the function in JSON Schema.1086210863            - `type: optional "function"`1086410865              The type of the tool, i.e. `function`.1086610867              - `"function"`1086810869          - `McpTool object { server_label, type, allowed_callers, 9 more }`1087010871            Give the model access to additional tools via remote Model Context Protocol10872            (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1087310874            - `server_label: string`1087510876              A label for this MCP server, used to identify it in tool calls.1087710878            - `type: "mcp"`1087910880              The type of the MCP tool. Always `mcp`.1088110882              - `"mcp"`1088310884            - `allowed_callers: optional array of "direct" or "programmatic" or null`1088510886              The tool invocation context(s).1088710888              - `"direct"`1088910890              - `"programmatic"`1089110892            - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1089310894              List of allowed tool names or a filter object.1089510896              - `McpAllowedTools = array of string`1089710898                A string array of allowed tool names1089910900              - `McpToolFilter object { read_only, tool_names }`1090110902                A filter object to specify which tools are allowed.1090310904                - `read_only: optional boolean`1090510906                  Indicates whether or not a tool modifies data or is read-only. If an10907                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),10908                  it will match this filter.1090910910                - `tool_names: optional array of string`1091110912                  List of allowed tool names.1091310914            - `authorization: optional string`1091510916              An OAuth access token that can be used with a remote MCP server, either10917              with a custom MCP server URL or a service connector. Your application10918              must handle the OAuth authorization flow and provide the token here.1091910920            - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1092110922              Identifier for service connectors, like those available in ChatGPT. One of10923              `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more10924              about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1092510926              This field is deprecated for models released after September 1, 2026.10927              Use `server_url` to connect to a remote MCP server, or `tunnel_id` to10928              connect through a Secure MCP Tunnel.1092910930              Currently supported `connector_id` values are:1093110932              - Dropbox: `connector_dropbox`10933              - Gmail: `connector_gmail`10934              - Google Calendar: `connector_googlecalendar`10935              - Google Drive: `connector_googledrive`10936              - Microsoft Teams: `connector_microsoftteams`10937              - Outlook Calendar: `connector_outlookcalendar`10938              - Outlook Email: `connector_outlookemail`10939              - SharePoint: `connector_sharepoint`1094010941              - `"connector_dropbox"`1094210943              - `"connector_gmail"`1094410945              - `"connector_googlecalendar"`1094610947              - `"connector_googledrive"`1094810949              - `"connector_microsoftteams"`1095010951              - `"connector_outlookcalendar"`1095210953              - `"connector_outlookemail"`1095410955              - `"connector_sharepoint"`1095610957            - `defer_loading: optional boolean`1095810959              Whether this MCP tool is deferred and discovered via tool search.1096010961            - `headers: optional map[string] or null`1096210963              Optional HTTP headers to send to the MCP server. Use for authentication10964              or other purposes.1096510966            - `require_approval: optional object { always, never }  or "always" or "never" or null`1096710968              Specify which of the MCP server's tools require approval.1096910970              - `McpToolApprovalFilter object { always, never }`1097110972                Specify which of the MCP server's tools require approval. Can be10973                `always`, `never`, or a filter object associated with tools10974                that require approval.1097510976                - `always: optional object { read_only, tool_names }`1097710978                  A filter object to specify which tools are allowed.1097910980                  - `read_only: optional boolean`1098110982                    Indicates whether or not a tool modifies data or is read-only. If an10983                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),10984                    it will match this filter.1098510986                  - `tool_names: optional array of string`1098710988                    List of allowed tool names.1098910990                - `never: optional object { read_only, tool_names }`1099110992                  A filter object to specify which tools are allowed.1099310994                  - `read_only: optional boolean`1099510996                    Indicates whether or not a tool modifies data or is read-only. If an10997                    MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),10998                    it will match this filter.1099911000                  - `tool_names: optional array of string`1100111002                    List of allowed tool names.1100311004              - `McpToolApprovalSetting = "always" or "never"`1100511006                Specify a single approval policy for all tools. One of `always` or11007                `never`. When set to `always`, all tools will require approval. When11008                set to `never`, all tools will not require approval.1100911010                - `"always"`1101111012                - `"never"`1101311014            - `server_description: optional string`1101511016              Optional description of the MCP server, used to provide more context.1101711018            - `server_url: optional string`1101911020              The URL for the MCP server. One of `server_url`, `connector_id`, or11021              `tunnel_id` must be provided.1102211023            - `tunnel_id: optional string`1102411025              The Secure MCP Tunnel ID to use instead of a direct server URL. One of11026              `server_url`, `connector_id`, or `tunnel_id` must be provided.1102711028        - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`1102911030          Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once11031          tracing is enabled for a session, the configuration cannot be modified.1103211033          `auto` will create a trace for the session with default values for the11034          workflow name, group id, and metadata.1103511036          - `Auto = "auto"`1103711038            Enables tracing and sets default values for tracing configuration options. Always `auto`.1103911040            - `"auto"`1104111042          - `TracingConfiguration object { group_id, metadata, workflow_name }`1104311044            Granular configuration for tracing.1104511046            - `group_id: optional string`1104711048              The group id to attach to this trace to enable filtering and11049              grouping in the Traces Dashboard.1105011051            - `metadata: optional unknown`1105211053              The arbitrary metadata to attach to this trace to enable11054              filtering in the Traces Dashboard.1105511056            - `workflow_name: optional string`1105711058              The name of the workflow to attach to this trace. This is used to11059              name the trace in the Traces Dashboard.1106011061        - `truncation: optional RealtimeTruncation`1106211063          When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.1106411065          Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.1106611067          Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.1106811069          Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.1107011071          - `"auto" or "disabled"`1107211073            The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.1107411075            - `"auto"`1107611077            - `"disabled"`1107811079          - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`1108011081            Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.1108211083            - `retention_ratio: number`1108411085              Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.1108611087            - `type: "retention_ratio"`1108811089              Use retention ratio truncation.1109011091              - `"retention_ratio"`1109211093            - `token_limits: optional object { post_instructions }`1109411095              Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.1109611097              - `post_instructions: optional number`1109811099                Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.1110011101      - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`1110211103        A Realtime transcription session configuration object.1110411105        - `id: string`1110611107          Unique identifier for the session that looks like `sess_1234567890abcdef`.1110811109        - `object: string`1111011111          The object type. Always `realtime.transcription_session`.1111211113        - `type: "transcription"`1111411115          The type of session. Always `transcription` for transcription sessions.1111611117          - `"transcription"`1111811119        - `audio: optional object { input }`1112011121          Configuration for input audio for the session.1112211123          - `input: optional object { format, noise_reduction, transcription, turn_detection }`1112411125            - `format: optional RealtimeAudioFormats`1112611127              The PCM audio format. Only a 24kHz sample rate is supported.1112811129            - `noise_reduction: optional object { type }`1113011131              Configuration for input audio noise reduction.1113211133              - `type: optional NoiseReductionType`1113411135                Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1113611137            - `transcription: optional object { language, languages, model, prompt }`1113811139              Configuration of the transcription model.1114011141              - `language: optional string`1114211143                The language of the input audio.1114411145              - `languages: optional array of string`1114611147                The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.1114811149              - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1115011151                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1115211153                - `string`1115411155                - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1115611157                  The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1115811159                  - `"whisper-1"`1116011161                  - `"gpt-transcribe"`1116211163                  - `"gpt-live-transcribe"`1116411165                  - `"gpt-4o-mini-transcribe"`1116611167                  - `"gpt-4o-mini-transcribe-2025-12-15"`1116811169                  - `"gpt-4o-transcribe"`1117011171                  - `"gpt-4o-transcribe-diarize"`1117211173                  - `"gpt-realtime-whisper"`1117411175              - `prompt: optional string`1117611177                The prompt configured for input audio transcription, when present.1117811179            - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`1118011181              Configuration for turn detection. Can be set to `null` to turn off. Server11182              VAD means that the model will detect the start and end of speech based on11183              audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.1118411185              - `prefix_padding_ms: optional number`1118611187                Amount of audio to include before the VAD detected speech (in11188                milliseconds). Defaults to 300ms.1118911190              - `silence_duration_ms: optional number`1119111192                Duration of silence to detect speech stop (in milliseconds). Defaults11193                to 500ms. With shorter values the model will respond more quickly,11194                but may jump in on short pauses from the user.1119511196              - `threshold: optional number`1119711198                Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A11199                higher threshold will require louder audio to activate the model, and11200                thus might perform better in noisy environments.1120111202              - `type: optional string`1120311204                Type of turn detection, only `server_vad` is currently supported.1120511206        - `expires_at: optional number`1120711208          Expiration timestamp for the session, in seconds since epoch.1120911210        - `include: optional array of "item.input_audio_transcription.logprobs"`1121111212          Additional fields to include in server outputs.1121311214          - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1121511216          - `"item.input_audio_transcription.logprobs"`1121711218    - `type: "session.created"`1121911220      The event type, must be `session.created`.1122111222      - `"session.created"`1122311224  - `SessionUpdatedEvent object { event_id, session, type }`1122511226    Returned when a session is updated with a `session.update` event, unless11227    there is an error.1122811229    - `event_id: string`1123011231      The unique ID of the server event.1123211233    - `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`1123411235      The session configuration.1123611237      - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`1123811239        A Realtime session configuration object.1124011241      - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`1124211243        A Realtime transcription session configuration object.1124411245    - `type: "session.updated"`1124611247      The event type, must be `session.updated`.1124811249      - `"session.updated"`1125011251  - `OutputAudioBufferStarted object { event_id, response_id, type }`1125211253    **WebRTC/SIP Only:** Emitted when the server begins streaming audio to the client. This event is11254    emitted after an audio content part has been added (`response.content_part.added`)11255    to the response.11256    [Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).1125711258    - `event_id: string`1125911260      The unique ID of the server event.1126111262    - `response_id: string`1126311264      The unique ID of the response that produced the audio.1126511266    - `type: "output_audio_buffer.started"`1126711268      The event type, must be `output_audio_buffer.started`.1126911270      - `"output_audio_buffer.started"`1127111272  - `OutputAudioBufferStopped object { event_id, response_id, type }`1127311274    **WebRTC/SIP Only:** Emitted when the output audio buffer has been completely drained on the server,11275    and no more audio is forthcoming. This event is emitted after the full response11276    data has been sent to the client (`response.done`).11277    [Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).1127811279    - `event_id: string`1128011281      The unique ID of the server event.1128211283    - `response_id: string`1128411285      The unique ID of the response that produced the audio.1128611287    - `type: "output_audio_buffer.stopped"`1128811289      The event type, must be `output_audio_buffer.stopped`.1129011291      - `"output_audio_buffer.stopped"`1129211293  - `OutputAudioBufferCleared object { event_id, response_id, type }`1129411295    **WebRTC/SIP Only:** Emitted when the output audio buffer is cleared. This happens either in VAD11296    mode when the user has interrupted (`input_audio_buffer.speech_started`),11297    or when the client has emitted the `output_audio_buffer.clear` event to manually11298    cut off the current audio response.11299    [Learn more](/api/docs/guides/realtime-conversations#client-and-server-events-for-audio-in-webrtc).1130011301    - `event_id: string`1130211303      The unique ID of the server event.1130411305    - `response_id: string`1130611307      The unique ID of the response that produced the audio.1130811309    - `type: "output_audio_buffer.cleared"`1131011311      The event type, must be `output_audio_buffer.cleared`.1131211313      - `"output_audio_buffer.cleared"`1131411315  - `ConversationItemAdded object { event_id, item, type, previous_item_id }`1131611317    Sent by the server when an Item is added to the default Conversation. This can happen in several cases:1131811319    - When the client sends a `conversation.item.create` event.11320    - When the input audio buffer is committed. In this case the item will be a user message containing the audio from the buffer.11321    - When the model is generating a Response. In this case the `conversation.item.added` event will be sent when the model starts generating a specific Item, and thus it will not yet have any content (and `status` will be `in_progress`).1132211323    The event will include the full content of the Item (except when model is generating a Response) except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if necessary.1132411325    - `event_id: string`1132611327      The unique ID of the server event.1132811329    - `item: ConversationItem`1133011331      A single item within a Realtime conversation.1133211333    - `type: "conversation.item.added"`1133411335      The event type, must be `conversation.item.added`.1133611337      - `"conversation.item.added"`1133811339    - `previous_item_id: optional string or null`1134011341      The ID of the item that precedes this one, if any. This is used to11342      maintain ordering when items are inserted.1134311344  - `ConversationItemDone object { event_id, item, type, previous_item_id }`1134511346    Returned when a conversation item is finalized.1134711348    The event will include the full content of the Item except for audio data, which can be retrieved separately with a `conversation.item.retrieve` event if needed.1134911350    - `event_id: string`1135111352      The unique ID of the server event.1135311354    - `item: ConversationItem`1135511356      A single item within a Realtime conversation.1135711358    - `type: "conversation.item.done"`1135911360      The event type, must be `conversation.item.done`.1136111362      - `"conversation.item.done"`1136311364    - `previous_item_id: optional string or null`1136511366      The ID of the item that precedes this one, if any. This is used to11367      maintain ordering when items are inserted.1136811369  - `InputAudioBufferTimeoutTriggered object { audio_end_ms, audio_start_ms, event_id, 2 more }`1137011371    Returned when the Server VAD timeout is triggered for the input audio buffer. This is configured11372    with `idle_timeout_ms` in the `turn_detection` settings of the session, and it indicates that11373    there hasn't been any speech detected for the configured duration.1137411375    The `audio_start_ms` and `audio_end_ms` fields indicate the segment of audio after the last11376    model response up to the triggering time, as an offset from the beginning of audio written11377    to the input audio buffer. This means it demarcates the segment of audio that was silent and11378    the difference between the start and end values will roughly match the configured timeout.1137911380    The empty audio will be committed to the conversation as an `input_audio` item (there will be a11381    `input_audio_buffer.committed` event) and a model response will be generated. There may be speech11382    that didn't trigger VAD but is still detected by the model, so the model may respond with11383    something relevant to the conversation or a prompt to continue speaking.1138411385    - `audio_end_ms: number`1138611387      Millisecond offset of audio written to the input audio buffer at the time the timeout was triggered.1138811389    - `audio_start_ms: number`1139011391      Millisecond offset of audio written to the input audio buffer that was after the playback time of the last model response.1139211393    - `event_id: string`1139411395      The unique ID of the server event.1139611397    - `item_id: string`1139811399      The ID of the item associated with this segment.1140011401    - `type: "input_audio_buffer.timeout_triggered"`1140211403      The event type, must be `input_audio_buffer.timeout_triggered`.1140411405      - `"input_audio_buffer.timeout_triggered"`1140611407  - `ConversationItemInputAudioTranscriptionSegment object { id, content_index, end, 6 more }`1140811409    Returned when an input audio transcription segment is identified for an item.1141011411    - `id: string`1141211413      The segment identifier.1141411415    - `content_index: number`1141611417      The index of the input audio content part within the item.1141811419    - `end: number`1142011421      End time of the segment in seconds.1142211423    - `event_id: string`1142411425      The unique ID of the server event.1142611427    - `item_id: string`1142811429      The ID of the item containing the input audio content.1143011431    - `speaker: string`1143211433      The detected speaker label for this segment.1143411435    - `start: number`1143611437      Start time of the segment in seconds.1143811439    - `text: string`1144011441      The text for this segment.1144211443    - `type: "conversation.item.input_audio_transcription.segment"`1144411445      The event type, must be `conversation.item.input_audio_transcription.segment`.1144611447      - `"conversation.item.input_audio_transcription.segment"`1144811449  - `McpListToolsInProgress object { event_id, item_id, type }`1145011451    Returned when listing MCP tools is in progress for an item.1145211453    - `event_id: string`1145411455      The unique ID of the server event.1145611457    - `item_id: string`1145811459      The ID of the MCP list tools item.1146011461    - `type: "mcp_list_tools.in_progress"`1146211463      The event type, must be `mcp_list_tools.in_progress`.1146411465      - `"mcp_list_tools.in_progress"`1146611467  - `McpListToolsCompleted object { event_id, item_id, type }`1146811469    Returned when listing MCP tools has completed for an item.1147011471    - `event_id: string`1147211473      The unique ID of the server event.1147411475    - `item_id: string`1147611477      The ID of the MCP list tools item.1147811479    - `type: "mcp_list_tools.completed"`1148011481      The event type, must be `mcp_list_tools.completed`.1148211483      - `"mcp_list_tools.completed"`1148411485  - `McpListToolsFailed object { event_id, item_id, type }`1148611487    Returned when listing MCP tools has failed for an item.1148811489    - `event_id: string`1149011491      The unique ID of the server event.1149211493    - `item_id: string`1149411495      The ID of the MCP list tools item.1149611497    - `type: "mcp_list_tools.failed"`1149811499      The event type, must be `mcp_list_tools.failed`.1150011501      - `"mcp_list_tools.failed"`1150211503  - `ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more }`1150411505    Returned when MCP tool call arguments are updated during response generation.1150611507    - `delta: string`1150811509      The JSON-encoded arguments delta.1151011511    - `event_id: string`1151211513      The unique ID of the server event.1151411515    - `item_id: string`1151611517      The ID of the MCP tool call item.1151811519    - `output_index: number`1152011521      The index of the output item in the response.1152211523    - `response_id: string`1152411525      The ID of the response.1152611527    - `type: "response.mcp_call_arguments.delta"`1152811529      The event type, must be `response.mcp_call_arguments.delta`.1153011531      - `"response.mcp_call_arguments.delta"`1153211533    - `obfuscation: optional string or null`1153411535      If present, indicates the delta text was obfuscated.1153611537  - `ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more }`1153811539    Returned when MCP tool call arguments are finalized during response generation.1154011541    - `arguments: string`1154211543      The final JSON-encoded arguments string.1154411545    - `event_id: string`1154611547      The unique ID of the server event.1154811549    - `item_id: string`1155011551      The ID of the MCP tool call item.1155211553    - `output_index: number`1155411555      The index of the output item in the response.1155611557    - `response_id: string`1155811559      The ID of the response.1156011561    - `type: "response.mcp_call_arguments.done"`1156211563      The event type, must be `response.mcp_call_arguments.done`.1156411565      - `"response.mcp_call_arguments.done"`1156611567  - `ResponseMcpCallInProgress object { event_id, item_id, output_index, type }`1156811569    Returned when an MCP tool call has started and is in progress.1157011571    - `event_id: string`1157211573      The unique ID of the server event.1157411575    - `item_id: string`1157611577      The ID of the MCP tool call item.1157811579    - `output_index: number`1158011581      The index of the output item in the response.1158211583    - `type: "response.mcp_call.in_progress"`1158411585      The event type, must be `response.mcp_call.in_progress`.1158611587      - `"response.mcp_call.in_progress"`1158811589  - `ResponseMcpCallCompleted object { event_id, item_id, output_index, type }`1159011591    Returned when an MCP tool call has completed successfully.1159211593    - `event_id: string`1159411595      The unique ID of the server event.1159611597    - `item_id: string`1159811599      The ID of the MCP tool call item.1160011601    - `output_index: number`1160211603      The index of the output item in the response.1160411605    - `type: "response.mcp_call.completed"`1160611607      The event type, must be `response.mcp_call.completed`.1160811609      - `"response.mcp_call.completed"`1161011611  - `ResponseMcpCallFailed object { event_id, item_id, output_index, type }`1161211613    Returned when an MCP tool call has failed.1161411615    - `event_id: string`1161611617      The unique ID of the server event.1161811619    - `item_id: string`1162011621      The ID of the MCP tool call item.1162211623    - `output_index: number`1162411625      The index of the output item in the response.1162611627    - `type: "response.mcp_call.failed"`1162811629      The event type, must be `response.mcp_call.failed`.1163011631      - `"response.mcp_call.failed"`1163211633### Realtime Session1163411635- `RealtimeSession object { id, expires_at, include, 17 more }`1163611637  Realtime session object for the beta interface.1163811639  - `id: optional string`1164011641    Unique identifier for the session that looks like `sess_1234567890abcdef`.1164211643  - `expires_at: optional number`1164411645    Expiration timestamp for the session, in seconds since epoch.1164611647  - `include: optional array of "item.input_audio_transcription.logprobs" or null`1164811649    Additional fields to include in server outputs.1165011651    - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1165211653    - `"item.input_audio_transcription.logprobs"`1165411655  - `input_audio_format: optional "pcm16" or "g711_ulaw" or "g711_alaw"`1165611657    The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.11658    For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,11659    single channel (mono), and little-endian byte order.1166011661    - `"pcm16"`1166211663    - `"g711_ulaw"`1166411665    - `"g711_alaw"`1166611667  - `input_audio_noise_reduction: optional object { type }`1166811669    Configuration for input audio noise reduction. This can be set to `null` to turn off.11670    Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.11671    Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1167211673    - `type: optional NoiseReductionType`1167411675      Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1167611677      - `"near_field"`1167811679      - `"far_field"`1168011681  - `input_audio_transcription: optional object { language, languages, model, prompt }  or null`1168211683    Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1168411685    - `language: optional string`1168611687      The language of the input audio.1168811689    - `languages: optional array of string`1169011691      The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.1169211693    - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1169411695      The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1169611697      - `string`1169811699      - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1170011701        The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1170211703        - `"whisper-1"`1170411705        - `"gpt-transcribe"`1170611707        - `"gpt-live-transcribe"`1170811709        - `"gpt-4o-mini-transcribe"`1171011711        - `"gpt-4o-mini-transcribe-2025-12-15"`1171211713        - `"gpt-4o-transcribe"`1171411715        - `"gpt-4o-transcribe-diarize"`1171611717        - `"gpt-realtime-whisper"`1171811719    - `prompt: optional string`1172011721      The prompt configured for input audio transcription, when present.1172211723  - `instructions: optional string`1172411725    The default system instructions (i.e. system message) prepended to model11726    calls. This field allows the client to guide the model on desired11727    responses. The model can be instructed on response content and format,11728    (e.g. "be extremely succinct", "act friendly", "here are examples of good11729    responses") and on audio behavior (e.g. "talk quickly", "inject emotion11730    into your voice", "laugh frequently"). The instructions are not11731    guaranteed to be followed by the model, but they provide guidance to the11732    model on the desired behavior.1173311734    Note that the server sets default instructions which will be used if this11735    field is not set and are visible in the `session.created` event at the11736    start of the session.1173711738  - `max_response_output_tokens: optional number or "inf"`1173911740    Maximum number of output tokens for a single assistant response,11741    inclusive of tool calls. Provide an integer between 1 and 4096 to11742    limit output tokens, or `inf` for the maximum available tokens for a11743    given model. Defaults to `inf`.1174411745    - `number`1174611747    - `"inf"`1174811749      - `"inf"`1175011751  - `modalities: optional array of "text" or "audio"`1175211753    The set of modalities the model can respond with. To disable audio,11754    set this to ["text"].1175511756    - `"text"`1175711758    - `"audio"`1175911760  - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2025-08-28" or 13 more`1176111762    The Realtime model used for this session.1176311764    - `string`1176511766    - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2025-08-28" or 13 more`1176711768      The Realtime model used for this session.1176911770      - `"gpt-realtime"`1177111772      - `"gpt-realtime-1.5"`1177311774      - `"gpt-realtime-2025-08-28"`1177511776      - `"gpt-4o-realtime-preview"`1177711778      - `"gpt-4o-realtime-preview-2024-10-01"`1177911780      - `"gpt-4o-realtime-preview-2024-12-17"`1178111782      - `"gpt-4o-realtime-preview-2025-06-03"`1178311784      - `"gpt-4o-mini-realtime-preview"`1178511786      - `"gpt-4o-mini-realtime-preview-2024-12-17"`1178711788      - `"gpt-realtime-mini"`1178911790      - `"gpt-realtime-mini-2025-10-06"`1179111792      - `"gpt-realtime-mini-2025-12-15"`1179311794      - `"gpt-audio-1.5"`1179511796      - `"gpt-audio-mini"`1179711798      - `"gpt-audio-mini-2025-10-06"`1179911800      - `"gpt-audio-mini-2025-12-15"`1180111802  - `object: optional "realtime.session"`1180311804    The object type. Always `realtime.session`.1180511806    - `"realtime.session"`1180711808  - `output_audio_format: optional "pcm16" or "g711_ulaw" or "g711_alaw"`1180911810    The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.11811    For `pcm16`, output audio is sampled at a rate of 24kHz.1181211813    - `"pcm16"`1181411815    - `"g711_ulaw"`1181611817    - `"g711_alaw"`1181811819  - `prompt: optional ResponsePrompt or null`1182011821    Reference to a prompt template and its variables.11822    [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1182311824    - `id: string`1182511826      The unique identifier of the prompt template to use.1182711828    - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1182911830      Optional map of values to substitute in for variables in your11831      prompt. The substitution values can either be strings, or other11832      Response input types like images or files.1183311834      - `string`1183511836      - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1183711838        A text input to the model.1183911840        - `text: string`1184111842          The text input to the model.1184311844        - `type: "input_text"`1184511846          The type of the input item. Always `input_text`.1184711848          - `"input_text"`1184911850        - `prompt_cache_breakpoint: optional object { mode }`1185111852          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.1185311854          - `mode: "explicit"`1185511856            The breakpoint mode. Always `explicit`.1185711858            - `"explicit"`1185911860      - `ResponseInputImage object { detail, type, file_id, 2 more }`1186111862        An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1186311864        - `detail: ImageDetail`1186511866          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.1186711868          - `"low"`1186911870          - `"high"`1187111872          - `"auto"`1187311874          - `"original"`1187511876        - `type: "input_image"`1187711878          The type of the input item. Always `input_image`.1187911880          - `"input_image"`1188111882        - `file_id: optional string or null`1188311884          The ID of the file to be sent to the model.1188511886        - `image_url: optional string or null`1188711888          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1188911890        - `prompt_cache_breakpoint: optional object { mode }`1189111892          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.1189311894          - `mode: "explicit"`1189511896            The breakpoint mode. Always `explicit`.1189711898            - `"explicit"`1189911900      - `ResponseInputFile object { type, detail, file_data, 4 more }`1190111902        A file input to the model.1190311904        - `type: "input_file"`1190511906          The type of the input item. Always `input_file`.1190711908          - `"input_file"`1190911910        - `detail: optional "auto" or "low" or "high"`1191111912          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`.1191311914          - `"auto"`1191511916          - `"low"`1191711918          - `"high"`1191911920        - `file_data: optional string`1192111922          The content of the file to be sent to the model.1192311924        - `file_id: optional string or null`1192511926          The ID of the file to be sent to the model.1192711928        - `file_url: optional string`1192911930          The URL of the file to be sent to the model.1193111932        - `filename: optional string`1193311934          The name of the file to be sent to the model.1193511936        - `prompt_cache_breakpoint: optional object { mode }`1193711938          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.1193911940          - `mode: "explicit"`1194111942            The breakpoint mode. Always `explicit`.1194311944            - `"explicit"`1194511946    - `version: optional string or null`1194711948      Optional version of the prompt template.1194911950  - `speed: optional number`1195111952    The speed of the model's spoken response. 1.0 is the default speed. 0.25 is11953    the minimum speed. 1.5 is the maximum speed. This value can only be changed11954    in between model turns, not while a response is in progress.1195511956  - `temperature: optional number`1195711958    Sampling temperature for the model, limited to [0.6, 1.2]. For audio models a temperature of 0.8 is highly recommended for best performance.1195911960  - `tool_choice: optional string`1196111962    How the model chooses tools. Options are `auto`, `none`, `required`, or11963    specify a function.1196411965  - `tools: optional array of RealtimeFunctionTool`1196611967    Tools (functions) available to the model.1196811969    - `description: optional string`1197011971      The description of the function, including guidance on when and how11972      to call it, and guidance about what to tell the user when calling11973      (if anything).1197411975    - `name: optional string`1197611977      The name of the function.1197811979    - `parameters: optional unknown`1198011981      Parameters of the function in JSON Schema.1198211983    - `type: optional "function"`1198411985      The type of the tool, i.e. `function`.1198611987      - `"function"`1198811989  - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`1199011991    Configuration options for tracing. Set to null to disable tracing. Once11992    tracing is enabled for a session, the configuration cannot be modified.1199311994    `auto` will create a trace for the session with default values for the11995    workflow name, group id, and metadata.1199611997    - `"auto"`1199811999      Default tracing mode for the session.1200012001      - `"auto"`1200212003    - `TracingConfiguration object { group_id, metadata, workflow_name }`1200412005      Granular configuration for tracing.1200612007      - `group_id: optional string`1200812009        The group id to attach to this trace to enable filtering and12010        grouping in the traces dashboard.1201112012      - `metadata: optional unknown`1201312014        The arbitrary metadata to attach to this trace to enable12015        filtering in the traces dashboard.1201612017      - `workflow_name: optional string`1201812019        The name of the workflow to attach to this trace. This is used to12020        name the trace in the traces dashboard.1202112022  - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`1202312024    Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1202512026    Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1202712028    Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1202912030    For `gpt-realtime-whisper` transcription sessions, turn detection must be12031    set to `null`; VAD is not supported.1203212033    - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1203412035      Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1203612037      - `type: "server_vad"`1203812039        Type of turn detection, `server_vad` to turn on simple Server VAD.1204012041        - `"server_vad"`1204212043      - `create_response: optional boolean`1204412045        Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1204612047        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1204812049      - `idle_timeout_ms: optional number or null`1205012051        Optional timeout after which a model response will be triggered automatically. This is12052        useful for situations in which a long pause from the user is unexpected, such as a phone12053        call. The model will effectively prompt the user to continue the conversation based12054        on the current context.1205512056        The timeout value will be applied after the last model response's audio has finished playing,12057        i.e. it's set to the `response.done` time plus audio playback duration.1205812059        An `input_audio_buffer.timeout_triggered` event (plus events12060        associated with the Response) will be emitted when the timeout is reached.12061        Idle timeout is currently only supported for `server_vad` mode.1206212063      - `interrupt_response: optional boolean`1206412065        Whether or not to automatically interrupt (cancel) any ongoing response with output to the default12066        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1206712068        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1206912070      - `prefix_padding_ms: optional number`1207112072        Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in12073        milliseconds). Defaults to 300ms.1207412075      - `silence_duration_ms: optional number`1207612077        Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults12078        to 500ms. With shorter values the model will respond more quickly,12079        but may jump in on short pauses from the user.1208012081      - `threshold: optional number`1208212083        Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A12084        higher threshold will require louder audio to activate the model, and12085        thus might perform better in noisy environments.1208612087    - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1208812089      Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1209012091      - `type: "semantic_vad"`1209212093        Type of turn detection, `semantic_vad` to turn on Semantic VAD.1209412095        - `"semantic_vad"`1209612097      - `create_response: optional boolean`1209812099        Whether or not to automatically generate a response when a VAD stop event occurs.1210012101      - `eagerness: optional "low" or "medium" or "high" or "auto"`1210212103        Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1210412105        - `"low"`1210612107        - `"medium"`1210812109        - `"high"`1211012111        - `"auto"`1211212113      - `interrupt_response: optional boolean`1211412115        Whether or not to automatically interrupt any ongoing response with output to the default12116        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1211712118  - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`1211912120    The voice the model uses to respond. Voice cannot be changed during the12121    session once the model has responded with audio at least once. Current12122    voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,12123    `shimmer`, and `verse`.1212412125    - `string`1212612127    - `"alloy" or "ash" or "ballad" or 7 more`1212812129      The voice the model uses to respond. Voice cannot be changed during the12130      session once the model has responded with audio at least once. Current12131      voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,12132      `shimmer`, and `verse`.1213312134      - `"alloy"`1213512136      - `"ash"`1213712138      - `"ballad"`1213912140      - `"coral"`1214112142      - `"echo"`1214312144      - `"sage"`1214512146      - `"shimmer"`1214712148      - `"verse"`1214912150      - `"marin"`1215112152      - `"cedar"`1215312154### Realtime Session Create Request1215512156- `RealtimeSessionCreateRequest object { type, audio, include, 11 more }`1215712158  Realtime session object configuration.1215912160  - `type: "realtime"`1216112162    The type of session to create. Always `realtime` for the Realtime API.1216312164    - `"realtime"`1216512166  - `audio: optional RealtimeAudioConfig`1216712168    Configuration for input and output audio.1216912170    - `input: optional RealtimeAudioConfigInput`1217112172      - `format: optional RealtimeAudioFormats`1217312174        The format of the input audio.1217512176        - `PCMAudio object { rate, type }`1217712178          The PCM audio format. Only a 24kHz sample rate is supported.1217912180          - `rate: optional 24000`1218112182            The sample rate of the audio. Always `24000`.1218312184            - `24000`1218512186          - `type: optional "audio/pcm"`1218712188            The audio format. Always `audio/pcm`.1218912190            - `"audio/pcm"`1219112192        - `PCMUAudio object { type }`1219312194          The G.711 μ-law format.1219512196          - `type: optional "audio/pcmu"`1219712198            The audio format. Always `audio/pcmu`.1219912200            - `"audio/pcmu"`1220112202        - `PCMAAudio object { type }`1220312204          The G.711 A-law format.1220512206          - `type: optional "audio/pcma"`1220712208            The audio format. Always `audio/pcma`.1220912210            - `"audio/pcma"`1221112212      - `noise_reduction: optional object { type }`1221312214        Configuration for input audio noise reduction. This can be set to `null` to turn off.12215        Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.12216        Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1221712218        - `type: optional NoiseReductionType`1221912220          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1222112222          - `"near_field"`1222312224          - `"far_field"`1222512226      - `transcription: optional AudioTranscription`1222712228        Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1222912230        - `delay: optional "minimal" or "low" or "medium" or 2 more`1223112232          Controls how long the model waits before emitting transcription text.12233          Higher values can improve transcription accuracy at the cost of latency.12234          Only supported with `gpt-realtime-whisper` in GA Realtime sessions.1223512236          - `"minimal"`1223712238          - `"low"`1223912240          - `"medium"`1224112242          - `"high"`1224312244          - `"xhigh"`1224512246        - `keywords: optional array of string`1224712248          Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1224912250        - `language: optional string`1225112252          The language of the input audio. Supplying the input language in12253          [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format12254          will improve accuracy and latency.1225512256        - `languages: optional array of string`1225712258          Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1225912260        - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1226112262          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1226312264          - `string`1226512266          - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1226712268            The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1226912270            - `"whisper-1"`1227112272            - `"gpt-transcribe"`1227312274            - `"gpt-live-transcribe"`1227512276            - `"gpt-4o-mini-transcribe"`1227712278            - `"gpt-4o-mini-transcribe-2025-12-15"`1227912280            - `"gpt-4o-transcribe"`1228112282            - `"gpt-4o-transcribe-diarize"`1228312284            - `"gpt-realtime-whisper"`1228512286        - `prompt: optional string`1228712288          An optional text to guide the model's style or continue a previous audio12289          segment.12290          For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).12291          For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".12292          Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.1229312294      - `turn_detection: optional RealtimeAudioInputTurnDetection or null`1229512296        Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1229712298        Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1229912300        Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1230112302        For `gpt-realtime-whisper` transcription sessions, turn detection must be12303        set to `null`; VAD is not supported.1230412305        - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1230612307          Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1230812309          - `type: "server_vad"`1231012311            Type of turn detection, `server_vad` to turn on simple Server VAD.1231212313            - `"server_vad"`1231412315          - `create_response: optional boolean`1231612317            Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1231812319            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1232012321          - `idle_timeout_ms: optional number or null`1232212323            Optional timeout after which a model response will be triggered automatically. This is12324            useful for situations in which a long pause from the user is unexpected, such as a phone12325            call. The model will effectively prompt the user to continue the conversation based12326            on the current context.1232712328            The timeout value will be applied after the last model response's audio has finished playing,12329            i.e. it's set to the `response.done` time plus audio playback duration.1233012331            An `input_audio_buffer.timeout_triggered` event (plus events12332            associated with the Response) will be emitted when the timeout is reached.12333            Idle timeout is currently only supported for `server_vad` mode.1233412335          - `interrupt_response: optional boolean`1233612337            Whether or not to automatically interrupt (cancel) any ongoing response with output to the default12338            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1233912340            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1234112342          - `prefix_padding_ms: optional number`1234312344            Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in12345            milliseconds). Defaults to 300ms.1234612347          - `silence_duration_ms: optional number`1234812349            Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults12350            to 500ms. With shorter values the model will respond more quickly,12351            but may jump in on short pauses from the user.1235212353          - `threshold: optional number`1235412355            Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A12356            higher threshold will require louder audio to activate the model, and12357            thus might perform better in noisy environments.1235812359        - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1236012361          Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1236212363          - `type: "semantic_vad"`1236412365            Type of turn detection, `semantic_vad` to turn on Semantic VAD.1236612367            - `"semantic_vad"`1236812369          - `create_response: optional boolean`1237012371            Whether or not to automatically generate a response when a VAD stop event occurs.1237212373          - `eagerness: optional "low" or "medium" or "high" or "auto"`1237412375            Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1237612377            - `"low"`1237812379            - `"medium"`1238012381            - `"high"`1238212383            - `"auto"`1238412385          - `interrupt_response: optional boolean`1238612387            Whether or not to automatically interrupt any ongoing response with output to the default12388            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1238912390    - `output: optional RealtimeAudioConfigOutput`1239112392      - `format: optional RealtimeAudioFormats`1239312394        The format of the output audio.1239512396      - `speed: optional number`1239712398        The speed of the model's spoken response as a multiple of the original speed.12399        1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.1240012401        This parameter is a post-processing adjustment to the audio after it is generated, it's12402        also possible to prompt the model to speak faster or slower.1240312404      - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`1240512406        The voice the model uses to respond. Supported built-in voices are12407        `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,12408        `marin`, and `cedar`. You may also provide a custom voice object with12409        an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed12410        during the session once the model has responded with audio at least once.12411        We recommend `marin` and `cedar` for best quality.1241212413        - `string`1241412415        - `"alloy" or "ash" or "ballad" or 7 more`1241612417          - `"alloy"`1241812419          - `"ash"`1242012421          - `"ballad"`1242212423          - `"coral"`1242412425          - `"echo"`1242612427          - `"sage"`1242812429          - `"shimmer"`1243012431          - `"verse"`1243212433          - `"marin"`1243412435          - `"cedar"`1243612437        - `ID object { id }`1243812439          Custom voice reference.1244012441          - `id: string`1244212443            The custom voice ID, e.g. `voice_1234`.1244412445  - `include: optional array of "item.input_audio_transcription.logprobs"`1244612447    Additional fields to include in server outputs.1244812449    `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1245012451    - `"item.input_audio_transcription.logprobs"`1245212453  - `instructions: optional string`1245412455    The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.1245612457    Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.1245812459  - `max_output_tokens: optional number or "inf"`1246012461    Maximum number of output tokens for a single assistant response,12462    inclusive of tool calls. Provide an integer between 1 and 4096 to12463    limit output tokens, or `inf` for the maximum available tokens for a12464    given model. Defaults to `inf`.1246512466    - `number`1246712468    - `"inf"`1246912470      - `"inf"`1247112472  - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1247312474    The Realtime model used for this session.1247512476    - `string`1247712478    - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1247912480      The Realtime model used for this session.1248112482      - `"gpt-realtime"`1248312484      - `"gpt-realtime-1.5"`1248512486      - `"gpt-realtime-2"`1248712488      - `"gpt-realtime-2.1"`1248912490      - `"gpt-realtime-2.1-mini"`1249112492      - `"gpt-realtime-2025-08-28"`1249312494      - `"gpt-4o-realtime-preview"`1249512496      - `"gpt-4o-realtime-preview-2024-10-01"`1249712498      - `"gpt-4o-realtime-preview-2024-12-17"`1249912500      - `"gpt-4o-realtime-preview-2025-06-03"`1250112502      - `"gpt-4o-mini-realtime-preview"`1250312504      - `"gpt-4o-mini-realtime-preview-2024-12-17"`1250512506      - `"gpt-realtime-mini"`1250712508      - `"gpt-realtime-mini-2025-10-06"`1250912510      - `"gpt-realtime-mini-2025-12-15"`1251112512      - `"gpt-audio-1.5"`1251312514      - `"gpt-audio-mini"`1251512516      - `"gpt-audio-mini-2025-10-06"`1251712518      - `"gpt-audio-mini-2025-12-15"`1251912520  - `output_modalities: optional array of "text" or "audio"`1252112522    The set of modalities the model can respond with. It defaults to `["audio"]`, indicating12523    that the model will respond with audio plus a transcript. `["text"]` can be used to make12524    the model respond with text only. It is not possible to request both `text` and `audio` at the same time.1252512526    - `"text"`1252712528    - `"audio"`1252912530  - `parallel_tool_calls: optional boolean`1253112532    Whether the model may call multiple tools in parallel. Only supported by12533    reasoning Realtime models such as `gpt-realtime-2`.1253412535  - `prompt: optional ResponsePrompt or null`1253612537    Reference to a prompt template and its variables.12538    [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1253912540    - `id: string`1254112542      The unique identifier of the prompt template to use.1254312544    - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1254512546      Optional map of values to substitute in for variables in your12547      prompt. The substitution values can either be strings, or other12548      Response input types like images or files.1254912550      - `string`1255112552      - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1255312554        A text input to the model.1255512556        - `text: string`1255712558          The text input to the model.1255912560        - `type: "input_text"`1256112562          The type of the input item. Always `input_text`.1256312564          - `"input_text"`1256512566        - `prompt_cache_breakpoint: optional object { mode }`1256712568          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.1256912570          - `mode: "explicit"`1257112572            The breakpoint mode. Always `explicit`.1257312574            - `"explicit"`1257512576      - `ResponseInputImage object { detail, type, file_id, 2 more }`1257712578        An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1257912580        - `detail: ImageDetail`1258112582          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.1258312584          - `"low"`1258512586          - `"high"`1258712588          - `"auto"`1258912590          - `"original"`1259112592        - `type: "input_image"`1259312594          The type of the input item. Always `input_image`.1259512596          - `"input_image"`1259712598        - `file_id: optional string or null`1259912600          The ID of the file to be sent to the model.1260112602        - `image_url: optional string or null`1260312604          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1260512606        - `prompt_cache_breakpoint: optional object { mode }`1260712608          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.1260912610          - `mode: "explicit"`1261112612            The breakpoint mode. Always `explicit`.1261312614            - `"explicit"`1261512616      - `ResponseInputFile object { type, detail, file_data, 4 more }`1261712618        A file input to the model.1261912620        - `type: "input_file"`1262112622          The type of the input item. Always `input_file`.1262312624          - `"input_file"`1262512626        - `detail: optional "auto" or "low" or "high"`1262712628          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`.1262912630          - `"auto"`1263112632          - `"low"`1263312634          - `"high"`1263512636        - `file_data: optional string`1263712638          The content of the file to be sent to the model.1263912640        - `file_id: optional string or null`1264112642          The ID of the file to be sent to the model.1264312644        - `file_url: optional string`1264512646          The URL of the file to be sent to the model.1264712648        - `filename: optional string`1264912650          The name of the file to be sent to the model.1265112652        - `prompt_cache_breakpoint: optional object { mode }`1265312654          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.1265512656          - `mode: "explicit"`1265712658            The breakpoint mode. Always `explicit`.1265912660            - `"explicit"`1266112662    - `version: optional string or null`1266312664      Optional version of the prompt template.1266512666  - `reasoning: optional RealtimeReasoning`1266712668    Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.1266912670    - `effort: optional RealtimeReasoningEffort`1267112672      Constrains effort on reasoning for reasoning-capable Realtime models such as12673      `gpt-realtime-2`.1267412675      - `"minimal"`1267612677      - `"low"`1267812679      - `"medium"`1268012681      - `"high"`1268212683      - `"xhigh"`1268412685  - `tool_choice: optional RealtimeToolChoiceConfig`1268612687    How the model chooses tools. Provide one of the string modes or force a specific12688    function/MCP tool.1268912690    - `ToolChoiceOptions = "none" or "auto" or "required"`1269112692      Controls which (if any) tool is called by the model.1269312694      `none` means the model will not call any tool and instead generates a message.1269512696      `auto` means the model can pick between generating a message or calling one or12697      more tools.1269812699      `required` means the model must call one or more tools.1270012701      - `"none"`1270212703      - `"auto"`1270412705      - `"required"`1270612707    - `ToolChoiceFunction object { name, type }`1270812709      Use this option to force the model to call a specific function.1271012711      - `name: string`1271212713        The name of the function to call.1271412715      - `type: "function"`1271612717        For function calling, the type is always `function`.1271812719        - `"function"`1272012721    - `ToolChoiceMcp object { server_label, type, name }`1272212723      Use this option to force the model to call a specific tool on a remote MCP server.1272412725      - `server_label: string`1272612727        The label of the MCP server to use.1272812729      - `type: "mcp"`1273012731        For MCP tools, the type is always `mcp`.1273212733        - `"mcp"`1273412735      - `name: optional string or null`1273612737        The name of the tool to call on the server.1273812739  - `tools: optional RealtimeToolsConfig`1274012741    Tools available to the model.1274212743    - `RealtimeFunctionTool object { description, name, parameters, type }`1274412745      - `description: optional string`1274612747        The description of the function, including guidance on when and how12748        to call it, and guidance about what to tell the user when calling12749        (if anything).1275012751      - `name: optional string`1275212753        The name of the function.1275412755      - `parameters: optional unknown`1275612757        Parameters of the function in JSON Schema.1275812759      - `type: optional "function"`1276012761        The type of the tool, i.e. `function`.1276212763        - `"function"`1276412765    - `McpTool object { server_label, type, allowed_callers, 9 more }`1276612767      Give the model access to additional tools via remote Model Context Protocol12768      (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1276912770      - `server_label: string`1277112772        A label for this MCP server, used to identify it in tool calls.1277312774      - `type: "mcp"`1277512776        The type of the MCP tool. Always `mcp`.1277712778        - `"mcp"`1277912780      - `allowed_callers: optional array of "direct" or "programmatic" or null`1278112782        The tool invocation context(s).1278312784        - `"direct"`1278512786        - `"programmatic"`1278712788      - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1278912790        List of allowed tool names or a filter object.1279112792        - `McpAllowedTools = array of string`1279312794          A string array of allowed tool names1279512796        - `McpToolFilter object { read_only, tool_names }`1279712798          A filter object to specify which tools are allowed.1279912800          - `read_only: optional boolean`1280112802            Indicates whether or not a tool modifies data or is read-only. If an12803            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12804            it will match this filter.1280512806          - `tool_names: optional array of string`1280712808            List of allowed tool names.1280912810      - `authorization: optional string`1281112812        An OAuth access token that can be used with a remote MCP server, either12813        with a custom MCP server URL or a service connector. Your application12814        must handle the OAuth authorization flow and provide the token here.1281512816      - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1281712818        Identifier for service connectors, like those available in ChatGPT. One of12819        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more12820        about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1282112822        This field is deprecated for models released after September 1, 2026.12823        Use `server_url` to connect to a remote MCP server, or `tunnel_id` to12824        connect through a Secure MCP Tunnel.1282512826        Currently supported `connector_id` values are:1282712828        - Dropbox: `connector_dropbox`12829        - Gmail: `connector_gmail`12830        - Google Calendar: `connector_googlecalendar`12831        - Google Drive: `connector_googledrive`12832        - Microsoft Teams: `connector_microsoftteams`12833        - Outlook Calendar: `connector_outlookcalendar`12834        - Outlook Email: `connector_outlookemail`12835        - SharePoint: `connector_sharepoint`1283612837        - `"connector_dropbox"`1283812839        - `"connector_gmail"`1284012841        - `"connector_googlecalendar"`1284212843        - `"connector_googledrive"`1284412845        - `"connector_microsoftteams"`1284612847        - `"connector_outlookcalendar"`1284812849        - `"connector_outlookemail"`1285012851        - `"connector_sharepoint"`1285212853      - `defer_loading: optional boolean`1285412855        Whether this MCP tool is deferred and discovered via tool search.1285612857      - `headers: optional map[string] or null`1285812859        Optional HTTP headers to send to the MCP server. Use for authentication12860        or other purposes.1286112862      - `require_approval: optional object { always, never }  or "always" or "never" or null`1286312864        Specify which of the MCP server's tools require approval.1286512866        - `McpToolApprovalFilter object { always, never }`1286712868          Specify which of the MCP server's tools require approval. Can be12869          `always`, `never`, or a filter object associated with tools12870          that require approval.1287112872          - `always: optional object { read_only, tool_names }`1287312874            A filter object to specify which tools are allowed.1287512876            - `read_only: optional boolean`1287712878              Indicates whether or not a tool modifies data or is read-only. If an12879              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12880              it will match this filter.1288112882            - `tool_names: optional array of string`1288312884              List of allowed tool names.1288512886          - `never: optional object { read_only, tool_names }`1288712888            A filter object to specify which tools are allowed.1288912890            - `read_only: optional boolean`1289112892              Indicates whether or not a tool modifies data or is read-only. If an12893              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),12894              it will match this filter.1289512896            - `tool_names: optional array of string`1289712898              List of allowed tool names.1289912900        - `McpToolApprovalSetting = "always" or "never"`1290112902          Specify a single approval policy for all tools. One of `always` or12903          `never`. When set to `always`, all tools will require approval. When12904          set to `never`, all tools will not require approval.1290512906          - `"always"`1290712908          - `"never"`1290912910      - `server_description: optional string`1291112912        Optional description of the MCP server, used to provide more context.1291312914      - `server_url: optional string`1291512916        The URL for the MCP server. One of `server_url`, `connector_id`, or12917        `tunnel_id` must be provided.1291812919      - `tunnel_id: optional string`1292012921        The Secure MCP Tunnel ID to use instead of a direct server URL. One of12922        `server_url`, `connector_id`, or `tunnel_id` must be provided.1292312924  - `tracing: optional RealtimeTracingConfig or null`1292512926    Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once12927    tracing is enabled for a session, the configuration cannot be modified.1292812929    `auto` will create a trace for the session with default values for the12930    workflow name, group id, and metadata.1293112932    - `Auto = "auto"`1293312934      Enables tracing and sets default values for tracing configuration options. Always `auto`.1293512936      - `"auto"`1293712938    - `TracingConfiguration object { group_id, metadata, workflow_name }`1293912940      Granular configuration for tracing.1294112942      - `group_id: optional string`1294312944        The group id to attach to this trace to enable filtering and12945        grouping in the Traces Dashboard.1294612947      - `metadata: optional unknown`1294812949        The arbitrary metadata to attach to this trace to enable12950        filtering in the Traces Dashboard.1295112952      - `workflow_name: optional string`1295312954        The name of the workflow to attach to this trace. This is used to12955        name the trace in the Traces Dashboard.1295612957  - `truncation: optional RealtimeTruncation`1295812959    When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.1296012961    Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.1296212963    Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.1296412965    Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.1296612967    - `"auto" or "disabled"`1296812969      The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.1297012971      - `"auto"`1297212973      - `"disabled"`1297412975    - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`1297612977      Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.1297812979      - `retention_ratio: number`1298012981        Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.1298212983      - `type: "retention_ratio"`1298412985        Use retention ratio truncation.1298612987        - `"retention_ratio"`1298812989      - `token_limits: optional object { post_instructions }`1299012991        Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.1299212993        - `post_instructions: optional number`1299412995          Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.1299612997### Realtime Tool Choice Config1299812999- `RealtimeToolChoiceConfig = ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`1300013001  How the model chooses tools. Provide one of the string modes or force a specific13002  function/MCP tool.1300313004  - `ToolChoiceOptions = "none" or "auto" or "required"`1300513006    Controls which (if any) tool is called by the model.1300713008    `none` means the model will not call any tool and instead generates a message.1300913010    `auto` means the model can pick between generating a message or calling one or13011    more tools.1301213013    `required` means the model must call one or more tools.1301413015    - `"none"`1301613017    - `"auto"`1301813019    - `"required"`1302013021  - `ToolChoiceFunction object { name, type }`1302213023    Use this option to force the model to call a specific function.1302413025    - `name: string`1302613027      The name of the function to call.1302813029    - `type: "function"`1303013031      For function calling, the type is always `function`.1303213033      - `"function"`1303413035  - `ToolChoiceMcp object { server_label, type, name }`1303613037    Use this option to force the model to call a specific tool on a remote MCP server.1303813039    - `server_label: string`1304013041      The label of the MCP server to use.1304213043    - `type: "mcp"`1304413045      For MCP tools, the type is always `mcp`.1304613047      - `"mcp"`1304813049    - `name: optional string or null`1305013051      The name of the tool to call on the server.1305213053### Realtime Tools Config1305413055- `RealtimeToolsConfig = array of RealtimeToolsConfigUnion`1305613057  Tools available to the model.1305813059  - `RealtimeFunctionTool object { description, name, parameters, type }`1306013061    - `description: optional string`1306213063      The description of the function, including guidance on when and how13064      to call it, and guidance about what to tell the user when calling13065      (if anything).1306613067    - `name: optional string`1306813069      The name of the function.1307013071    - `parameters: optional unknown`1307213073      Parameters of the function in JSON Schema.1307413075    - `type: optional "function"`1307613077      The type of the tool, i.e. `function`.1307813079      - `"function"`1308013081  - `McpTool object { server_label, type, allowed_callers, 9 more }`1308213083    Give the model access to additional tools via remote Model Context Protocol13084    (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1308513086    - `server_label: string`1308713088      A label for this MCP server, used to identify it in tool calls.1308913090    - `type: "mcp"`1309113092      The type of the MCP tool. Always `mcp`.1309313094      - `"mcp"`1309513096    - `allowed_callers: optional array of "direct" or "programmatic" or null`1309713098      The tool invocation context(s).1309913100      - `"direct"`1310113102      - `"programmatic"`1310313104    - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1310513106      List of allowed tool names or a filter object.1310713108      - `McpAllowedTools = array of string`1310913110        A string array of allowed tool names1311113112      - `McpToolFilter object { read_only, tool_names }`1311313114        A filter object to specify which tools are allowed.1311513116        - `read_only: optional boolean`1311713118          Indicates whether or not a tool modifies data or is read-only. If an13119          MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13120          it will match this filter.1312113122        - `tool_names: optional array of string`1312313124          List of allowed tool names.1312513126    - `authorization: optional string`1312713128      An OAuth access token that can be used with a remote MCP server, either13129      with a custom MCP server URL or a service connector. Your application13130      must handle the OAuth authorization flow and provide the token here.1313113132    - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1313313134      Identifier for service connectors, like those available in ChatGPT. One of13135      `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more13136      about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1313713138      This field is deprecated for models released after September 1, 2026.13139      Use `server_url` to connect to a remote MCP server, or `tunnel_id` to13140      connect through a Secure MCP Tunnel.1314113142      Currently supported `connector_id` values are:1314313144      - Dropbox: `connector_dropbox`13145      - Gmail: `connector_gmail`13146      - Google Calendar: `connector_googlecalendar`13147      - Google Drive: `connector_googledrive`13148      - Microsoft Teams: `connector_microsoftteams`13149      - Outlook Calendar: `connector_outlookcalendar`13150      - Outlook Email: `connector_outlookemail`13151      - SharePoint: `connector_sharepoint`1315213153      - `"connector_dropbox"`1315413155      - `"connector_gmail"`1315613157      - `"connector_googlecalendar"`1315813159      - `"connector_googledrive"`1316013161      - `"connector_microsoftteams"`1316213163      - `"connector_outlookcalendar"`1316413165      - `"connector_outlookemail"`1316613167      - `"connector_sharepoint"`1316813169    - `defer_loading: optional boolean`1317013171      Whether this MCP tool is deferred and discovered via tool search.1317213173    - `headers: optional map[string] or null`1317413175      Optional HTTP headers to send to the MCP server. Use for authentication13176      or other purposes.1317713178    - `require_approval: optional object { always, never }  or "always" or "never" or null`1317913180      Specify which of the MCP server's tools require approval.1318113182      - `McpToolApprovalFilter object { always, never }`1318313184        Specify which of the MCP server's tools require approval. Can be13185        `always`, `never`, or a filter object associated with tools13186        that require approval.1318713188        - `always: optional object { read_only, tool_names }`1318913190          A filter object to specify which tools are allowed.1319113192          - `read_only: optional boolean`1319313194            Indicates whether or not a tool modifies data or is read-only. If an13195            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13196            it will match this filter.1319713198          - `tool_names: optional array of string`1319913200            List of allowed tool names.1320113202        - `never: optional object { read_only, tool_names }`1320313204          A filter object to specify which tools are allowed.1320513206          - `read_only: optional boolean`1320713208            Indicates whether or not a tool modifies data or is read-only. If an13209            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13210            it will match this filter.1321113212          - `tool_names: optional array of string`1321313214            List of allowed tool names.1321513216      - `McpToolApprovalSetting = "always" or "never"`1321713218        Specify a single approval policy for all tools. One of `always` or13219        `never`. When set to `always`, all tools will require approval. When13220        set to `never`, all tools will not require approval.1322113222        - `"always"`1322313224        - `"never"`1322513226    - `server_description: optional string`1322713228      Optional description of the MCP server, used to provide more context.1322913230    - `server_url: optional string`1323113232      The URL for the MCP server. One of `server_url`, `connector_id`, or13233      `tunnel_id` must be provided.1323413235    - `tunnel_id: optional string`1323613237      The Secure MCP Tunnel ID to use instead of a direct server URL. One of13238      `server_url`, `connector_id`, or `tunnel_id` must be provided.1323913240### Realtime Tools Config Union1324113242- `RealtimeToolsConfigUnion = RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`1324313244  Give the model access to additional tools via remote Model Context Protocol13245  (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1324613247  - `RealtimeFunctionTool object { description, name, parameters, type }`1324813249    - `description: optional string`1325013251      The description of the function, including guidance on when and how13252      to call it, and guidance about what to tell the user when calling13253      (if anything).1325413255    - `name: optional string`1325613257      The name of the function.1325813259    - `parameters: optional unknown`1326013261      Parameters of the function in JSON Schema.1326213263    - `type: optional "function"`1326413265      The type of the tool, i.e. `function`.1326613267      - `"function"`1326813269  - `McpTool object { server_label, type, allowed_callers, 9 more }`1327013271    Give the model access to additional tools via remote Model Context Protocol13272    (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1327313274    - `server_label: string`1327513276      A label for this MCP server, used to identify it in tool calls.1327713278    - `type: "mcp"`1327913280      The type of the MCP tool. Always `mcp`.1328113282      - `"mcp"`1328313284    - `allowed_callers: optional array of "direct" or "programmatic" or null`1328513286      The tool invocation context(s).1328713288      - `"direct"`1328913290      - `"programmatic"`1329113292    - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1329313294      List of allowed tool names or a filter object.1329513296      - `McpAllowedTools = array of string`1329713298        A string array of allowed tool names1329913300      - `McpToolFilter object { read_only, tool_names }`1330113302        A filter object to specify which tools are allowed.1330313304        - `read_only: optional boolean`1330513306          Indicates whether or not a tool modifies data or is read-only. If an13307          MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13308          it will match this filter.1330913310        - `tool_names: optional array of string`1331113312          List of allowed tool names.1331313314    - `authorization: optional string`1331513316      An OAuth access token that can be used with a remote MCP server, either13317      with a custom MCP server URL or a service connector. Your application13318      must handle the OAuth authorization flow and provide the token here.1331913320    - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1332113322      Identifier for service connectors, like those available in ChatGPT. One of13323      `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more13324      about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1332513326      This field is deprecated for models released after September 1, 2026.13327      Use `server_url` to connect to a remote MCP server, or `tunnel_id` to13328      connect through a Secure MCP Tunnel.1332913330      Currently supported `connector_id` values are:1333113332      - Dropbox: `connector_dropbox`13333      - Gmail: `connector_gmail`13334      - Google Calendar: `connector_googlecalendar`13335      - Google Drive: `connector_googledrive`13336      - Microsoft Teams: `connector_microsoftteams`13337      - Outlook Calendar: `connector_outlookcalendar`13338      - Outlook Email: `connector_outlookemail`13339      - SharePoint: `connector_sharepoint`1334013341      - `"connector_dropbox"`1334213343      - `"connector_gmail"`1334413345      - `"connector_googlecalendar"`1334613347      - `"connector_googledrive"`1334813349      - `"connector_microsoftteams"`1335013351      - `"connector_outlookcalendar"`1335213353      - `"connector_outlookemail"`1335413355      - `"connector_sharepoint"`1335613357    - `defer_loading: optional boolean`1335813359      Whether this MCP tool is deferred and discovered via tool search.1336013361    - `headers: optional map[string] or null`1336213363      Optional HTTP headers to send to the MCP server. Use for authentication13364      or other purposes.1336513366    - `require_approval: optional object { always, never }  or "always" or "never" or null`1336713368      Specify which of the MCP server's tools require approval.1336913370      - `McpToolApprovalFilter object { always, never }`1337113372        Specify which of the MCP server's tools require approval. Can be13373        `always`, `never`, or a filter object associated with tools13374        that require approval.1337513376        - `always: optional object { read_only, tool_names }`1337713378          A filter object to specify which tools are allowed.1337913380          - `read_only: optional boolean`1338113382            Indicates whether or not a tool modifies data or is read-only. If an13383            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13384            it will match this filter.1338513386          - `tool_names: optional array of string`1338713388            List of allowed tool names.1338913390        - `never: optional object { read_only, tool_names }`1339113392          A filter object to specify which tools are allowed.1339313394          - `read_only: optional boolean`1339513396            Indicates whether or not a tool modifies data or is read-only. If an13397            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),13398            it will match this filter.1339913400          - `tool_names: optional array of string`1340113402            List of allowed tool names.1340313404      - `McpToolApprovalSetting = "always" or "never"`1340513406        Specify a single approval policy for all tools. One of `always` or13407        `never`. When set to `always`, all tools will require approval. When13408        set to `never`, all tools will not require approval.1340913410        - `"always"`1341113412        - `"never"`1341313414    - `server_description: optional string`1341513416      Optional description of the MCP server, used to provide more context.1341713418    - `server_url: optional string`1341913420      The URL for the MCP server. One of `server_url`, `connector_id`, or13421      `tunnel_id` must be provided.1342213423    - `tunnel_id: optional string`1342413425      The Secure MCP Tunnel ID to use instead of a direct server URL. One of13426      `server_url`, `connector_id`, or `tunnel_id` must be provided.1342713428### Realtime Tracing Config1342913430- `RealtimeTracingConfig = "auto" or object { group_id, metadata, workflow_name }`1343113432  Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once13433  tracing is enabled for a session, the configuration cannot be modified.1343413435  `auto` will create a trace for the session with default values for the13436  workflow name, group id, and metadata.1343713438  - `Auto = "auto"`1343913440    Enables tracing and sets default values for tracing configuration options. Always `auto`.1344113442    - `"auto"`1344313444  - `TracingConfiguration object { group_id, metadata, workflow_name }`1344513446    Granular configuration for tracing.1344713448    - `group_id: optional string`1344913450      The group id to attach to this trace to enable filtering and13451      grouping in the Traces Dashboard.1345213453    - `metadata: optional unknown`1345413455      The arbitrary metadata to attach to this trace to enable13456      filtering in the Traces Dashboard.1345713458    - `workflow_name: optional string`1345913460      The name of the workflow to attach to this trace. This is used to13461      name the trace in the Traces Dashboard.1346213463### Realtime Transcription Session Audio1346413465- `RealtimeTranscriptionSessionAudio object { input }`1346613467  Configuration for input and output audio.1346813469  - `input: optional RealtimeTranscriptionSessionAudioInput`1347013471    - `format: optional RealtimeAudioFormats`1347213473      The PCM audio format. Only a 24kHz sample rate is supported.1347413475      - `PCMAudio object { rate, type }`1347613477        The PCM audio format. Only a 24kHz sample rate is supported.1347813479        - `rate: optional 24000`1348013481          The sample rate of the audio. Always `24000`.1348213483          - `24000`1348413485        - `type: optional "audio/pcm"`1348613487          The audio format. Always `audio/pcm`.1348813489          - `"audio/pcm"`1349013491      - `PCMUAudio object { type }`1349213493        The G.711 μ-law format.1349413495        - `type: optional "audio/pcmu"`1349613497          The audio format. Always `audio/pcmu`.1349813499          - `"audio/pcmu"`1350013501      - `PCMAAudio object { type }`1350213503        The G.711 A-law format.1350413505        - `type: optional "audio/pcma"`1350613507          The audio format. Always `audio/pcma`.1350813509          - `"audio/pcma"`1351013511    - `noise_reduction: optional object { type }`1351213513      Configuration for input audio noise reduction. This can be set to `null` to turn off.13514      Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.13515      Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1351613517      - `type: optional NoiseReductionType`1351813519        Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1352013521        - `"near_field"`1352213523        - `"far_field"`1352413525    - `transcription: optional AudioTranscription`1352613527      Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1352813529      - `delay: optional "minimal" or "low" or "medium" or 2 more`1353013531        Controls how long the model waits before emitting transcription text.13532        Higher values can improve transcription accuracy at the cost of latency.13533        Only supported with `gpt-realtime-whisper` in GA Realtime sessions.1353413535        - `"minimal"`1353613537        - `"low"`1353813539        - `"medium"`1354013541        - `"high"`1354213543        - `"xhigh"`1354413545      - `keywords: optional array of string`1354613547        Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1354813549      - `language: optional string`1355013551        The language of the input audio. Supplying the input language in13552        [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format13553        will improve accuracy and latency.1355413555      - `languages: optional array of string`1355613557        Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1355813559      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1356013561        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1356213563        - `string`1356413565        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1356613567          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1356813569          - `"whisper-1"`1357013571          - `"gpt-transcribe"`1357213573          - `"gpt-live-transcribe"`1357413575          - `"gpt-4o-mini-transcribe"`1357613577          - `"gpt-4o-mini-transcribe-2025-12-15"`1357813579          - `"gpt-4o-transcribe"`1358013581          - `"gpt-4o-transcribe-diarize"`1358213583          - `"gpt-realtime-whisper"`1358413585      - `prompt: optional string`1358613587        An optional text to guide the model's style or continue a previous audio13588        segment.13589        For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).13590        For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".13591        Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.1359213593    - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`1359413595      Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1359613597      Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1359813599      Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1360013601      For `gpt-realtime-whisper` transcription sessions, turn detection must be13602      set to `null`; VAD is not supported.1360313604      - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1360513606        Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1360713608        - `type: "server_vad"`1360913610          Type of turn detection, `server_vad` to turn on simple Server VAD.1361113612          - `"server_vad"`1361313614        - `create_response: optional boolean`1361513616          Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1361713618          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1361913620        - `idle_timeout_ms: optional number or null`1362113622          Optional timeout after which a model response will be triggered automatically. This is13623          useful for situations in which a long pause from the user is unexpected, such as a phone13624          call. The model will effectively prompt the user to continue the conversation based13625          on the current context.1362613627          The timeout value will be applied after the last model response's audio has finished playing,13628          i.e. it's set to the `response.done` time plus audio playback duration.1362913630          An `input_audio_buffer.timeout_triggered` event (plus events13631          associated with the Response) will be emitted when the timeout is reached.13632          Idle timeout is currently only supported for `server_vad` mode.1363313634        - `interrupt_response: optional boolean`1363513636          Whether or not to automatically interrupt (cancel) any ongoing response with output to the default13637          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1363813639          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1364013641        - `prefix_padding_ms: optional number`1364213643          Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in13644          milliseconds). Defaults to 300ms.1364513646        - `silence_duration_ms: optional number`1364713648          Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults13649          to 500ms. With shorter values the model will respond more quickly,13650          but may jump in on short pauses from the user.1365113652        - `threshold: optional number`1365313654          Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A13655          higher threshold will require louder audio to activate the model, and13656          thus might perform better in noisy environments.1365713658      - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1365913660        Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1366113662        - `type: "semantic_vad"`1366313664          Type of turn detection, `semantic_vad` to turn on Semantic VAD.1366513666          - `"semantic_vad"`1366713668        - `create_response: optional boolean`1366913670          Whether or not to automatically generate a response when a VAD stop event occurs.1367113672        - `eagerness: optional "low" or "medium" or "high" or "auto"`1367313674          Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1367513676          - `"low"`1367713678          - `"medium"`1367913680          - `"high"`1368113682          - `"auto"`1368313684        - `interrupt_response: optional boolean`1368513686          Whether or not to automatically interrupt any ongoing response with output to the default13687          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1368813689### Realtime Transcription Session Audio Input1369013691- `RealtimeTranscriptionSessionAudioInput object { format, noise_reduction, transcription, turn_detection }`1369213693  - `format: optional RealtimeAudioFormats`1369413695    The PCM audio format. Only a 24kHz sample rate is supported.1369613697    - `PCMAudio object { rate, type }`1369813699      The PCM audio format. Only a 24kHz sample rate is supported.1370013701      - `rate: optional 24000`1370213703        The sample rate of the audio. Always `24000`.1370413705        - `24000`1370613707      - `type: optional "audio/pcm"`1370813709        The audio format. Always `audio/pcm`.1371013711        - `"audio/pcm"`1371213713    - `PCMUAudio object { type }`1371413715      The G.711 μ-law format.1371613717      - `type: optional "audio/pcmu"`1371813719        The audio format. Always `audio/pcmu`.1372013721        - `"audio/pcmu"`1372213723    - `PCMAAudio object { type }`1372413725      The G.711 A-law format.1372613727      - `type: optional "audio/pcma"`1372813729        The audio format. Always `audio/pcma`.1373013731        - `"audio/pcma"`1373213733  - `noise_reduction: optional object { type }`1373413735    Configuration for input audio noise reduction. This can be set to `null` to turn off.13736    Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.13737    Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1373813739    - `type: optional NoiseReductionType`1374013741      Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1374213743      - `"near_field"`1374413745      - `"far_field"`1374613747  - `transcription: optional AudioTranscription`1374813749    Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1375013751    - `delay: optional "minimal" or "low" or "medium" or 2 more`1375213753      Controls how long the model waits before emitting transcription text.13754      Higher values can improve transcription accuracy at the cost of latency.13755      Only supported with `gpt-realtime-whisper` in GA Realtime sessions.1375613757      - `"minimal"`1375813759      - `"low"`1376013761      - `"medium"`1376213763      - `"high"`1376413765      - `"xhigh"`1376613767    - `keywords: optional array of string`1376813769      Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1377013771    - `language: optional string`1377213773      The language of the input audio. Supplying the input language in13774      [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format13775      will improve accuracy and latency.1377613777    - `languages: optional array of string`1377813779      Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1378013781    - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1378213783      The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1378413785      - `string`1378613787      - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1378813789        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1379013791        - `"whisper-1"`1379213793        - `"gpt-transcribe"`1379413795        - `"gpt-live-transcribe"`1379613797        - `"gpt-4o-mini-transcribe"`1379813799        - `"gpt-4o-mini-transcribe-2025-12-15"`1380013801        - `"gpt-4o-transcribe"`1380213803        - `"gpt-4o-transcribe-diarize"`1380413805        - `"gpt-realtime-whisper"`1380613807    - `prompt: optional string`1380813809      An optional text to guide the model's style or continue a previous audio13810      segment.13811      For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).13812      For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".13813      Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.1381413815  - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`1381613817    Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1381813819    Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1382013821    Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1382213823    For `gpt-realtime-whisper` transcription sessions, turn detection must be13824    set to `null`; VAD is not supported.1382513826    - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1382713828      Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1382913830      - `type: "server_vad"`1383113832        Type of turn detection, `server_vad` to turn on simple Server VAD.1383313834        - `"server_vad"`1383513836      - `create_response: optional boolean`1383713838        Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1383913840        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1384113842      - `idle_timeout_ms: optional number or null`1384313844        Optional timeout after which a model response will be triggered automatically. This is13845        useful for situations in which a long pause from the user is unexpected, such as a phone13846        call. The model will effectively prompt the user to continue the conversation based13847        on the current context.1384813849        The timeout value will be applied after the last model response's audio has finished playing,13850        i.e. it's set to the `response.done` time plus audio playback duration.1385113852        An `input_audio_buffer.timeout_triggered` event (plus events13853        associated with the Response) will be emitted when the timeout is reached.13854        Idle timeout is currently only supported for `server_vad` mode.1385513856      - `interrupt_response: optional boolean`1385713858        Whether or not to automatically interrupt (cancel) any ongoing response with output to the default13859        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1386013861        If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1386213863      - `prefix_padding_ms: optional number`1386413865        Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in13866        milliseconds). Defaults to 300ms.1386713868      - `silence_duration_ms: optional number`1386913870        Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults13871        to 500ms. With shorter values the model will respond more quickly,13872        but may jump in on short pauses from the user.1387313874      - `threshold: optional number`1387513876        Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A13877        higher threshold will require louder audio to activate the model, and13878        thus might perform better in noisy environments.1387913880    - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1388113882      Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1388313884      - `type: "semantic_vad"`1388513886        Type of turn detection, `semantic_vad` to turn on Semantic VAD.1388713888        - `"semantic_vad"`1388913890      - `create_response: optional boolean`1389113892        Whether or not to automatically generate a response when a VAD stop event occurs.1389313894      - `eagerness: optional "low" or "medium" or "high" or "auto"`1389513896        Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1389713898        - `"low"`1389913900        - `"medium"`1390113902        - `"high"`1390313904        - `"auto"`1390513906      - `interrupt_response: optional boolean`1390713908        Whether or not to automatically interrupt any ongoing response with output to the default13909        conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1391013911### Realtime Transcription Session Audio Input Turn Detection1391213913- `RealtimeTranscriptionSessionAudioInputTurnDetection = object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }`1391413915  Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1391613917  Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1391813919  Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1392013921  For `gpt-realtime-whisper` transcription sessions, turn detection must be13922  set to `null`; VAD is not supported.1392313924  - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1392513926    Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1392713928    - `type: "server_vad"`1392913930      Type of turn detection, `server_vad` to turn on simple Server VAD.1393113932      - `"server_vad"`1393313934    - `create_response: optional boolean`1393513936      Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1393713938      If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1393913940    - `idle_timeout_ms: optional number or null`1394113942      Optional timeout after which a model response will be triggered automatically. This is13943      useful for situations in which a long pause from the user is unexpected, such as a phone13944      call. The model will effectively prompt the user to continue the conversation based13945      on the current context.1394613947      The timeout value will be applied after the last model response's audio has finished playing,13948      i.e. it's set to the `response.done` time plus audio playback duration.1394913950      An `input_audio_buffer.timeout_triggered` event (plus events13951      associated with the Response) will be emitted when the timeout is reached.13952      Idle timeout is currently only supported for `server_vad` mode.1395313954    - `interrupt_response: optional boolean`1395513956      Whether or not to automatically interrupt (cancel) any ongoing response with output to the default13957      conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1395813959      If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1396013961    - `prefix_padding_ms: optional number`1396213963      Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in13964      milliseconds). Defaults to 300ms.1396513966    - `silence_duration_ms: optional number`1396713968      Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults13969      to 500ms. With shorter values the model will respond more quickly,13970      but may jump in on short pauses from the user.1397113972    - `threshold: optional number`1397313974      Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A13975      higher threshold will require louder audio to activate the model, and13976      thus might perform better in noisy environments.1397713978  - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1397913980    Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1398113982    - `type: "semantic_vad"`1398313984      Type of turn detection, `semantic_vad` to turn on Semantic VAD.1398513986      - `"semantic_vad"`1398713988    - `create_response: optional boolean`1398913990      Whether or not to automatically generate a response when a VAD stop event occurs.1399113992    - `eagerness: optional "low" or "medium" or "high" or "auto"`1399313994      Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1399513996      - `"low"`1399713998      - `"medium"`1399914000      - `"high"`1400114002      - `"auto"`1400314004    - `interrupt_response: optional boolean`1400514006      Whether or not to automatically interrupt any ongoing response with output to the default14007      conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1400814009### Realtime Transcription Session Create Request1401014011- `RealtimeTranscriptionSessionCreateRequest object { type, audio, include }`1401214013  Realtime transcription session object configuration.1401414015  - `type: "transcription"`1401614017    The type of session to create. Always `transcription` for transcription sessions.1401814019    - `"transcription"`1402014021  - `audio: optional RealtimeTranscriptionSessionAudio`1402214023    Configuration for input and output audio.1402414025    - `input: optional RealtimeTranscriptionSessionAudioInput`1402614027      - `format: optional RealtimeAudioFormats`1402814029        The PCM audio format. Only a 24kHz sample rate is supported.1403014031        - `PCMAudio object { rate, type }`1403214033          The PCM audio format. Only a 24kHz sample rate is supported.1403414035          - `rate: optional 24000`1403614037            The sample rate of the audio. Always `24000`.1403814039            - `24000`1404014041          - `type: optional "audio/pcm"`1404214043            The audio format. Always `audio/pcm`.1404414045            - `"audio/pcm"`1404614047        - `PCMUAudio object { type }`1404814049          The G.711 μ-law format.1405014051          - `type: optional "audio/pcmu"`1405214053            The audio format. Always `audio/pcmu`.1405414055            - `"audio/pcmu"`1405614057        - `PCMAAudio object { type }`1405814059          The G.711 A-law format.1406014061          - `type: optional "audio/pcma"`1406214063            The audio format. Always `audio/pcma`.1406414065            - `"audio/pcma"`1406614067      - `noise_reduction: optional object { type }`1406814069        Configuration for input audio noise reduction. This can be set to `null` to turn off.14070        Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.14071        Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1407214073        - `type: optional NoiseReductionType`1407414075          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1407614077          - `"near_field"`1407814079          - `"far_field"`1408014081      - `transcription: optional AudioTranscription`1408214083        Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1408414085        - `delay: optional "minimal" or "low" or "medium" or 2 more`1408614087          Controls how long the model waits before emitting transcription text.14088          Higher values can improve transcription accuracy at the cost of latency.14089          Only supported with `gpt-realtime-whisper` in GA Realtime sessions.1409014091          - `"minimal"`1409214093          - `"low"`1409414095          - `"medium"`1409614097          - `"high"`1409814099          - `"xhigh"`1410014101        - `keywords: optional array of string`1410214103          Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1410414105        - `language: optional string`1410614107          The language of the input audio. Supplying the input language in14108          [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format14109          will improve accuracy and latency.1411014111        - `languages: optional array of string`1411214113          Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.1411414115        - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1411614117          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1411814119          - `string`1412014121          - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1412214123            The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.1412414125            - `"whisper-1"`1412614127            - `"gpt-transcribe"`1412814129            - `"gpt-live-transcribe"`1413014131            - `"gpt-4o-mini-transcribe"`1413214133            - `"gpt-4o-mini-transcribe-2025-12-15"`1413414135            - `"gpt-4o-transcribe"`1413614137            - `"gpt-4o-transcribe-diarize"`1413814139            - `"gpt-realtime-whisper"`1414014141        - `prompt: optional string`1414214143          An optional text to guide the model's style or continue a previous audio14144          segment.14145          For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).14146          For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".14147          Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.1414814149      - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`1415014151        Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1415214153        Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1415414155        Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1415614157        For `gpt-realtime-whisper` transcription sessions, turn detection must be14158        set to `null`; VAD is not supported.1415914160        - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1416114162          Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1416314164          - `type: "server_vad"`1416514166            Type of turn detection, `server_vad` to turn on simple Server VAD.1416714168            - `"server_vad"`1416914170          - `create_response: optional boolean`1417114172            Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1417314174            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1417514176          - `idle_timeout_ms: optional number or null`1417714178            Optional timeout after which a model response will be triggered automatically. This is14179            useful for situations in which a long pause from the user is unexpected, such as a phone14180            call. The model will effectively prompt the user to continue the conversation based14181            on the current context.1418214183            The timeout value will be applied after the last model response's audio has finished playing,14184            i.e. it's set to the `response.done` time plus audio playback duration.1418514186            An `input_audio_buffer.timeout_triggered` event (plus events14187            associated with the Response) will be emitted when the timeout is reached.14188            Idle timeout is currently only supported for `server_vad` mode.1418914190          - `interrupt_response: optional boolean`1419114192            Whether or not to automatically interrupt (cancel) any ongoing response with output to the default14193            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1419414195            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1419614197          - `prefix_padding_ms: optional number`1419814199            Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in14200            milliseconds). Defaults to 300ms.1420114202          - `silence_duration_ms: optional number`1420314204            Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults14205            to 500ms. With shorter values the model will respond more quickly,14206            but may jump in on short pauses from the user.1420714208          - `threshold: optional number`1420914210            Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A14211            higher threshold will require louder audio to activate the model, and14212            thus might perform better in noisy environments.1421314214        - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1421514216          Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1421714218          - `type: "semantic_vad"`1421914220            Type of turn detection, `semantic_vad` to turn on Semantic VAD.1422114222            - `"semantic_vad"`1422314224          - `create_response: optional boolean`1422514226            Whether or not to automatically generate a response when a VAD stop event occurs.1422714228          - `eagerness: optional "low" or "medium" or "high" or "auto"`1422914230            Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1423114232            - `"low"`1423314234            - `"medium"`1423514236            - `"high"`1423714238            - `"auto"`1423914240          - `interrupt_response: optional boolean`1424114242            Whether or not to automatically interrupt any ongoing response with output to the default14243            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1424414245  - `include: optional array of "item.input_audio_transcription.logprobs"`1424614247    Additional fields to include in server outputs.1424814249    `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1425014251    - `"item.input_audio_transcription.logprobs"`1425214253### Realtime Translation Client Event1425414255- `RealtimeTranslationClientEvent = RealtimeTranslationSessionUpdateEvent or RealtimeTranslationInputAudioBufferAppendEvent or RealtimeTranslationSessionCloseEvent`1425614257  A Realtime translation client event.1425814259  - `RealtimeTranslationSessionUpdateEvent object { session, type, event_id }`1426014261    Send this event to update the translation session configuration. Translation14262    sessions support updates to `audio.output.language`, `audio.input.transcription`,14263    and `audio.input.noise_reduction`.1426414265    - `session: RealtimeTranslationSessionUpdateRequest`1426614267      Translation session fields to update. The session `type` and `model` are set14268      at creation and cannot be changed with `session.update`.1426914270      - `audio: optional object { input, output }`1427114272        Configuration for translation input and output audio.1427314274        - `input: optional object { noise_reduction, transcription }`1427514276          - `noise_reduction: optional object { type }  or null`1427714278            Optional input noise reduction. Set to `null` to disable it.1427914280            - `type: NoiseReductionType`1428114282              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1428314284              - `"near_field"`1428514286              - `"far_field"`1428714288          - `transcription: optional object { model }  or null`1428914290            Optional source-language transcription. When configured, the server emits14291            `session.input_transcript.delta` events. Translation itself still runs from14292            the input audio stream.1429314294            - `model: string`1429514296              The transcription model to use for source transcript deltas.1429714298        - `output: optional object { language }`1429914300          - `language: optional string`1430114302            Target language for translated output audio and transcript deltas.1430314304    - `type: "session.update"`1430514306      The event type, must be `session.update`.1430714308      - `"session.update"`1430914310    - `event_id: optional string`1431114312      Optional client-generated ID used to identify this event.1431314314  - `RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id }`1431514316    Send this event to append audio bytes to the translation session input audio buffer.1431714318    WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono14319    little-endian raw audio bytes. Unsupported websocket audio formats return a14320    validation error because lower-quality audio materially degrades translation14321    quality.1432214323    Translation consumes 200 ms engine frames. For best realtime behavior, append14324    audio in 200 ms chunks. If a chunk is shorter, the server buffers it until it14325    has enough audio for one frame. If a chunk is longer, the server splits it into14326    200 ms frames and enqueues them back-to-back.1432714328    Keep appending silence while the session is active. If a client stops sending14329    audio and later resumes, model time treats the resumed audio as contiguous with14330    the previous audio rather than as a real-world pause.1433114332    - `audio: string`1433314334      Base64-encoded 24 kHz PCM16 mono audio bytes.1433514336    - `type: "session.input_audio_buffer.append"`1433714338      The event type, must be `session.input_audio_buffer.append`.1433914340      - `"session.input_audio_buffer.append"`1434114342    - `event_id: optional string`1434314344      Optional client-generated ID used to identify this event.1434514346  - `RealtimeTranslationSessionCloseEvent object { type, event_id }`1434714348    Gracefully close the realtime translation session. The server flushes pending14349    input audio and emits any remaining translated output before closing the14350    session.1435114352    - `type: "session.close"`1435314354      The event type, must be `session.close`.1435514356      - `"session.close"`1435714358    - `event_id: optional string`1435914360      Optional client-generated ID used to identify this event.1436114362### Realtime Translation Client Secret Create Request1436314364- `RealtimeTranslationClientSecretCreateRequest object { session, expires_after }`1436514366  Create a translation session and client secret for the Realtime API.1436714368  - `session: RealtimeTranslationSessionCreateRequest`1436914370    Realtime translation session configuration. Translation sessions stream source14371    audio in and translated audio plus transcript deltas out continuously.1437214373    - `model: string`1437414375      The Realtime translation model used for this session.1437614377    - `audio: optional object { input, output }`1437814379      Configuration for translation input and output audio.1438014381      - `input: optional object { noise_reduction, transcription }`1438214383        - `noise_reduction: optional object { type }  or null`1438414385          Optional input noise reduction. Set to `null` to disable it.1438614387          - `type: NoiseReductionType`1438814389            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1439014391            - `"near_field"`1439214393            - `"far_field"`1439414395        - `transcription: optional object { model }  or null`1439614397          Optional source-language transcription. When configured, the server emits14398          `session.input_transcript.delta` events. Translation itself still runs from14399          the input audio stream.1440014401          - `model: string`1440214403            The transcription model to use for source transcript deltas.1440414405      - `output: optional object { language }`1440614407        - `language: optional string`1440814409          Target language for translated output audio and transcript deltas.1441014411  - `expires_after: optional object { anchor, seconds }`1441214413    Configuration for the client secret expiration. Expiration refers to the time after which14414    a client secret will no longer be valid for creating sessions. The session itself may14415    continue after that time once started. A secret can be used to create multiple sessions14416    until it expires.1441714418    - `anchor: optional "created_at"`1441914420      The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.1442114422      - `"created_at"`1442314424    - `seconds: optional number`1442514426      The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.1442714428### Realtime Translation Client Secret Create Response1442914430- `RealtimeTranslationClientSecretCreateResponse object { expires_at, session, value }`1443114432  Response from creating a translation session and client secret for the Realtime API.1443314434  - `expires_at: number`1443514436    Expiration timestamp for the client secret, in seconds since epoch.1443714438  - `session: RealtimeTranslationSession`1443914440    A Realtime translation session. Translation sessions continuously translate input14441    audio into the configured output language.1444214443    - `id: string`1444414445      Unique identifier for the session that looks like `sess_1234567890abcdef`.1444614447    - `audio: object { input, output }`1444814449      Configuration for translation input and output audio.1445014451      - `input: optional object { noise_reduction, transcription }`1445214453        - `noise_reduction: optional object { type }  or null`1445414455          Optional input noise reduction.1445614457          - `type: NoiseReductionType`1445814459            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1446014461            - `"near_field"`1446214463            - `"far_field"`1446414465        - `transcription: optional object { model }  or null`1446614467          Optional source-language transcription. When configured, the server emits14468          `session.input_transcript.delta` events. Translation itself still runs from14469          the input audio stream.1447014471          - `model: string`1447214473            The transcription model used for source transcript deltas.1447414475      - `output: optional object { language }`1447614477        - `language: optional string`1447814479          Target language for translated output audio and transcript deltas.1448014481    - `expires_at: number`1448214483      Expiration timestamp for the session, in seconds since epoch.1448414485    - `model: string`1448614487      The Realtime translation model used for this session. This field is set at14488      session creation and cannot be changed with `session.update`.1448914490    - `type: "translation"`1449114492      The session type. Always `translation` for Realtime translation sessions.1449314494      - `"translation"`1449514496  - `value: string`1449714498    The generated client secret value.1449914500### Realtime Translation Input Audio Buffer Append Event1450114502- `RealtimeTranslationInputAudioBufferAppendEvent object { audio, type, event_id }`1450314504  Send this event to append audio bytes to the translation session input audio buffer.1450514506  WebSocket translation sessions accept base64-encoded 24 kHz PCM16 mono14507  little-endian raw audio bytes. Unsupported websocket audio formats return a14508  validation error because lower-quality audio materially degrades translation14509  quality.1451014511  Translation consumes 200 ms engine frames. For best realtime behavior, append14512  audio in 200 ms chunks. If a chunk is shorter, the server buffers it until it14513  has enough audio for one frame. If a chunk is longer, the server splits it into14514  200 ms frames and enqueues them back-to-back.1451514516  Keep appending silence while the session is active. If a client stops sending14517  audio and later resumes, model time treats the resumed audio as contiguous with14518  the previous audio rather than as a real-world pause.1451914520  - `audio: string`1452114522    Base64-encoded 24 kHz PCM16 mono audio bytes.1452314524  - `type: "session.input_audio_buffer.append"`1452514526    The event type, must be `session.input_audio_buffer.append`.1452714528    - `"session.input_audio_buffer.append"`1452914530  - `event_id: optional string`1453114532    Optional client-generated ID used to identify this event.1453314534### Realtime Translation Input Transcript Delta Event1453514536- `RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms }`1453714538  Returned when optional source-language transcript text is available. This event14539  is emitted only when `audio.input.transcription` is configured.1454014541  Transcript deltas are append-only text fragments. Clients should not insert14542  unconditional spaces between deltas.1454314544  - `delta: string`1454514546    Append-only source-language transcript text.1454714548  - `event_id: string`1454914550    The unique ID of the server event.1455114552  - `type: "session.input_transcript.delta"`1455314554    The event type, must be `session.input_transcript.delta`.1455514556    - `"session.input_transcript.delta"`1455714558  - `elapsed_ms: optional number or null`1455914560    Timing metadata for stream alignment, derived from the translation frame14561    when available. It advances in 200 ms increments, but multiple transcript14562    deltas may share the same `elapsed_ms`. Treat it as alignment metadata,14563    not a unique transcript-delta identifier.1456414565### Realtime Translation Output Audio Delta Event1456614567- `RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more }`1456814569  Returned when translated output audio is available. The `delta` contains a14570  PCM16 audio chunk whose length can vary. Clients should decode and queue the14571  complete delta instead of assuming a fixed byte or sample count.1457214573  - `delta: string`1457414575    Base64-encoded translated audio data.1457614577  - `event_id: string`1457814579    The unique ID of the server event.1458014581  - `type: "session.output_audio.delta"`1458214583    The event type, must be `session.output_audio.delta`.1458414585    - `"session.output_audio.delta"`1458614587  - `channels: optional number`1458814589    Number of audio channels.1459014591  - `elapsed_ms: optional number or null`1459214593    Timing metadata for stream alignment, derived from the translation frame14594    when available. Treat `elapsed_ms` as alignment metadata, not a unique14595    event identifier.1459614597  - `format: optional "pcm16"`1459814599    Audio encoding for `delta`.1460014601    - `"pcm16"`1460214603  - `sample_rate: optional number`1460414605    Sample rate of the audio delta.1460614607### Realtime Translation Output Transcript Delta Event1460814609- `RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms }`1461014611  Returned when translated transcript text is available.1461214613  Transcript deltas are append-only text fragments. Clients should not insert14614  unconditional spaces between deltas.1461514616  - `delta: string`1461714618    Append-only transcript text for the translated output audio.1461914620  - `event_id: string`1462114622    The unique ID of the server event.1462314624  - `type: "session.output_transcript.delta"`1462514626    The event type, must be `session.output_transcript.delta`.1462714628    - `"session.output_transcript.delta"`1462914630  - `elapsed_ms: optional number or null`1463114632    Timing metadata for stream alignment, derived from the translation frame14633    when available. It advances in 200 ms increments, but multiple transcript14634    deltas may share the same `elapsed_ms`. Treat it as alignment metadata,14635    not a unique transcript-delta identifier.1463614637### Realtime Translation Server Event1463814639- `RealtimeTranslationServerEvent = RealtimeErrorEvent or RealtimeTranslationSessionCreatedEvent or RealtimeTranslationSessionUpdatedEvent or 4 more`1464014641  A Realtime translation server event.1464214643  - `RealtimeErrorEvent object { error, event_id, type }`1464414645    Returned when an error occurs, which could be a client problem or a server14646    problem. Most errors are recoverable and the session will stay open, we14647    recommend to implementors to monitor and log error messages by default.1464814649    - `error: RealtimeError`1465014651      Details of the error.1465214653      - `message: string`1465414655        A human-readable error message.1465614657      - `type: string`1465814659        The type of error (e.g., "invalid_request_error", "server_error").1466014661      - `code: optional string or null`1466214663        Error code, if any.1466414665      - `event_id: optional string or null`1466614667        The event_id of the client event that caused the error, if applicable.1466814669      - `param: optional string or null`1467014671        Parameter related to the error, if any.1467214673    - `event_id: string`1467414675      The unique ID of the server event.1467614677    - `type: "error"`1467814679      The event type, must be `error`.1468014681      - `"error"`1468214683  - `RealtimeTranslationSessionCreatedEvent object { event_id, session, type }`1468414685    Returned when a translation session is created. Emitted automatically when a14686    new connection is established as the first server event. This event contains14687    the default translation session configuration.1468814689    - `event_id: string`1469014691      The unique ID of the server event.1469214693    - `session: RealtimeTranslationSession`1469414695      The translation session configuration.1469614697      - `id: string`1469814699        Unique identifier for the session that looks like `sess_1234567890abcdef`.1470014701      - `audio: object { input, output }`1470214703        Configuration for translation input and output audio.1470414705        - `input: optional object { noise_reduction, transcription }`1470614707          - `noise_reduction: optional object { type }  or null`1470814709            Optional input noise reduction.1471014711            - `type: NoiseReductionType`1471214713              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1471414715              - `"near_field"`1471614717              - `"far_field"`1471814719          - `transcription: optional object { model }  or null`1472014721            Optional source-language transcription. When configured, the server emits14722            `session.input_transcript.delta` events. Translation itself still runs from14723            the input audio stream.1472414725            - `model: string`1472614727              The transcription model used for source transcript deltas.1472814729        - `output: optional object { language }`1473014731          - `language: optional string`1473214733            Target language for translated output audio and transcript deltas.1473414735      - `expires_at: number`1473614737        Expiration timestamp for the session, in seconds since epoch.1473814739      - `model: string`1474014741        The Realtime translation model used for this session. This field is set at14742        session creation and cannot be changed with `session.update`.1474314744      - `type: "translation"`1474514746        The session type. Always `translation` for Realtime translation sessions.1474714748        - `"translation"`1474914750    - `type: "session.created"`1475114752      The event type, must be `session.created`.1475314754      - `"session.created"`1475514756  - `RealtimeTranslationSessionUpdatedEvent object { event_id, session, type }`1475714758    Returned when a translation session is updated with a `session.update` event,14759    unless there is an error.1476014761    - `event_id: string`1476214763      The unique ID of the server event.1476414765    - `session: RealtimeTranslationSession`1476614767      The translation session configuration.1476814769    - `type: "session.updated"`1477014771      The event type, must be `session.updated`.1477214773      - `"session.updated"`1477414775  - `RealtimeTranslationSessionClosedEvent object { event_id, type }`1477614777    Returned when a realtime translation session is closed.1477814779    - `event_id: string`1478014781      The unique ID of the server event.1478214783    - `type: "session.closed"`1478414785      The event type, must be `session.closed`.1478614787      - `"session.closed"`1478814789  - `RealtimeTranslationInputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms }`1479014791    Returned when optional source-language transcript text is available. This event14792    is emitted only when `audio.input.transcription` is configured.1479314794    Transcript deltas are append-only text fragments. Clients should not insert14795    unconditional spaces between deltas.1479614797    - `delta: string`1479814799      Append-only source-language transcript text.1480014801    - `event_id: string`1480214803      The unique ID of the server event.1480414805    - `type: "session.input_transcript.delta"`1480614807      The event type, must be `session.input_transcript.delta`.1480814809      - `"session.input_transcript.delta"`1481014811    - `elapsed_ms: optional number or null`1481214813      Timing metadata for stream alignment, derived from the translation frame14814      when available. It advances in 200 ms increments, but multiple transcript14815      deltas may share the same `elapsed_ms`. Treat it as alignment metadata,14816      not a unique transcript-delta identifier.1481714818  - `RealtimeTranslationOutputTranscriptDeltaEvent object { delta, event_id, type, elapsed_ms }`1481914820    Returned when translated transcript text is available.1482114822    Transcript deltas are append-only text fragments. Clients should not insert14823    unconditional spaces between deltas.1482414825    - `delta: string`1482614827      Append-only transcript text for the translated output audio.1482814829    - `event_id: string`1483014831      The unique ID of the server event.1483214833    - `type: "session.output_transcript.delta"`1483414835      The event type, must be `session.output_transcript.delta`.1483614837      - `"session.output_transcript.delta"`1483814839    - `elapsed_ms: optional number or null`1484014841      Timing metadata for stream alignment, derived from the translation frame14842      when available. It advances in 200 ms increments, but multiple transcript14843      deltas may share the same `elapsed_ms`. Treat it as alignment metadata,14844      not a unique transcript-delta identifier.1484514846  - `RealtimeTranslationOutputAudioDeltaEvent object { delta, event_id, type, 4 more }`1484714848    Returned when translated output audio is available. The `delta` contains a14849    PCM16 audio chunk whose length can vary. Clients should decode and queue the14850    complete delta instead of assuming a fixed byte or sample count.1485114852    - `delta: string`1485314854      Base64-encoded translated audio data.1485514856    - `event_id: string`1485714858      The unique ID of the server event.1485914860    - `type: "session.output_audio.delta"`1486114862      The event type, must be `session.output_audio.delta`.1486314864      - `"session.output_audio.delta"`1486514866    - `channels: optional number`1486714868      Number of audio channels.1486914870    - `elapsed_ms: optional number or null`1487114872      Timing metadata for stream alignment, derived from the translation frame14873      when available. Treat `elapsed_ms` as alignment metadata, not a unique14874      event identifier.1487514876    - `format: optional "pcm16"`1487714878      Audio encoding for `delta`.1487914880      - `"pcm16"`1488114882    - `sample_rate: optional number`1488314884      Sample rate of the audio delta.1488514886### Realtime Translation Session1488714888- `RealtimeTranslationSession object { id, audio, expires_at, 2 more }`1488914890  A Realtime translation session. Translation sessions continuously translate input14891  audio into the configured output language.1489214893  - `id: string`1489414895    Unique identifier for the session that looks like `sess_1234567890abcdef`.1489614897  - `audio: object { input, output }`1489814899    Configuration for translation input and output audio.1490014901    - `input: optional object { noise_reduction, transcription }`1490214903      - `noise_reduction: optional object { type }  or null`1490414905        Optional input noise reduction.1490614907        - `type: NoiseReductionType`1490814909          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1491014911          - `"near_field"`1491214913          - `"far_field"`1491414915      - `transcription: optional object { model }  or null`1491614917        Optional source-language transcription. When configured, the server emits14918        `session.input_transcript.delta` events. Translation itself still runs from14919        the input audio stream.1492014921        - `model: string`1492214923          The transcription model used for source transcript deltas.1492414925    - `output: optional object { language }`1492614927      - `language: optional string`1492814929        Target language for translated output audio and transcript deltas.1493014931  - `expires_at: number`1493214933    Expiration timestamp for the session, in seconds since epoch.1493414935  - `model: string`1493614937    The Realtime translation model used for this session. This field is set at14938    session creation and cannot be changed with `session.update`.1493914940  - `type: "translation"`1494114942    The session type. Always `translation` for Realtime translation sessions.1494314944    - `"translation"`1494514946### Realtime Translation Session Close Event1494714948- `RealtimeTranslationSessionCloseEvent object { type, event_id }`1494914950  Gracefully close the realtime translation session. The server flushes pending14951  input audio and emits any remaining translated output before closing the14952  session.1495314954  - `type: "session.close"`1495514956    The event type, must be `session.close`.1495714958    - `"session.close"`1495914960  - `event_id: optional string`1496114962    Optional client-generated ID used to identify this event.1496314964### Realtime Translation Session Closed Event1496514966- `RealtimeTranslationSessionClosedEvent object { event_id, type }`1496714968  Returned when a realtime translation session is closed.1496914970  - `event_id: string`1497114972    The unique ID of the server event.1497314974  - `type: "session.closed"`1497514976    The event type, must be `session.closed`.1497714978    - `"session.closed"`1497914980### Realtime Translation Session Create Request1498114982- `RealtimeTranslationSessionCreateRequest object { model, audio }`1498314984  Realtime translation session configuration. Translation sessions stream source14985  audio in and translated audio plus transcript deltas out continuously.1498614987  - `model: string`1498814989    The Realtime translation model used for this session.1499014991  - `audio: optional object { input, output }`1499214993    Configuration for translation input and output audio.1499414995    - `input: optional object { noise_reduction, transcription }`1499614997      - `noise_reduction: optional object { type }  or null`1499814999        Optional input noise reduction. Set to `null` to disable it.1500015001        - `type: NoiseReductionType`1500215003          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1500415005          - `"near_field"`1500615007          - `"far_field"`1500815009      - `transcription: optional object { model }  or null`1501015011        Optional source-language transcription. When configured, the server emits15012        `session.input_transcript.delta` events. Translation itself still runs from15013        the input audio stream.1501415015        - `model: string`1501615017          The transcription model to use for source transcript deltas.1501815019    - `output: optional object { language }`1502015021      - `language: optional string`1502215023        Target language for translated output audio and transcript deltas.1502415025### Realtime Translation Session Created Event1502615027- `RealtimeTranslationSessionCreatedEvent object { event_id, session, type }`1502815029  Returned when a translation session is created. Emitted automatically when a15030  new connection is established as the first server event. This event contains15031  the default translation session configuration.1503215033  - `event_id: string`1503415035    The unique ID of the server event.1503615037  - `session: RealtimeTranslationSession`1503815039    The translation session configuration.1504015041    - `id: string`1504215043      Unique identifier for the session that looks like `sess_1234567890abcdef`.1504415045    - `audio: object { input, output }`1504615047      Configuration for translation input and output audio.1504815049      - `input: optional object { noise_reduction, transcription }`1505015051        - `noise_reduction: optional object { type }  or null`1505215053          Optional input noise reduction.1505415055          - `type: NoiseReductionType`1505615057            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1505815059            - `"near_field"`1506015061            - `"far_field"`1506215063        - `transcription: optional object { model }  or null`1506415065          Optional source-language transcription. When configured, the server emits15066          `session.input_transcript.delta` events. Translation itself still runs from15067          the input audio stream.1506815069          - `model: string`1507015071            The transcription model used for source transcript deltas.1507215073      - `output: optional object { language }`1507415075        - `language: optional string`1507615077          Target language for translated output audio and transcript deltas.1507815079    - `expires_at: number`1508015081      Expiration timestamp for the session, in seconds since epoch.1508215083    - `model: string`1508415085      The Realtime translation model used for this session. This field is set at15086      session creation and cannot be changed with `session.update`.1508715088    - `type: "translation"`1508915090      The session type. Always `translation` for Realtime translation sessions.1509115092      - `"translation"`1509315094  - `type: "session.created"`1509515096    The event type, must be `session.created`.1509715098    - `"session.created"`1509915100### Realtime Translation Session Update Event1510115102- `RealtimeTranslationSessionUpdateEvent object { session, type, event_id }`1510315104  Send this event to update the translation session configuration. Translation15105  sessions support updates to `audio.output.language`, `audio.input.transcription`,15106  and `audio.input.noise_reduction`.1510715108  - `session: RealtimeTranslationSessionUpdateRequest`1510915110    Translation session fields to update. The session `type` and `model` are set15111    at creation and cannot be changed with `session.update`.1511215113    - `audio: optional object { input, output }`1511415115      Configuration for translation input and output audio.1511615117      - `input: optional object { noise_reduction, transcription }`1511815119        - `noise_reduction: optional object { type }  or null`1512015121          Optional input noise reduction. Set to `null` to disable it.1512215123          - `type: NoiseReductionType`1512415125            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1512615127            - `"near_field"`1512815129            - `"far_field"`1513015131        - `transcription: optional object { model }  or null`1513215133          Optional source-language transcription. When configured, the server emits15134          `session.input_transcript.delta` events. Translation itself still runs from15135          the input audio stream.1513615137          - `model: string`1513815139            The transcription model to use for source transcript deltas.1514015141      - `output: optional object { language }`1514215143        - `language: optional string`1514415145          Target language for translated output audio and transcript deltas.1514615147  - `type: "session.update"`1514815149    The event type, must be `session.update`.1515015151    - `"session.update"`1515215153  - `event_id: optional string`1515415155    Optional client-generated ID used to identify this event.1515615157### Realtime Translation Session Update Request1515815159- `RealtimeTranslationSessionUpdateRequest object { audio }`1516015161  Realtime translation session fields that can be updated with `session.update`.1516215163  - `audio: optional object { input, output }`1516415165    Configuration for translation input and output audio.1516615167    - `input: optional object { noise_reduction, transcription }`1516815169      - `noise_reduction: optional object { type }  or null`1517015171        Optional input noise reduction. Set to `null` to disable it.1517215173        - `type: NoiseReductionType`1517415175          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1517615177          - `"near_field"`1517815179          - `"far_field"`1518015181      - `transcription: optional object { model }  or null`1518215183        Optional source-language transcription. When configured, the server emits15184        `session.input_transcript.delta` events. Translation itself still runs from15185        the input audio stream.1518615187        - `model: string`1518815189          The transcription model to use for source transcript deltas.1519015191    - `output: optional object { language }`1519215193      - `language: optional string`1519415195        Target language for translated output audio and transcript deltas.1519615197### Realtime Translation Session Updated Event1519815199- `RealtimeTranslationSessionUpdatedEvent object { event_id, session, type }`1520015201  Returned when a translation session is updated with a `session.update` event,15202  unless there is an error.1520315204  - `event_id: string`1520515206    The unique ID of the server event.1520715208  - `session: RealtimeTranslationSession`1520915210    The translation session configuration.1521115212    - `id: string`1521315214      Unique identifier for the session that looks like `sess_1234567890abcdef`.1521515216    - `audio: object { input, output }`1521715218      Configuration for translation input and output audio.1521915220      - `input: optional object { noise_reduction, transcription }`1522115222        - `noise_reduction: optional object { type }  or null`1522315224          Optional input noise reduction.1522515226          - `type: NoiseReductionType`1522715228            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1522915230            - `"near_field"`1523115232            - `"far_field"`1523315234        - `transcription: optional object { model }  or null`1523515236          Optional source-language transcription. When configured, the server emits15237          `session.input_transcript.delta` events. Translation itself still runs from15238          the input audio stream.1523915240          - `model: string`1524115242            The transcription model used for source transcript deltas.1524315244      - `output: optional object { language }`1524515246        - `language: optional string`1524715248          Target language for translated output audio and transcript deltas.1524915250    - `expires_at: number`1525115252      Expiration timestamp for the session, in seconds since epoch.1525315254    - `model: string`1525515256      The Realtime translation model used for this session. This field is set at15257      session creation and cannot be changed with `session.update`.1525815259    - `type: "translation"`1526015261      The session type. Always `translation` for Realtime translation sessions.1526215263      - `"translation"`1526415265  - `type: "session.updated"`1526615267    The event type, must be `session.updated`.1526815269    - `"session.updated"`1527015271### Realtime Truncation1527215273- `RealtimeTruncation = "auto" or "disabled" or object { retention_ratio, type, token_limits }`1527415275  When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.1527615277  Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.1527815279  Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.1528015281  Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.1528215283  - `"auto" or "disabled"`1528415285    The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.1528615287    - `"auto"`1528815289    - `"disabled"`1529015291  - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`1529215293    Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.1529415295    - `retention_ratio: number`1529615297      Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.1529815299    - `type: "retention_ratio"`1530015301      Use retention ratio truncation.1530215303      - `"retention_ratio"`1530415305    - `token_limits: optional object { post_instructions }`1530615307      Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.1530815309      - `post_instructions: optional number`1531015311        Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.1531215313### Response Audio Delta Event1531415315- `ResponseAudioDeltaEvent object { content_index, delta, event_id, 4 more }`1531615317  Returned when the model-generated audio is updated.1531815319  - `content_index: number`1532015321    The index of the content part in the item's content array.1532215323  - `delta: string`1532415325    Base64-encoded audio data delta.1532615327  - `event_id: string`1532815329    The unique ID of the server event.1533015331  - `item_id: string`1533215333    The ID of the item.1533415335  - `output_index: number`1533615337    The index of the output item in the response.1533815339  - `response_id: string`1534015341    The ID of the response.1534215343  - `type: "response.output_audio.delta"`1534415345    The event type, must be `response.output_audio.delta`.1534615347    - `"response.output_audio.delta"`1534815349### Response Audio Done Event1535015351- `ResponseAudioDoneEvent object { content_index, event_id, item_id, 3 more }`1535215353  Returned when the model-generated audio is done. Also emitted when a Response15354  is interrupted, incomplete, or cancelled.1535515356  - `content_index: number`1535715358    The index of the content part in the item's content array.1535915360  - `event_id: string`1536115362    The unique ID of the server event.1536315364  - `item_id: string`1536515366    The ID of the item.1536715368  - `output_index: number`1536915370    The index of the output item in the response.1537115372  - `response_id: string`1537315374    The ID of the response.1537515376  - `type: "response.output_audio.done"`1537715378    The event type, must be `response.output_audio.done`.1537915380    - `"response.output_audio.done"`1538115382### Response Audio Transcript Delta Event1538315384- `ResponseAudioTranscriptDeltaEvent object { content_index, delta, event_id, 4 more }`1538515386  Returned when the model-generated transcription of audio output is updated.1538715388  - `content_index: number`1538915390    The index of the content part in the item's content array.1539115392  - `delta: string`1539315394    The transcript delta.1539515396  - `event_id: string`1539715398    The unique ID of the server event.1539915400  - `item_id: string`1540115402    The ID of the item.1540315404  - `output_index: number`1540515406    The index of the output item in the response.1540715408  - `response_id: string`1540915410    The ID of the response.1541115412  - `type: "response.output_audio_transcript.delta"`1541315414    The event type, must be `response.output_audio_transcript.delta`.1541515416    - `"response.output_audio_transcript.delta"`1541715418### Response Audio Transcript Done Event1541915420- `ResponseAudioTranscriptDoneEvent object { content_index, event_id, item_id, 4 more }`1542115422  Returned when the model-generated transcription of audio output is done15423  streaming. Also emitted when a Response is interrupted, incomplete, or15424  cancelled.1542515426  - `content_index: number`1542715428    The index of the content part in the item's content array.1542915430  - `event_id: string`1543115432    The unique ID of the server event.1543315434  - `item_id: string`1543515436    The ID of the item.1543715438  - `output_index: number`1543915440    The index of the output item in the response.1544115442  - `response_id: string`1544315444    The ID of the response.1544515446  - `transcript: string`1544715448    The final transcript of the audio.1544915450  - `type: "response.output_audio_transcript.done"`1545115452    The event type, must be `response.output_audio_transcript.done`.1545315454    - `"response.output_audio_transcript.done"`1545515456### Response Cancel Event1545715458- `ResponseCancelEvent object { type, event_id, response_id }`1545915460  Send this event to cancel an in-progress response. The server will respond15461  with a `response.done` event with a status of `response.status=cancelled`. If15462  there is no response to cancel, the server will respond with an error. It's safe15463  to call `response.cancel` even if no response is in progress, an error will be15464  returned the session will remain unaffected.1546515466  - `type: "response.cancel"`1546715468    The event type, must be `response.cancel`.1546915470    - `"response.cancel"`1547115472  - `event_id: optional string`1547315474    Optional client-generated ID used to identify this event.1547515476  - `response_id: optional string`1547715478    A specific response ID to cancel - if not provided, will cancel an15479    in-progress response in the default conversation.1548015481### Response Content Part Added Event1548215483- `ResponseContentPartAddedEvent object { content_index, event_id, item_id, 4 more }`1548415485  Returned when a new content part is added to an assistant message item during15486  response generation.1548715488  - `content_index: number`1548915490    The index of the content part in the item's content array.1549115492  - `event_id: string`1549315494    The unique ID of the server event.1549515496  - `item_id: string`1549715498    The ID of the item to which the content part was added.1549915500  - `output_index: number`1550115502    The index of the output item in the response.1550315504  - `part: object { audio, text, transcript, type }`1550515506    The content part that was added.1550715508    - `audio: optional string`1550915510      Base64-encoded audio data (if type is "audio").1551115512    - `text: optional string`1551315514      The text content (if type is "text").1551515516    - `transcript: optional string`1551715518      The transcript of the audio (if type is "audio").1551915520    - `type: optional "audio" or "text"`1552115522      The content type ("text", "audio").1552315524      - `"audio"`1552515526      - `"text"`1552715528  - `response_id: string`1552915530    The ID of the response.1553115532  - `type: "response.content_part.added"`1553315534    The event type, must be `response.content_part.added`.1553515536    - `"response.content_part.added"`1553715538### Response Content Part Done Event1553915540- `ResponseContentPartDoneEvent object { content_index, event_id, item_id, 4 more }`1554115542  Returned when a content part is done streaming in an assistant message item.15543  Also emitted when a Response is interrupted, incomplete, or cancelled.1554415545  - `content_index: number`1554615547    The index of the content part in the item's content array.1554815549  - `event_id: string`1555015551    The unique ID of the server event.1555215553  - `item_id: string`1555415555    The ID of the item.1555615557  - `output_index: number`1555815559    The index of the output item in the response.1556015561  - `part: object { audio, text, transcript, type }`1556215563    The content part that is done.1556415565    - `audio: optional string`1556615567      Base64-encoded audio data (if type is "audio").1556815569    - `text: optional string`1557015571      The text content (if type is "text").1557215573    - `transcript: optional string`1557415575      The transcript of the audio (if type is "audio").1557615577    - `type: optional "audio" or "text"`1557815579      The content type ("text", "audio").1558015581      - `"audio"`1558215583      - `"text"`1558415585  - `response_id: string`1558615587    The ID of the response.1558815589  - `type: "response.content_part.done"`1559015591    The event type, must be `response.content_part.done`.1559215593    - `"response.content_part.done"`1559415595### Response Create Event1559615597- `ResponseCreateEvent object { type, event_id, response }`1559815599  This event instructs the server to create a Response, which means triggering15600  model inference. When in Server VAD mode, the server will create Responses15601  automatically.1560215603  A Response will include at least one Item, and may have two, in which case15604  the second will be a function call. These Items will be appended to the15605  conversation history by default.1560615607  The server will respond with a `response.created` event, events for Items15608  and content created, and finally a `response.done` event to indicate the15609  Response is complete.1561015611  The `response.create` event includes inference configuration like15612  `instructions` and `tools`. If these are set, they will override the Session's15613  configuration for this Response only.1561415615  Responses can be created out-of-band of the default Conversation, meaning that they can15616  have arbitrary input, and it's possible to disable writing the output to the Conversation.15617  Only one Response can write to the default Conversation at a time, but otherwise multiple15618  Responses can be created in parallel. The `metadata` field is a good way to disambiguate15619  multiple simultaneous Responses.1562015621  Clients can set `conversation` to `none` to create a Response that does not write to the default15622  Conversation. Arbitrary input can be provided with the `input` field, which is an array accepting15623  raw Items and references to existing Items.1562415625  - `type: "response.create"`1562615627    The event type, must be `response.create`.1562815629    - `"response.create"`1563015631  - `event_id: optional string`1563215633    Optional client-generated ID used to identify this event.1563415635  - `response: optional RealtimeResponseCreateParams`1563615637    Create a new Realtime response with these parameters1563815639    - `audio: optional RealtimeResponseCreateAudioOutput`1564015641      Configuration for audio input and output.1564215643      - `output: optional object { format, voice }`1564415645        - `format: optional RealtimeAudioFormats`1564615647          The format of the output audio.1564815649          - `PCMAudio object { rate, type }`1565015651            The PCM audio format. Only a 24kHz sample rate is supported.1565215653            - `rate: optional 24000`1565415655              The sample rate of the audio. Always `24000`.1565615657              - `24000`1565815659            - `type: optional "audio/pcm"`1566015661              The audio format. Always `audio/pcm`.1566215663              - `"audio/pcm"`1566415665          - `PCMUAudio object { type }`1566615667            The G.711 μ-law format.1566815669            - `type: optional "audio/pcmu"`1567015671              The audio format. Always `audio/pcmu`.1567215673              - `"audio/pcmu"`1567415675          - `PCMAAudio object { type }`1567615677            The G.711 A-law format.1567815679            - `type: optional "audio/pcma"`1568015681              The audio format. Always `audio/pcma`.1568215683              - `"audio/pcma"`1568415685        - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`1568615687          The voice the model uses to respond. Supported built-in voices are15688          `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,15689          `marin`, and `cedar`. You may also provide a custom voice object with15690          an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed15691          during the session once the model has responded with audio at least once.15692          We recommend `marin` and `cedar` for best quality.1569315694          - `string`1569515696          - `"alloy" or "ash" or "ballad" or 7 more`1569715698            - `"alloy"`1569915700            - `"ash"`1570115702            - `"ballad"`1570315704            - `"coral"`1570515706            - `"echo"`1570715708            - `"sage"`1570915710            - `"shimmer"`1571115712            - `"verse"`1571315714            - `"marin"`1571515716            - `"cedar"`1571715718          - `ID object { id }`1571915720            Custom voice reference.1572115722            - `id: string`1572315724              The custom voice ID, e.g. `voice_1234`.1572515726    - `conversation: optional string or "auto" or "none"`1572715728      Controls which conversation the response is added to. Currently supports15729      `auto` and `none`, with `auto` as the default value. The `auto` value15730      means that the contents of the response will be added to the default15731      conversation. Set this to `none` to create an out-of-band response which15732      will not add items to default conversation.1573315734      - `string`1573515736      - `"auto" or "none"`1573715738        Controls which conversation the response is added to. Currently supports15739        `auto` and `none`, with `auto` as the default value. The `auto` value15740        means that the contents of the response will be added to the default15741        conversation. Set this to `none` to create an out-of-band response which15742        will not add items to default conversation.1574315744        - `"auto"`1574515746        - `"none"`1574715748    - `input: optional array of ConversationItem`1574915750      Input items to include in the prompt for the model. Using this field15751      creates a new context for this Response instead of using the default15752      conversation. An empty array `[]` will clear the context for this Response.15753      Note that this can include references to items that previously appeared in the session15754      using their id.1575515756      - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`1575715758        A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.1575915760        - `content: array of object { text, type }`1576115762          The content of the message.1576315764          - `text: optional string`1576515766            The text content.1576715768          - `type: optional "input_text"`1576915770            The content type. Always `input_text` for system messages.1577115772            - `"input_text"`1577315774        - `role: "system"`1577515776          The role of the message sender. Always `system`.1577715778          - `"system"`1577915780        - `type: "message"`1578115782          The type of the item. Always `message`.1578315784          - `"message"`1578515786        - `id: optional string`1578715788          The unique ID of the item. This may be provided by the client or generated by the server.1578915790        - `object: optional "realtime.item"`1579115792          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1579315794          - `"realtime.item"`1579515796        - `status: optional "completed" or "incomplete" or "in_progress"`1579715798          The status of the item. Has no effect on the conversation.1579915800          - `"completed"`1580115802          - `"incomplete"`1580315804          - `"in_progress"`1580515806      - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`1580715808        A user message item in a Realtime conversation.1580915810        - `content: array of object { audio, detail, image_url, 3 more }`1581115812          The content of the message.1581315814          - `audio: optional string`1581515816            Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1581715818          - `detail: optional "auto" or "low" or "high"`1581915820            The detail level of the image (for `input_image`). `auto` will default to `high`.1582115822            - `"auto"`1582315824            - `"low"`1582515826            - `"high"`1582715828          - `image_url: optional string`1582915830            Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.1583115832          - `text: optional string`1583315834            The text content (for `input_text`).1583515836          - `transcript: optional string`1583715838            Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.1583915840          - `type: optional "input_text" or "input_audio" or "input_image"`1584115842            The content type (`input_text`, `input_audio`, or `input_image`).1584315844            - `"input_text"`1584515846            - `"input_audio"`1584715848            - `"input_image"`1584915850        - `role: "user"`1585115852          The role of the message sender. Always `user`.1585315854          - `"user"`1585515856        - `type: "message"`1585715858          The type of the item. Always `message`.1585915860          - `"message"`1586115862        - `id: optional string`1586315864          The unique ID of the item. This may be provided by the client or generated by the server.1586515866        - `object: optional "realtime.item"`1586715868          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1586915870          - `"realtime.item"`1587115872        - `status: optional "completed" or "incomplete" or "in_progress"`1587315874          The status of the item. Has no effect on the conversation.1587515876          - `"completed"`1587715878          - `"incomplete"`1587915880          - `"in_progress"`1588115882      - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`1588315884        An assistant message item in a Realtime conversation.1588515886        - `content: array of object { audio, text, transcript, type }`1588715888          The content of the message.1588915890          - `audio: optional string`1589115892            Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1589315894          - `text: optional string`1589515896            The text content.1589715898          - `transcript: optional string`1589915900            The transcript of the audio content, this will always be present if the output type is `audio`.1590115902          - `type: optional "output_text" or "output_audio"`1590315904            The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.1590515906            - `"output_text"`1590715908            - `"output_audio"`1590915910        - `role: "assistant"`1591115912          The role of the message sender. Always `assistant`.1591315914          - `"assistant"`1591515916        - `type: "message"`1591715918          The type of the item. Always `message`.1591915920          - `"message"`1592115922        - `id: optional string`1592315924          The unique ID of the item. This may be provided by the client or generated by the server.1592515926        - `object: optional "realtime.item"`1592715928          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1592915930          - `"realtime.item"`1593115932        - `status: optional "completed" or "incomplete" or "in_progress"`1593315934          The status of the item. Has no effect on the conversation.1593515936          - `"completed"`1593715938          - `"incomplete"`1593915940          - `"in_progress"`1594115942      - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`1594315944        A function call item in a Realtime conversation.1594515946        - `arguments: string`1594715948          The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.1594915950        - `name: string`1595115952          The name of the function being called.1595315954        - `type: "function_call"`1595515956          The type of the item. Always `function_call`.1595715958          - `"function_call"`1595915960        - `id: optional string`1596115962          The unique ID of the item. This may be provided by the client or generated by the server.1596315964        - `call_id: optional string`1596515966          The ID of the function call.1596715968        - `object: optional "realtime.item"`1596915970          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1597115972          - `"realtime.item"`1597315974        - `status: optional "completed" or "incomplete" or "in_progress"`1597515976          The status of the item. Has no effect on the conversation.1597715978          - `"completed"`1597915980          - `"incomplete"`1598115982          - `"in_progress"`1598315984      - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`1598515986        A function call output item in a Realtime conversation.1598715988        - `call_id: string`1598915990          The ID of the function call this output is for.1599115992        - `output: string`1599315994          The output of the function call, this is free text and can contain any information or simply be empty.1599515996        - `type: "function_call_output"`1599715998          The type of the item. Always `function_call_output`.1599916000          - `"function_call_output"`1600116002        - `id: optional string`1600316004          The unique ID of the item. This may be provided by the client or generated by the server.1600516006        - `object: optional "realtime.item"`1600716008          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1600916010          - `"realtime.item"`1601116012        - `status: optional "completed" or "incomplete" or "in_progress"`1601316014          The status of the item. Has no effect on the conversation.1601516016          - `"completed"`1601716018          - `"incomplete"`1601916020          - `"in_progress"`1602116022      - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`1602316024        A Realtime item responding to an MCP approval request.1602516026        - `id: string`1602716028          The unique ID of the approval response.1602916030        - `approval_request_id: string`1603116032          The ID of the approval request being answered.1603316034        - `approve: boolean`1603516036          Whether the request was approved.1603716038        - `type: "mcp_approval_response"`1603916040          The type of the item. Always `mcp_approval_response`.1604116042          - `"mcp_approval_response"`1604316044        - `reason: optional string or null`1604516046          Optional reason for the decision.1604716048      - `RealtimeMcpListTools object { server_label, tools, type, id }`1604916050        A Realtime item listing tools available on an MCP server.1605116052        - `server_label: string`1605316054          The label of the MCP server.1605516056        - `tools: array of object { input_schema, name, annotations, description }`1605716058          The tools available on the server.1605916060          - `input_schema: unknown`1606116062            The JSON schema describing the tool's input.1606316064          - `name: string`1606516066            The name of the tool.1606716068          - `annotations: optional unknown or null`1606916070            Additional annotations about the tool.1607116072          - `description: optional string or null`1607316074            The description of the tool.1607516076        - `type: "mcp_list_tools"`1607716078          The type of the item. Always `mcp_list_tools`.1607916080          - `"mcp_list_tools"`1608116082        - `id: optional string`1608316084          The unique ID of the list.1608516086      - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`1608716088        A Realtime item representing an invocation of a tool on an MCP server.1608916090        - `id: string`1609116092          The unique ID of the tool call.1609316094        - `arguments: string`1609516096          A JSON string of the arguments passed to the tool.1609716098        - `name: string`1609916100          The name of the tool that was run.1610116102        - `server_label: string`1610316104          The label of the MCP server running the tool.1610516106        - `type: "mcp_call"`1610716108          The type of the item. Always `mcp_call`.1610916110          - `"mcp_call"`1611116112        - `approval_request_id: optional string or null`1611316114          The ID of an associated approval request, if any.1611516116        - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`1611716118          The error from the tool call, if any.1611916120          - `RealtimeMcpProtocolError object { code, message, type }`1612116122            - `code: number`1612316124            - `message: string`1612516126            - `type: "protocol_error"`1612716128              - `"protocol_error"`1612916130          - `RealtimeMcpToolExecutionError object { message, type }`1613116132            - `message: string`1613316134            - `type: "tool_execution_error"`1613516136              - `"tool_execution_error"`1613716138          - `RealtimeMcphttpError object { code, message, type }`1613916140            - `code: number`1614116142            - `message: string`1614316144            - `type: "http_error"`1614516146              - `"http_error"`1614716148        - `output: optional string or null`1614916150          The output from the tool call.1615116152      - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`1615316154        A Realtime item requesting human approval of a tool invocation.1615516156        - `id: string`1615716158          The unique ID of the approval request.1615916160        - `arguments: string`1616116162          A JSON string of arguments for the tool.1616316164        - `name: string`1616516166          The name of the tool to run.1616716168        - `server_label: string`1616916170          The label of the MCP server making the request.1617116172        - `type: "mcp_approval_request"`1617316174          The type of the item. Always `mcp_approval_request`.1617516176          - `"mcp_approval_request"`1617716178    - `instructions: optional string`1617916180      The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.16181      Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.1618216183    - `max_output_tokens: optional number or "inf"`1618416185      Maximum number of output tokens for a single assistant response,16186      inclusive of tool calls. Provide an integer between 1 and 4096 to16187      limit output tokens, or `inf` for the maximum available tokens for a16188      given model. Defaults to `inf`.1618916190      - `number`1619116192      - `"inf"`1619316194        - `"inf"`1619516196    - `metadata: optional Metadata or null`1619716198      Set of 16 key-value pairs that can be attached to an object. This can be16199      useful for storing additional information about the object in a structured16200      format, and querying for objects via API or the dashboard.1620116202      Keys are strings with a maximum length of 64 characters. Values are strings16203      with a maximum length of 512 characters.1620416205    - `output_modalities: optional array of "text" or "audio"`1620616207      The set of modalities the model used to respond, currently the only possible values are16208      `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the16209      output to mode `text` will disable audio output from the model.1621016211      - `"text"`1621216213      - `"audio"`1621416215    - `parallel_tool_calls: optional boolean`1621616217      Whether the model may call multiple tools in parallel. Only supported by16218      reasoning Realtime models such as `gpt-realtime-2`.1621916220    - `prompt: optional ResponsePrompt or null`1622116222      Reference to a prompt template and its variables.16223      [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1622416225      - `id: string`1622616227        The unique identifier of the prompt template to use.1622816229      - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1623016231        Optional map of values to substitute in for variables in your16232        prompt. The substitution values can either be strings, or other16233        Response input types like images or files.1623416235        - `string`1623616237        - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1623816239          A text input to the model.1624016241          - `text: string`1624216243            The text input to the model.1624416245          - `type: "input_text"`1624616247            The type of the input item. Always `input_text`.1624816249            - `"input_text"`1625016251          - `prompt_cache_breakpoint: optional object { mode }`1625216253            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.1625416255            - `mode: "explicit"`1625616257              The breakpoint mode. Always `explicit`.1625816259              - `"explicit"`1626016261        - `ResponseInputImage object { detail, type, file_id, 2 more }`1626216263          An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1626416265          - `detail: ImageDetail`1626616267            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.1626816269            - `"low"`1627016271            - `"high"`1627216273            - `"auto"`1627416275            - `"original"`1627616277          - `type: "input_image"`1627816279            The type of the input item. Always `input_image`.1628016281            - `"input_image"`1628216283          - `file_id: optional string or null`1628416285            The ID of the file to be sent to the model.1628616287          - `image_url: optional string or null`1628816289            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1629016291          - `prompt_cache_breakpoint: optional object { mode }`1629216293            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.1629416295            - `mode: "explicit"`1629616297              The breakpoint mode. Always `explicit`.1629816299              - `"explicit"`1630016301        - `ResponseInputFile object { type, detail, file_data, 4 more }`1630216303          A file input to the model.1630416305          - `type: "input_file"`1630616307            The type of the input item. Always `input_file`.1630816309            - `"input_file"`1631016311          - `detail: optional "auto" or "low" or "high"`1631216313            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`.1631416315            - `"auto"`1631616317            - `"low"`1631816319            - `"high"`1632016321          - `file_data: optional string`1632216323            The content of the file to be sent to the model.1632416325          - `file_id: optional string or null`1632616327            The ID of the file to be sent to the model.1632816329          - `file_url: optional string`1633016331            The URL of the file to be sent to the model.1633216333          - `filename: optional string`1633416335            The name of the file to be sent to the model.1633616337          - `prompt_cache_breakpoint: optional object { mode }`1633816339            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.1634016341            - `mode: "explicit"`1634216343              The breakpoint mode. Always `explicit`.1634416345              - `"explicit"`1634616347      - `version: optional string or null`1634816349        Optional version of the prompt template.1635016351    - `reasoning: optional RealtimeReasoning`1635216353      Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.1635416355      - `effort: optional RealtimeReasoningEffort`1635616357        Constrains effort on reasoning for reasoning-capable Realtime models such as16358        `gpt-realtime-2`.1635916360        - `"minimal"`1636116362        - `"low"`1636316364        - `"medium"`1636516366        - `"high"`1636716368        - `"xhigh"`1636916370    - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`1637116372      How the model chooses tools. Provide one of the string modes or force a specific16373      function/MCP tool.1637416375      - `ToolChoiceOptions = "none" or "auto" or "required"`1637616377        Controls which (if any) tool is called by the model.1637816379        `none` means the model will not call any tool and instead generates a message.1638016381        `auto` means the model can pick between generating a message or calling one or16382        more tools.1638316384        `required` means the model must call one or more tools.1638516386        - `"none"`1638716388        - `"auto"`1638916390        - `"required"`1639116392      - `ToolChoiceFunction object { name, type }`1639316394        Use this option to force the model to call a specific function.1639516396        - `name: string`1639716398          The name of the function to call.1639916400        - `type: "function"`1640116402          For function calling, the type is always `function`.1640316404          - `"function"`1640516406      - `ToolChoiceMcp object { server_label, type, name }`1640716408        Use this option to force the model to call a specific tool on a remote MCP server.1640916410        - `server_label: string`1641116412          The label of the MCP server to use.1641316414        - `type: "mcp"`1641516416          For MCP tools, the type is always `mcp`.1641716418          - `"mcp"`1641916420        - `name: optional string or null`1642116422          The name of the tool to call on the server.1642316424    - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`1642516426      Tools available to the model.1642716428      - `RealtimeFunctionTool object { description, name, parameters, type }`1642916430        - `description: optional string`1643116432          The description of the function, including guidance on when and how16433          to call it, and guidance about what to tell the user when calling16434          (if anything).1643516436        - `name: optional string`1643716438          The name of the function.1643916440        - `parameters: optional unknown`1644116442          Parameters of the function in JSON Schema.1644316444        - `type: optional "function"`1644516446          The type of the tool, i.e. `function`.1644716448          - `"function"`1644916450      - `McpTool object { server_label, type, allowed_callers, 9 more }`1645116452        Give the model access to additional tools via remote Model Context Protocol16453        (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1645416455        - `server_label: string`1645616457          A label for this MCP server, used to identify it in tool calls.1645816459        - `type: "mcp"`1646016461          The type of the MCP tool. Always `mcp`.1646216463          - `"mcp"`1646416465        - `allowed_callers: optional array of "direct" or "programmatic" or null`1646616467          The tool invocation context(s).1646816469          - `"direct"`1647016471          - `"programmatic"`1647216473        - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1647416475          List of allowed tool names or a filter object.1647616477          - `McpAllowedTools = array of string`1647816479            A string array of allowed tool names1648016481          - `McpToolFilter object { read_only, tool_names }`1648216483            A filter object to specify which tools are allowed.1648416485            - `read_only: optional boolean`1648616487              Indicates whether or not a tool modifies data or is read-only. If an16488              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),16489              it will match this filter.1649016491            - `tool_names: optional array of string`1649216493              List of allowed tool names.1649416495        - `authorization: optional string`1649616497          An OAuth access token that can be used with a remote MCP server, either16498          with a custom MCP server URL or a service connector. Your application16499          must handle the OAuth authorization flow and provide the token here.1650016501        - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1650216503          Identifier for service connectors, like those available in ChatGPT. One of16504          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more16505          about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1650616507          This field is deprecated for models released after September 1, 2026.16508          Use `server_url` to connect to a remote MCP server, or `tunnel_id` to16509          connect through a Secure MCP Tunnel.1651016511          Currently supported `connector_id` values are:1651216513          - Dropbox: `connector_dropbox`16514          - Gmail: `connector_gmail`16515          - Google Calendar: `connector_googlecalendar`16516          - Google Drive: `connector_googledrive`16517          - Microsoft Teams: `connector_microsoftteams`16518          - Outlook Calendar: `connector_outlookcalendar`16519          - Outlook Email: `connector_outlookemail`16520          - SharePoint: `connector_sharepoint`1652116522          - `"connector_dropbox"`1652316524          - `"connector_gmail"`1652516526          - `"connector_googlecalendar"`1652716528          - `"connector_googledrive"`1652916530          - `"connector_microsoftteams"`1653116532          - `"connector_outlookcalendar"`1653316534          - `"connector_outlookemail"`1653516536          - `"connector_sharepoint"`1653716538        - `defer_loading: optional boolean`1653916540          Whether this MCP tool is deferred and discovered via tool search.1654116542        - `headers: optional map[string] or null`1654316544          Optional HTTP headers to send to the MCP server. Use for authentication16545          or other purposes.1654616547        - `require_approval: optional object { always, never }  or "always" or "never" or null`1654816549          Specify which of the MCP server's tools require approval.1655016551          - `McpToolApprovalFilter object { always, never }`1655216553            Specify which of the MCP server's tools require approval. Can be16554            `always`, `never`, or a filter object associated with tools16555            that require approval.1655616557            - `always: optional object { read_only, tool_names }`1655816559              A filter object to specify which tools are allowed.1656016561              - `read_only: optional boolean`1656216563                Indicates whether or not a tool modifies data or is read-only. If an16564                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),16565                it will match this filter.1656616567              - `tool_names: optional array of string`1656816569                List of allowed tool names.1657016571            - `never: optional object { read_only, tool_names }`1657216573              A filter object to specify which tools are allowed.1657416575              - `read_only: optional boolean`1657616577                Indicates whether or not a tool modifies data or is read-only. If an16578                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),16579                it will match this filter.1658016581              - `tool_names: optional array of string`1658216583                List of allowed tool names.1658416585          - `McpToolApprovalSetting = "always" or "never"`1658616587            Specify a single approval policy for all tools. One of `always` or16588            `never`. When set to `always`, all tools will require approval. When16589            set to `never`, all tools will not require approval.1659016591            - `"always"`1659216593            - `"never"`1659416595        - `server_description: optional string`1659616597          Optional description of the MCP server, used to provide more context.1659816599        - `server_url: optional string`1660016601          The URL for the MCP server. One of `server_url`, `connector_id`, or16602          `tunnel_id` must be provided.1660316604        - `tunnel_id: optional string`1660516606          The Secure MCP Tunnel ID to use instead of a direct server URL. One of16607          `server_url`, `connector_id`, or `tunnel_id` must be provided.1660816609### Response Created Event1661016611- `ResponseCreatedEvent object { event_id, response, type }`1661216613  Returned when a new Response is created. The first event of response creation,16614  where the response is in an initial state of `in_progress`.1661516616  - `event_id: string`1661716618    The unique ID of the server event.1661916620  - `response: RealtimeResponse`1662116622    The response resource.1662316624    - `id: optional string`1662516626      The unique ID of the response, will look like `resp_1234`.1662716628    - `audio: optional object { output }`1662916630      Configuration for audio output.1663116632      - `output: optional object { format, voice }`1663316634        - `format: optional RealtimeAudioFormats`1663516636          The format of the output audio.1663716638          - `PCMAudio object { rate, type }`1663916640            The PCM audio format. Only a 24kHz sample rate is supported.1664116642            - `rate: optional 24000`1664316644              The sample rate of the audio. Always `24000`.1664516646              - `24000`1664716648            - `type: optional "audio/pcm"`1664916650              The audio format. Always `audio/pcm`.1665116652              - `"audio/pcm"`1665316654          - `PCMUAudio object { type }`1665516656            The G.711 μ-law format.1665716658            - `type: optional "audio/pcmu"`1665916660              The audio format. Always `audio/pcmu`.1666116662              - `"audio/pcmu"`1666316664          - `PCMAAudio object { type }`1666516666            The G.711 A-law format.1666716668            - `type: optional "audio/pcma"`1666916670              The audio format. Always `audio/pcma`.1667116672              - `"audio/pcma"`1667316674        - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`1667516676          The voice the model uses to respond. Voice cannot be changed during the16677          session once the model has responded with audio at least once. Current16678          voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,16679          `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for16680          best quality.1668116682          - `string`1668316684          - `"alloy" or "ash" or "ballad" or 7 more`1668516686            The voice the model uses to respond. Voice cannot be changed during the16687            session once the model has responded with audio at least once. Current16688            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,16689            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for16690            best quality.1669116692            - `"alloy"`1669316694            - `"ash"`1669516696            - `"ballad"`1669716698            - `"coral"`1669916700            - `"echo"`1670116702            - `"sage"`1670316704            - `"shimmer"`1670516706            - `"verse"`1670716708            - `"marin"`1670916710            - `"cedar"`1671116712    - `conversation_id: optional string`1671316714      Which conversation the response is added to, determined by the `conversation`16715      field in the `response.create` event. If `auto`, the response will be added to16716      the default conversation and the value of `conversation_id` will be an id like16717      `conv_1234`. If `none`, the response will not be added to any conversation and16718      the value of `conversation_id` will be `null`. If responses are being triggered16719      automatically by VAD the response will be added to the default conversation1672016721    - `max_output_tokens: optional number or "inf"`1672216723      Maximum number of output tokens for a single assistant response,16724      inclusive of tool calls, that was used in this response.1672516726      - `number`1672716728      - `"inf"`1672916730        - `"inf"`1673116732    - `metadata: optional Metadata or null`1673316734      Set of 16 key-value pairs that can be attached to an object. This can be16735      useful for storing additional information about the object in a structured16736      format, and querying for objects via API or the dashboard.1673716738      Keys are strings with a maximum length of 64 characters. Values are strings16739      with a maximum length of 512 characters.1674016741    - `object: optional "realtime.response"`1674216743      The object type, must be `realtime.response`.1674416745      - `"realtime.response"`1674616747    - `output: optional array of ConversationItem`1674816749      The list of output items generated by the response.1675016751      - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`1675216753        A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.1675416755        - `content: array of object { text, type }`1675616757          The content of the message.1675816759          - `text: optional string`1676016761            The text content.1676216763          - `type: optional "input_text"`1676416765            The content type. Always `input_text` for system messages.1676616767            - `"input_text"`1676816769        - `role: "system"`1677016771          The role of the message sender. Always `system`.1677216773          - `"system"`1677416775        - `type: "message"`1677616777          The type of the item. Always `message`.1677816779          - `"message"`1678016781        - `id: optional string`1678216783          The unique ID of the item. This may be provided by the client or generated by the server.1678416785        - `object: optional "realtime.item"`1678616787          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1678816789          - `"realtime.item"`1679016791        - `status: optional "completed" or "incomplete" or "in_progress"`1679216793          The status of the item. Has no effect on the conversation.1679416795          - `"completed"`1679616797          - `"incomplete"`1679816799          - `"in_progress"`1680016801      - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`1680216803        A user message item in a Realtime conversation.1680416805        - `content: array of object { audio, detail, image_url, 3 more }`1680616807          The content of the message.1680816809          - `audio: optional string`1681016811            Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1681216813          - `detail: optional "auto" or "low" or "high"`1681416815            The detail level of the image (for `input_image`). `auto` will default to `high`.1681616817            - `"auto"`1681816819            - `"low"`1682016821            - `"high"`1682216823          - `image_url: optional string`1682416825            Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.1682616827          - `text: optional string`1682816829            The text content (for `input_text`).1683016831          - `transcript: optional string`1683216833            Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.1683416835          - `type: optional "input_text" or "input_audio" or "input_image"`1683616837            The content type (`input_text`, `input_audio`, or `input_image`).1683816839            - `"input_text"`1684016841            - `"input_audio"`1684216843            - `"input_image"`1684416845        - `role: "user"`1684616847          The role of the message sender. Always `user`.1684816849          - `"user"`1685016851        - `type: "message"`1685216853          The type of the item. Always `message`.1685416855          - `"message"`1685616857        - `id: optional string`1685816859          The unique ID of the item. This may be provided by the client or generated by the server.1686016861        - `object: optional "realtime.item"`1686216863          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1686416865          - `"realtime.item"`1686616867        - `status: optional "completed" or "incomplete" or "in_progress"`1686816869          The status of the item. Has no effect on the conversation.1687016871          - `"completed"`1687216873          - `"incomplete"`1687416875          - `"in_progress"`1687616877      - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`1687816879        An assistant message item in a Realtime conversation.1688016881        - `content: array of object { audio, text, transcript, type }`1688216883          The content of the message.1688416885          - `audio: optional string`1688616887            Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1688816889          - `text: optional string`1689016891            The text content.1689216893          - `transcript: optional string`1689416895            The transcript of the audio content, this will always be present if the output type is `audio`.1689616897          - `type: optional "output_text" or "output_audio"`1689816899            The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.1690016901            - `"output_text"`1690216903            - `"output_audio"`1690416905        - `role: "assistant"`1690616907          The role of the message sender. Always `assistant`.1690816909          - `"assistant"`1691016911        - `type: "message"`1691216913          The type of the item. Always `message`.1691416915          - `"message"`1691616917        - `id: optional string`1691816919          The unique ID of the item. This may be provided by the client or generated by the server.1692016921        - `object: optional "realtime.item"`1692216923          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1692416925          - `"realtime.item"`1692616927        - `status: optional "completed" or "incomplete" or "in_progress"`1692816929          The status of the item. Has no effect on the conversation.1693016931          - `"completed"`1693216933          - `"incomplete"`1693416935          - `"in_progress"`1693616937      - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`1693816939        A function call item in a Realtime conversation.1694016941        - `arguments: string`1694216943          The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.1694416945        - `name: string`1694616947          The name of the function being called.1694816949        - `type: "function_call"`1695016951          The type of the item. Always `function_call`.1695216953          - `"function_call"`1695416955        - `id: optional string`1695616957          The unique ID of the item. This may be provided by the client or generated by the server.1695816959        - `call_id: optional string`1696016961          The ID of the function call.1696216963        - `object: optional "realtime.item"`1696416965          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1696616967          - `"realtime.item"`1696816969        - `status: optional "completed" or "incomplete" or "in_progress"`1697016971          The status of the item. Has no effect on the conversation.1697216973          - `"completed"`1697416975          - `"incomplete"`1697616977          - `"in_progress"`1697816979      - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`1698016981        A function call output item in a Realtime conversation.1698216983        - `call_id: string`1698416985          The ID of the function call this output is for.1698616987        - `output: string`1698816989          The output of the function call, this is free text and can contain any information or simply be empty.1699016991        - `type: "function_call_output"`1699216993          The type of the item. Always `function_call_output`.1699416995          - `"function_call_output"`1699616997        - `id: optional string`1699816999          The unique ID of the item. This may be provided by the client or generated by the server.1700017001        - `object: optional "realtime.item"`1700217003          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1700417005          - `"realtime.item"`1700617007        - `status: optional "completed" or "incomplete" or "in_progress"`1700817009          The status of the item. Has no effect on the conversation.1701017011          - `"completed"`1701217013          - `"incomplete"`1701417015          - `"in_progress"`1701617017      - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`1701817019        A Realtime item responding to an MCP approval request.1702017021        - `id: string`1702217023          The unique ID of the approval response.1702417025        - `approval_request_id: string`1702617027          The ID of the approval request being answered.1702817029        - `approve: boolean`1703017031          Whether the request was approved.1703217033        - `type: "mcp_approval_response"`1703417035          The type of the item. Always `mcp_approval_response`.1703617037          - `"mcp_approval_response"`1703817039        - `reason: optional string or null`1704017041          Optional reason for the decision.1704217043      - `RealtimeMcpListTools object { server_label, tools, type, id }`1704417045        A Realtime item listing tools available on an MCP server.1704617047        - `server_label: string`1704817049          The label of the MCP server.1705017051        - `tools: array of object { input_schema, name, annotations, description }`1705217053          The tools available on the server.1705417055          - `input_schema: unknown`1705617057            The JSON schema describing the tool's input.1705817059          - `name: string`1706017061            The name of the tool.1706217063          - `annotations: optional unknown or null`1706417065            Additional annotations about the tool.1706617067          - `description: optional string or null`1706817069            The description of the tool.1707017071        - `type: "mcp_list_tools"`1707217073          The type of the item. Always `mcp_list_tools`.1707417075          - `"mcp_list_tools"`1707617077        - `id: optional string`1707817079          The unique ID of the list.1708017081      - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`1708217083        A Realtime item representing an invocation of a tool on an MCP server.1708417085        - `id: string`1708617087          The unique ID of the tool call.1708817089        - `arguments: string`1709017091          A JSON string of the arguments passed to the tool.1709217093        - `name: string`1709417095          The name of the tool that was run.1709617097        - `server_label: string`1709817099          The label of the MCP server running the tool.1710017101        - `type: "mcp_call"`1710217103          The type of the item. Always `mcp_call`.1710417105          - `"mcp_call"`1710617107        - `approval_request_id: optional string or null`1710817109          The ID of an associated approval request, if any.1711017111        - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`1711217113          The error from the tool call, if any.1711417115          - `RealtimeMcpProtocolError object { code, message, type }`1711617117            - `code: number`1711817119            - `message: string`1712017121            - `type: "protocol_error"`1712217123              - `"protocol_error"`1712417125          - `RealtimeMcpToolExecutionError object { message, type }`1712617127            - `message: string`1712817129            - `type: "tool_execution_error"`1713017131              - `"tool_execution_error"`1713217133          - `RealtimeMcphttpError object { code, message, type }`1713417135            - `code: number`1713617137            - `message: string`1713817139            - `type: "http_error"`1714017141              - `"http_error"`1714217143        - `output: optional string or null`1714417145          The output from the tool call.1714617147      - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`1714817149        A Realtime item requesting human approval of a tool invocation.1715017151        - `id: string`1715217153          The unique ID of the approval request.1715417155        - `arguments: string`1715617157          A JSON string of arguments for the tool.1715817159        - `name: string`1716017161          The name of the tool to run.1716217163        - `server_label: string`1716417165          The label of the MCP server making the request.1716617167        - `type: "mcp_approval_request"`1716817169          The type of the item. Always `mcp_approval_request`.1717017171          - `"mcp_approval_request"`1717217173    - `output_modalities: optional array of "text" or "audio"`1717417175      The set of modalities the model used to respond, currently the only possible values are17176      `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the17177      output to mode `text` will disable audio output from the model.1717817179      - `"text"`1718017181      - `"audio"`1718217183    - `status: optional "completed" or "cancelled" or "failed" or 2 more`1718417185      The final status of the response (`completed`, `cancelled`, `failed`, or17186      `incomplete`, `in_progress`).1718717188      - `"completed"`1718917190      - `"cancelled"`1719117192      - `"failed"`1719317194      - `"incomplete"`1719517196      - `"in_progress"`1719717198    - `status_details: optional RealtimeResponseStatus`1719917200      Additional details about the status.1720117202      - `error: optional object { code, type }`1720317204        A description of the error that caused the response to fail,17205        populated when the `status` is `failed`.1720617207        - `code: optional string`1720817209          Error code, if any.1721017211        - `type: optional string`1721217213          The type of error.1721417215      - `reason: optional "turn_detected" or "client_cancelled" or "max_output_tokens" or "content_filter"`1721617217        The reason the Response did not complete. For a `cancelled` Response,  one of `turn_detected` (the server VAD detected a new start of speech)  or `client_cancelled` (the client sent a cancel event). For an  `incomplete` Response, one of `max_output_tokens` or `content_filter`  (the server-side safety filter activated and cut off the response).1721817219        - `"turn_detected"`1722017221        - `"client_cancelled"`1722217223        - `"max_output_tokens"`1722417225        - `"content_filter"`1722617227      - `type: optional "completed" or "cancelled" or "failed" or "incomplete"`1722817229        The type of error that caused the response to fail, corresponding17230        with the `status` field (`completed`, `cancelled`, `incomplete`,17231        `failed`).1723217233        - `"completed"`1723417235        - `"cancelled"`1723617237        - `"failed"`1723817239        - `"incomplete"`1724017241    - `usage: optional RealtimeResponseUsage`1724217243      Usage statistics for the Response, this will correspond to billing. A17244      Realtime API session will maintain a conversation context and append new17245      Items to the Conversation, thus output from previous turns (text and17246      audio tokens) will become the input for later turns.1724717248      - `input_token_details: optional RealtimeResponseUsageInputTokenDetails`1724917250        Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.1725117252        - `audio_tokens: optional number`1725317254          The number of audio tokens used as input for the Response.1725517256        - `cached_tokens: optional number`1725717258          The number of cached tokens used as input for the Response.1725917260        - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`1726117262          Details about the cached tokens used as input for the Response.1726317264          - `audio_tokens: optional number`1726517266            The number of cached audio tokens used as input for the Response.1726717268          - `image_tokens: optional number`1726917270            The number of cached image tokens used as input for the Response.1727117272          - `text_tokens: optional number`1727317274            The number of cached text tokens used as input for the Response.1727517276        - `image_tokens: optional number`1727717278          The number of image tokens used as input for the Response.1727917280        - `text_tokens: optional number`1728117282          The number of text tokens used as input for the Response.1728317284      - `input_tokens: optional number`1728517286        The number of input tokens used in the Response, including text and17287        audio tokens.1728817289      - `output_token_details: optional RealtimeResponseUsageOutputTokenDetails`1729017291        Details about the output tokens used in the Response.1729217293        - `audio_tokens: optional number`1729417295          The number of audio tokens used in the Response.1729617297        - `text_tokens: optional number`1729817299          The number of text tokens used in the Response.1730017301      - `output_tokens: optional number`1730217303        The number of output tokens sent in the Response, including text and17304        audio tokens.1730517306      - `total_tokens: optional number`1730717308        The total number of tokens in the Response including input and output17309        text and audio tokens.1731017311  - `type: "response.created"`1731217313    The event type, must be `response.created`.1731417315    - `"response.created"`1731617317### Response Done Event1731817319- `ResponseDoneEvent object { event_id, response, type }`1732017321  Returned when a Response is done streaming. Always emitted, no matter the17322  final state. The Response object included in the `response.done` event will17323  include all output Items in the Response but will omit the raw audio data.1732417325  Clients should check the `status` field of the Response to determine if it was successful17326  (`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`.1732717328  A response will contain all output items that were generated during the response, excluding17329  any audio content.1733017331  - `event_id: string`1733217333    The unique ID of the server event.1733417335  - `response: RealtimeResponse`1733617337    The response resource.1733817339    - `id: optional string`1734017341      The unique ID of the response, will look like `resp_1234`.1734217343    - `audio: optional object { output }`1734417345      Configuration for audio output.1734617347      - `output: optional object { format, voice }`1734817349        - `format: optional RealtimeAudioFormats`1735017351          The format of the output audio.1735217353          - `PCMAudio object { rate, type }`1735417355            The PCM audio format. Only a 24kHz sample rate is supported.1735617357            - `rate: optional 24000`1735817359              The sample rate of the audio. Always `24000`.1736017361              - `24000`1736217363            - `type: optional "audio/pcm"`1736417365              The audio format. Always `audio/pcm`.1736617367              - `"audio/pcm"`1736817369          - `PCMUAudio object { type }`1737017371            The G.711 μ-law format.1737217373            - `type: optional "audio/pcmu"`1737417375              The audio format. Always `audio/pcmu`.1737617377              - `"audio/pcmu"`1737817379          - `PCMAAudio object { type }`1738017381            The G.711 A-law format.1738217383            - `type: optional "audio/pcma"`1738417385              The audio format. Always `audio/pcma`.1738617387              - `"audio/pcma"`1738817389        - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`1739017391          The voice the model uses to respond. Voice cannot be changed during the17392          session once the model has responded with audio at least once. Current17393          voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,17394          `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for17395          best quality.1739617397          - `string`1739817399          - `"alloy" or "ash" or "ballad" or 7 more`1740017401            The voice the model uses to respond. Voice cannot be changed during the17402            session once the model has responded with audio at least once. Current17403            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,17404            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for17405            best quality.1740617407            - `"alloy"`1740817409            - `"ash"`1741017411            - `"ballad"`1741217413            - `"coral"`1741417415            - `"echo"`1741617417            - `"sage"`1741817419            - `"shimmer"`1742017421            - `"verse"`1742217423            - `"marin"`1742417425            - `"cedar"`1742617427    - `conversation_id: optional string`1742817429      Which conversation the response is added to, determined by the `conversation`17430      field in the `response.create` event. If `auto`, the response will be added to17431      the default conversation and the value of `conversation_id` will be an id like17432      `conv_1234`. If `none`, the response will not be added to any conversation and17433      the value of `conversation_id` will be `null`. If responses are being triggered17434      automatically by VAD the response will be added to the default conversation1743517436    - `max_output_tokens: optional number or "inf"`1743717438      Maximum number of output tokens for a single assistant response,17439      inclusive of tool calls, that was used in this response.1744017441      - `number`1744217443      - `"inf"`1744417445        - `"inf"`1744617447    - `metadata: optional Metadata or null`1744817449      Set of 16 key-value pairs that can be attached to an object. This can be17450      useful for storing additional information about the object in a structured17451      format, and querying for objects via API or the dashboard.1745217453      Keys are strings with a maximum length of 64 characters. Values are strings17454      with a maximum length of 512 characters.1745517456    - `object: optional "realtime.response"`1745717458      The object type, must be `realtime.response`.1745917460      - `"realtime.response"`1746117462    - `output: optional array of ConversationItem`1746317464      The list of output items generated by the response.1746517466      - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`1746717468        A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.1746917470        - `content: array of object { text, type }`1747117472          The content of the message.1747317474          - `text: optional string`1747517476            The text content.1747717478          - `type: optional "input_text"`1747917480            The content type. Always `input_text` for system messages.1748117482            - `"input_text"`1748317484        - `role: "system"`1748517486          The role of the message sender. Always `system`.1748717488          - `"system"`1748917490        - `type: "message"`1749117492          The type of the item. Always `message`.1749317494          - `"message"`1749517496        - `id: optional string`1749717498          The unique ID of the item. This may be provided by the client or generated by the server.1749917500        - `object: optional "realtime.item"`1750117502          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1750317504          - `"realtime.item"`1750517506        - `status: optional "completed" or "incomplete" or "in_progress"`1750717508          The status of the item. Has no effect on the conversation.1750917510          - `"completed"`1751117512          - `"incomplete"`1751317514          - `"in_progress"`1751517516      - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`1751717518        A user message item in a Realtime conversation.1751917520        - `content: array of object { audio, detail, image_url, 3 more }`1752117522          The content of the message.1752317524          - `audio: optional string`1752517526            Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1752717528          - `detail: optional "auto" or "low" or "high"`1752917530            The detail level of the image (for `input_image`). `auto` will default to `high`.1753117532            - `"auto"`1753317534            - `"low"`1753517536            - `"high"`1753717538          - `image_url: optional string`1753917540            Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.1754117542          - `text: optional string`1754317544            The text content (for `input_text`).1754517546          - `transcript: optional string`1754717548            Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.1754917550          - `type: optional "input_text" or "input_audio" or "input_image"`1755117552            The content type (`input_text`, `input_audio`, or `input_image`).1755317554            - `"input_text"`1755517556            - `"input_audio"`1755717558            - `"input_image"`1755917560        - `role: "user"`1756117562          The role of the message sender. Always `user`.1756317564          - `"user"`1756517566        - `type: "message"`1756717568          The type of the item. Always `message`.1756917570          - `"message"`1757117572        - `id: optional string`1757317574          The unique ID of the item. This may be provided by the client or generated by the server.1757517576        - `object: optional "realtime.item"`1757717578          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1757917580          - `"realtime.item"`1758117582        - `status: optional "completed" or "incomplete" or "in_progress"`1758317584          The status of the item. Has no effect on the conversation.1758517586          - `"completed"`1758717588          - `"incomplete"`1758917590          - `"in_progress"`1759117592      - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`1759317594        An assistant message item in a Realtime conversation.1759517596        - `content: array of object { audio, text, transcript, type }`1759717598          The content of the message.1759917600          - `audio: optional string`1760117602            Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1760317604          - `text: optional string`1760517606            The text content.1760717608          - `transcript: optional string`1760917610            The transcript of the audio content, this will always be present if the output type is `audio`.1761117612          - `type: optional "output_text" or "output_audio"`1761317614            The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.1761517616            - `"output_text"`1761717618            - `"output_audio"`1761917620        - `role: "assistant"`1762117622          The role of the message sender. Always `assistant`.1762317624          - `"assistant"`1762517626        - `type: "message"`1762717628          The type of the item. Always `message`.1762917630          - `"message"`1763117632        - `id: optional string`1763317634          The unique ID of the item. This may be provided by the client or generated by the server.1763517636        - `object: optional "realtime.item"`1763717638          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1763917640          - `"realtime.item"`1764117642        - `status: optional "completed" or "incomplete" or "in_progress"`1764317644          The status of the item. Has no effect on the conversation.1764517646          - `"completed"`1764717648          - `"incomplete"`1764917650          - `"in_progress"`1765117652      - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`1765317654        A function call item in a Realtime conversation.1765517656        - `arguments: string`1765717658          The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.1765917660        - `name: string`1766117662          The name of the function being called.1766317664        - `type: "function_call"`1766517666          The type of the item. Always `function_call`.1766717668          - `"function_call"`1766917670        - `id: optional string`1767117672          The unique ID of the item. This may be provided by the client or generated by the server.1767317674        - `call_id: optional string`1767517676          The ID of the function call.1767717678        - `object: optional "realtime.item"`1767917680          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1768117682          - `"realtime.item"`1768317684        - `status: optional "completed" or "incomplete" or "in_progress"`1768517686          The status of the item. Has no effect on the conversation.1768717688          - `"completed"`1768917690          - `"incomplete"`1769117692          - `"in_progress"`1769317694      - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`1769517696        A function call output item in a Realtime conversation.1769717698        - `call_id: string`1769917700          The ID of the function call this output is for.1770117702        - `output: string`1770317704          The output of the function call, this is free text and can contain any information or simply be empty.1770517706        - `type: "function_call_output"`1770717708          The type of the item. Always `function_call_output`.1770917710          - `"function_call_output"`1771117712        - `id: optional string`1771317714          The unique ID of the item. This may be provided by the client or generated by the server.1771517716        - `object: optional "realtime.item"`1771717718          Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1771917720          - `"realtime.item"`1772117722        - `status: optional "completed" or "incomplete" or "in_progress"`1772317724          The status of the item. Has no effect on the conversation.1772517726          - `"completed"`1772717728          - `"incomplete"`1772917730          - `"in_progress"`1773117732      - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`1773317734        A Realtime item responding to an MCP approval request.1773517736        - `id: string`1773717738          The unique ID of the approval response.1773917740        - `approval_request_id: string`1774117742          The ID of the approval request being answered.1774317744        - `approve: boolean`1774517746          Whether the request was approved.1774717748        - `type: "mcp_approval_response"`1774917750          The type of the item. Always `mcp_approval_response`.1775117752          - `"mcp_approval_response"`1775317754        - `reason: optional string or null`1775517756          Optional reason for the decision.1775717758      - `RealtimeMcpListTools object { server_label, tools, type, id }`1775917760        A Realtime item listing tools available on an MCP server.1776117762        - `server_label: string`1776317764          The label of the MCP server.1776517766        - `tools: array of object { input_schema, name, annotations, description }`1776717768          The tools available on the server.1776917770          - `input_schema: unknown`1777117772            The JSON schema describing the tool's input.1777317774          - `name: string`1777517776            The name of the tool.1777717778          - `annotations: optional unknown or null`1777917780            Additional annotations about the tool.1778117782          - `description: optional string or null`1778317784            The description of the tool.1778517786        - `type: "mcp_list_tools"`1778717788          The type of the item. Always `mcp_list_tools`.1778917790          - `"mcp_list_tools"`1779117792        - `id: optional string`1779317794          The unique ID of the list.1779517796      - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`1779717798        A Realtime item representing an invocation of a tool on an MCP server.1779917800        - `id: string`1780117802          The unique ID of the tool call.1780317804        - `arguments: string`1780517806          A JSON string of the arguments passed to the tool.1780717808        - `name: string`1780917810          The name of the tool that was run.1781117812        - `server_label: string`1781317814          The label of the MCP server running the tool.1781517816        - `type: "mcp_call"`1781717818          The type of the item. Always `mcp_call`.1781917820          - `"mcp_call"`1782117822        - `approval_request_id: optional string or null`1782317824          The ID of an associated approval request, if any.1782517826        - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`1782717828          The error from the tool call, if any.1782917830          - `RealtimeMcpProtocolError object { code, message, type }`1783117832            - `code: number`1783317834            - `message: string`1783517836            - `type: "protocol_error"`1783717838              - `"protocol_error"`1783917840          - `RealtimeMcpToolExecutionError object { message, type }`1784117842            - `message: string`1784317844            - `type: "tool_execution_error"`1784517846              - `"tool_execution_error"`1784717848          - `RealtimeMcphttpError object { code, message, type }`1784917850            - `code: number`1785117852            - `message: string`1785317854            - `type: "http_error"`1785517856              - `"http_error"`1785717858        - `output: optional string or null`1785917860          The output from the tool call.1786117862      - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`1786317864        A Realtime item requesting human approval of a tool invocation.1786517866        - `id: string`1786717868          The unique ID of the approval request.1786917870        - `arguments: string`1787117872          A JSON string of arguments for the tool.1787317874        - `name: string`1787517876          The name of the tool to run.1787717878        - `server_label: string`1787917880          The label of the MCP server making the request.1788117882        - `type: "mcp_approval_request"`1788317884          The type of the item. Always `mcp_approval_request`.1788517886          - `"mcp_approval_request"`1788717888    - `output_modalities: optional array of "text" or "audio"`1788917890      The set of modalities the model used to respond, currently the only possible values are17891      `[\"audio\"]`, `[\"text\"]`. Audio output always include a text transcript. Setting the17892      output to mode `text` will disable audio output from the model.1789317894      - `"text"`1789517896      - `"audio"`1789717898    - `status: optional "completed" or "cancelled" or "failed" or 2 more`1789917900      The final status of the response (`completed`, `cancelled`, `failed`, or17901      `incomplete`, `in_progress`).1790217903      - `"completed"`1790417905      - `"cancelled"`1790617907      - `"failed"`1790817909      - `"incomplete"`1791017911      - `"in_progress"`1791217913    - `status_details: optional RealtimeResponseStatus`1791417915      Additional details about the status.1791617917      - `error: optional object { code, type }`1791817919        A description of the error that caused the response to fail,17920        populated when the `status` is `failed`.1792117922        - `code: optional string`1792317924          Error code, if any.1792517926        - `type: optional string`1792717928          The type of error.1792917930      - `reason: optional "turn_detected" or "client_cancelled" or "max_output_tokens" or "content_filter"`1793117932        The reason the Response did not complete. For a `cancelled` Response,  one of `turn_detected` (the server VAD detected a new start of speech)  or `client_cancelled` (the client sent a cancel event). For an  `incomplete` Response, one of `max_output_tokens` or `content_filter`  (the server-side safety filter activated and cut off the response).1793317934        - `"turn_detected"`1793517936        - `"client_cancelled"`1793717938        - `"max_output_tokens"`1793917940        - `"content_filter"`1794117942      - `type: optional "completed" or "cancelled" or "failed" or "incomplete"`1794317944        The type of error that caused the response to fail, corresponding17945        with the `status` field (`completed`, `cancelled`, `incomplete`,17946        `failed`).1794717948        - `"completed"`1794917950        - `"cancelled"`1795117952        - `"failed"`1795317954        - `"incomplete"`1795517956    - `usage: optional RealtimeResponseUsage`1795717958      Usage statistics for the Response, this will correspond to billing. A17959      Realtime API session will maintain a conversation context and append new17960      Items to the Conversation, thus output from previous turns (text and17961      audio tokens) will become the input for later turns.1796217963      - `input_token_details: optional RealtimeResponseUsageInputTokenDetails`1796417965        Details about the input tokens used in the Response. Cached tokens are tokens from previous turns in the conversation that are included as context for the current response. Cached tokens here are counted as a subset of input tokens, meaning input tokens will include cached and uncached tokens.1796617967        - `audio_tokens: optional number`1796817969          The number of audio tokens used as input for the Response.1797017971        - `cached_tokens: optional number`1797217973          The number of cached tokens used as input for the Response.1797417975        - `cached_tokens_details: optional object { audio_tokens, image_tokens, text_tokens }`1797617977          Details about the cached tokens used as input for the Response.1797817979          - `audio_tokens: optional number`1798017981            The number of cached audio tokens used as input for the Response.1798217983          - `image_tokens: optional number`1798417985            The number of cached image tokens used as input for the Response.1798617987          - `text_tokens: optional number`1798817989            The number of cached text tokens used as input for the Response.1799017991        - `image_tokens: optional number`1799217993          The number of image tokens used as input for the Response.1799417995        - `text_tokens: optional number`1799617997          The number of text tokens used as input for the Response.1799817999      - `input_tokens: optional number`1800018001        The number of input tokens used in the Response, including text and18002        audio tokens.1800318004      - `output_token_details: optional RealtimeResponseUsageOutputTokenDetails`1800518006        Details about the output tokens used in the Response.1800718008        - `audio_tokens: optional number`1800918010          The number of audio tokens used in the Response.1801118012        - `text_tokens: optional number`1801318014          The number of text tokens used in the Response.1801518016      - `output_tokens: optional number`1801718018        The number of output tokens sent in the Response, including text and18019        audio tokens.1802018021      - `total_tokens: optional number`1802218023        The total number of tokens in the Response including input and output18024        text and audio tokens.1802518026  - `type: "response.done"`1802718028    The event type, must be `response.done`.1802918030    - `"response.done"`1803118032### Response Function Call Arguments Delta Event1803318034- `ResponseFunctionCallArgumentsDeltaEvent object { call_id, delta, event_id, 4 more }`1803518036  Returned when the model-generated function call arguments are updated.1803718038  - `call_id: string`1803918040    The ID of the function call.1804118042  - `delta: string`1804318044    The arguments delta as a JSON string.1804518046  - `event_id: string`1804718048    The unique ID of the server event.1804918050  - `item_id: string`1805118052    The ID of the function call item.1805318054  - `output_index: number`1805518056    The index of the output item in the response.1805718058  - `response_id: string`1805918060    The ID of the response.1806118062  - `type: "response.function_call_arguments.delta"`1806318064    The event type, must be `response.function_call_arguments.delta`.1806518066    - `"response.function_call_arguments.delta"`1806718068### Response Function Call Arguments Done Event1806918070- `ResponseFunctionCallArgumentsDoneEvent object { arguments, call_id, event_id, 5 more }`1807118072  Returned when the model-generated function call arguments are done streaming.18073  Also emitted when a Response is interrupted, incomplete, or cancelled.1807418075  - `arguments: string`1807618077    The final arguments as a JSON string.1807818079  - `call_id: string`1808018081    The ID of the function call.1808218083  - `event_id: string`1808418085    The unique ID of the server event.1808618087  - `item_id: string`1808818089    The ID of the function call item.1809018091  - `name: string`1809218093    The name of the function that was called.1809418095  - `output_index: number`1809618097    The index of the output item in the response.1809818099  - `response_id: string`1810018101    The ID of the response.1810218103  - `type: "response.function_call_arguments.done"`1810418105    The event type, must be `response.function_call_arguments.done`.1810618107    - `"response.function_call_arguments.done"`1810818109### Response Mcp Call Arguments Delta1811018111- `ResponseMcpCallArgumentsDelta object { delta, event_id, item_id, 4 more }`1811218113  Returned when MCP tool call arguments are updated during response generation.1811418115  - `delta: string`1811618117    The JSON-encoded arguments delta.1811818119  - `event_id: string`1812018121    The unique ID of the server event.1812218123  - `item_id: string`1812418125    The ID of the MCP tool call item.1812618127  - `output_index: number`1812818129    The index of the output item in the response.1813018131  - `response_id: string`1813218133    The ID of the response.1813418135  - `type: "response.mcp_call_arguments.delta"`1813618137    The event type, must be `response.mcp_call_arguments.delta`.1813818139    - `"response.mcp_call_arguments.delta"`1814018141  - `obfuscation: optional string or null`1814218143    If present, indicates the delta text was obfuscated.1814418145### Response Mcp Call Arguments Done1814618147- `ResponseMcpCallArgumentsDone object { arguments, event_id, item_id, 3 more }`1814818149  Returned when MCP tool call arguments are finalized during response generation.1815018151  - `arguments: string`1815218153    The final JSON-encoded arguments string.1815418155  - `event_id: string`1815618157    The unique ID of the server event.1815818159  - `item_id: string`1816018161    The ID of the MCP tool call item.1816218163  - `output_index: number`1816418165    The index of the output item in the response.1816618167  - `response_id: string`1816818169    The ID of the response.1817018171  - `type: "response.mcp_call_arguments.done"`1817218173    The event type, must be `response.mcp_call_arguments.done`.1817418175    - `"response.mcp_call_arguments.done"`1817618177### Response Mcp Call Completed1817818179- `ResponseMcpCallCompleted object { event_id, item_id, output_index, type }`1818018181  Returned when an MCP tool call has completed successfully.1818218183  - `event_id: string`1818418185    The unique ID of the server event.1818618187  - `item_id: string`1818818189    The ID of the MCP tool call item.1819018191  - `output_index: number`1819218193    The index of the output item in the response.1819418195  - `type: "response.mcp_call.completed"`1819618197    The event type, must be `response.mcp_call.completed`.1819818199    - `"response.mcp_call.completed"`1820018201### Response Mcp Call Failed1820218203- `ResponseMcpCallFailed object { event_id, item_id, output_index, type }`1820418205  Returned when an MCP tool call has failed.1820618207  - `event_id: string`1820818209    The unique ID of the server event.1821018211  - `item_id: string`1821218213    The ID of the MCP tool call item.1821418215  - `output_index: number`1821618217    The index of the output item in the response.1821818219  - `type: "response.mcp_call.failed"`1822018221    The event type, must be `response.mcp_call.failed`.1822218223    - `"response.mcp_call.failed"`1822418225### Response Mcp Call In Progress1822618227- `ResponseMcpCallInProgress object { event_id, item_id, output_index, type }`1822818229  Returned when an MCP tool call has started and is in progress.1823018231  - `event_id: string`1823218233    The unique ID of the server event.1823418235  - `item_id: string`1823618237    The ID of the MCP tool call item.1823818239  - `output_index: number`1824018241    The index of the output item in the response.1824218243  - `type: "response.mcp_call.in_progress"`1824418245    The event type, must be `response.mcp_call.in_progress`.1824618247    - `"response.mcp_call.in_progress"`1824818249### Response Output Item Added Event1825018251- `ResponseOutputItemAddedEvent object { event_id, item, output_index, 2 more }`1825218253  Returned when a new Item is created during Response generation.1825418255  - `event_id: string`1825618257    The unique ID of the server event.1825818259  - `item: ConversationItem`1826018261    A single item within a Realtime conversation.1826218263    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`1826418265      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.1826618267      - `content: array of object { text, type }`1826818269        The content of the message.1827018271        - `text: optional string`1827218273          The text content.1827418275        - `type: optional "input_text"`1827618277          The content type. Always `input_text` for system messages.1827818279          - `"input_text"`1828018281      - `role: "system"`1828218283        The role of the message sender. Always `system`.1828418285        - `"system"`1828618287      - `type: "message"`1828818289        The type of the item. Always `message`.1829018291        - `"message"`1829218293      - `id: optional string`1829418295        The unique ID of the item. This may be provided by the client or generated by the server.1829618297      - `object: optional "realtime.item"`1829818299        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1830018301        - `"realtime.item"`1830218303      - `status: optional "completed" or "incomplete" or "in_progress"`1830418305        The status of the item. Has no effect on the conversation.1830618307        - `"completed"`1830818309        - `"incomplete"`1831018311        - `"in_progress"`1831218313    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`1831418315      A user message item in a Realtime conversation.1831618317      - `content: array of object { audio, detail, image_url, 3 more }`1831818319        The content of the message.1832018321        - `audio: optional string`1832218323          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1832418325        - `detail: optional "auto" or "low" or "high"`1832618327          The detail level of the image (for `input_image`). `auto` will default to `high`.1832818329          - `"auto"`1833018331          - `"low"`1833218333          - `"high"`1833418335        - `image_url: optional string`1833618337          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.1833818339        - `text: optional string`1834018341          The text content (for `input_text`).1834218343        - `transcript: optional string`1834418345          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.1834618347        - `type: optional "input_text" or "input_audio" or "input_image"`1834818349          The content type (`input_text`, `input_audio`, or `input_image`).1835018351          - `"input_text"`1835218353          - `"input_audio"`1835418355          - `"input_image"`1835618357      - `role: "user"`1835818359        The role of the message sender. Always `user`.1836018361        - `"user"`1836218363      - `type: "message"`1836418365        The type of the item. Always `message`.1836618367        - `"message"`1836818369      - `id: optional string`1837018371        The unique ID of the item. This may be provided by the client or generated by the server.1837218373      - `object: optional "realtime.item"`1837418375        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1837618377        - `"realtime.item"`1837818379      - `status: optional "completed" or "incomplete" or "in_progress"`1838018381        The status of the item. Has no effect on the conversation.1838218383        - `"completed"`1838418385        - `"incomplete"`1838618387        - `"in_progress"`1838818389    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`1839018391      An assistant message item in a Realtime conversation.1839218393      - `content: array of object { audio, text, transcript, type }`1839418395        The content of the message.1839618397        - `audio: optional string`1839818399          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1840018401        - `text: optional string`1840218403          The text content.1840418405        - `transcript: optional string`1840618407          The transcript of the audio content, this will always be present if the output type is `audio`.1840818409        - `type: optional "output_text" or "output_audio"`1841018411          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.1841218413          - `"output_text"`1841418415          - `"output_audio"`1841618417      - `role: "assistant"`1841818419        The role of the message sender. Always `assistant`.1842018421        - `"assistant"`1842218423      - `type: "message"`1842418425        The type of the item. Always `message`.1842618427        - `"message"`1842818429      - `id: optional string`1843018431        The unique ID of the item. This may be provided by the client or generated by the server.1843218433      - `object: optional "realtime.item"`1843418435        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1843618437        - `"realtime.item"`1843818439      - `status: optional "completed" or "incomplete" or "in_progress"`1844018441        The status of the item. Has no effect on the conversation.1844218443        - `"completed"`1844418445        - `"incomplete"`1844618447        - `"in_progress"`1844818449    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`1845018451      A function call item in a Realtime conversation.1845218453      - `arguments: string`1845418455        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.1845618457      - `name: string`1845818459        The name of the function being called.1846018461      - `type: "function_call"`1846218463        The type of the item. Always `function_call`.1846418465        - `"function_call"`1846618467      - `id: optional string`1846818469        The unique ID of the item. This may be provided by the client or generated by the server.1847018471      - `call_id: optional string`1847218473        The ID of the function call.1847418475      - `object: optional "realtime.item"`1847618477        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1847818479        - `"realtime.item"`1848018481      - `status: optional "completed" or "incomplete" or "in_progress"`1848218483        The status of the item. Has no effect on the conversation.1848418485        - `"completed"`1848618487        - `"incomplete"`1848818489        - `"in_progress"`1849018491    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`1849218493      A function call output item in a Realtime conversation.1849418495      - `call_id: string`1849618497        The ID of the function call this output is for.1849818499      - `output: string`1850018501        The output of the function call, this is free text and can contain any information or simply be empty.1850218503      - `type: "function_call_output"`1850418505        The type of the item. Always `function_call_output`.1850618507        - `"function_call_output"`1850818509      - `id: optional string`1851018511        The unique ID of the item. This may be provided by the client or generated by the server.1851218513      - `object: optional "realtime.item"`1851418515        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1851618517        - `"realtime.item"`1851818519      - `status: optional "completed" or "incomplete" or "in_progress"`1852018521        The status of the item. Has no effect on the conversation.1852218523        - `"completed"`1852418525        - `"incomplete"`1852618527        - `"in_progress"`1852818529    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`1853018531      A Realtime item responding to an MCP approval request.1853218533      - `id: string`1853418535        The unique ID of the approval response.1853618537      - `approval_request_id: string`1853818539        The ID of the approval request being answered.1854018541      - `approve: boolean`1854218543        Whether the request was approved.1854418545      - `type: "mcp_approval_response"`1854618547        The type of the item. Always `mcp_approval_response`.1854818549        - `"mcp_approval_response"`1855018551      - `reason: optional string or null`1855218553        Optional reason for the decision.1855418555    - `RealtimeMcpListTools object { server_label, tools, type, id }`1855618557      A Realtime item listing tools available on an MCP server.1855818559      - `server_label: string`1856018561        The label of the MCP server.1856218563      - `tools: array of object { input_schema, name, annotations, description }`1856418565        The tools available on the server.1856618567        - `input_schema: unknown`1856818569          The JSON schema describing the tool's input.1857018571        - `name: string`1857218573          The name of the tool.1857418575        - `annotations: optional unknown or null`1857618577          Additional annotations about the tool.1857818579        - `description: optional string or null`1858018581          The description of the tool.1858218583      - `type: "mcp_list_tools"`1858418585        The type of the item. Always `mcp_list_tools`.1858618587        - `"mcp_list_tools"`1858818589      - `id: optional string`1859018591        The unique ID of the list.1859218593    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`1859418595      A Realtime item representing an invocation of a tool on an MCP server.1859618597      - `id: string`1859818599        The unique ID of the tool call.1860018601      - `arguments: string`1860218603        A JSON string of the arguments passed to the tool.1860418605      - `name: string`1860618607        The name of the tool that was run.1860818609      - `server_label: string`1861018611        The label of the MCP server running the tool.1861218613      - `type: "mcp_call"`1861418615        The type of the item. Always `mcp_call`.1861618617        - `"mcp_call"`1861818619      - `approval_request_id: optional string or null`1862018621        The ID of an associated approval request, if any.1862218623      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`1862418625        The error from the tool call, if any.1862618627        - `RealtimeMcpProtocolError object { code, message, type }`1862818629          - `code: number`1863018631          - `message: string`1863218633          - `type: "protocol_error"`1863418635            - `"protocol_error"`1863618637        - `RealtimeMcpToolExecutionError object { message, type }`1863818639          - `message: string`1864018641          - `type: "tool_execution_error"`1864218643            - `"tool_execution_error"`1864418645        - `RealtimeMcphttpError object { code, message, type }`1864618647          - `code: number`1864818649          - `message: string`1865018651          - `type: "http_error"`1865218653            - `"http_error"`1865418655      - `output: optional string or null`1865618657        The output from the tool call.1865818659    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`1866018661      A Realtime item requesting human approval of a tool invocation.1866218663      - `id: string`1866418665        The unique ID of the approval request.1866618667      - `arguments: string`1866818669        A JSON string of arguments for the tool.1867018671      - `name: string`1867218673        The name of the tool to run.1867418675      - `server_label: string`1867618677        The label of the MCP server making the request.1867818679      - `type: "mcp_approval_request"`1868018681        The type of the item. Always `mcp_approval_request`.1868218683        - `"mcp_approval_request"`1868418685  - `output_index: number`1868618687    The index of the output item in the Response.1868818689  - `response_id: string`1869018691    The ID of the Response to which the item belongs.1869218693  - `type: "response.output_item.added"`1869418695    The event type, must be `response.output_item.added`.1869618697    - `"response.output_item.added"`1869818699### Response Output Item Done Event1870018701- `ResponseOutputItemDoneEvent object { event_id, item, output_index, 2 more }`1870218703  Returned when an Item is done streaming. Also emitted when a Response is18704  interrupted, incomplete, or cancelled.1870518706  - `event_id: string`1870718708    The unique ID of the server event.1870918710  - `item: ConversationItem`1871118712    A single item within a Realtime conversation.1871318714    - `RealtimeConversationItemSystemMessage object { content, role, type, 3 more }`1871518716      A system message in a Realtime conversation can be used to provide additional context or instructions to the model. This is similar but distinct from the instruction prompt provided at the start of a conversation, as system messages can be added at any point in the conversation. For major changes to the conversation's behavior, use instructions, but for smaller updates (e.g. "the user is now asking about a different topic"), use system messages.1871718718      - `content: array of object { text, type }`1871918720        The content of the message.1872118722        - `text: optional string`1872318724          The text content.1872518726        - `type: optional "input_text"`1872718728          The content type. Always `input_text` for system messages.1872918730          - `"input_text"`1873118732      - `role: "system"`1873318734        The role of the message sender. Always `system`.1873518736        - `"system"`1873718738      - `type: "message"`1873918740        The type of the item. Always `message`.1874118742        - `"message"`1874318744      - `id: optional string`1874518746        The unique ID of the item. This may be provided by the client or generated by the server.1874718748      - `object: optional "realtime.item"`1874918750        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1875118752        - `"realtime.item"`1875318754      - `status: optional "completed" or "incomplete" or "in_progress"`1875518756        The status of the item. Has no effect on the conversation.1875718758        - `"completed"`1875918760        - `"incomplete"`1876118762        - `"in_progress"`1876318764    - `RealtimeConversationItemUserMessage object { content, role, type, 3 more }`1876518766      A user message item in a Realtime conversation.1876718768      - `content: array of object { audio, detail, image_url, 3 more }`1876918770        The content of the message.1877118772        - `audio: optional string`1877318774          Base64-encoded audio bytes (for `input_audio`), these will be parsed as the format specified in the session input audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1877518776        - `detail: optional "auto" or "low" or "high"`1877718778          The detail level of the image (for `input_image`). `auto` will default to `high`.1877918780          - `"auto"`1878118782          - `"low"`1878318784          - `"high"`1878518786        - `image_url: optional string`1878718788          Base64-encoded image bytes (for `input_image`) as a data URI. For example `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...`. Supported formats are PNG and JPEG.1878918790        - `text: optional string`1879118792          The text content (for `input_text`).1879318794        - `transcript: optional string`1879518796          Transcript of the audio (for `input_audio`). This is not sent to the model, but will be attached to the message item for reference.1879718798        - `type: optional "input_text" or "input_audio" or "input_image"`1879918800          The content type (`input_text`, `input_audio`, or `input_image`).1880118802          - `"input_text"`1880318804          - `"input_audio"`1880518806          - `"input_image"`1880718808      - `role: "user"`1880918810        The role of the message sender. Always `user`.1881118812        - `"user"`1881318814      - `type: "message"`1881518816        The type of the item. Always `message`.1881718818        - `"message"`1881918820      - `id: optional string`1882118822        The unique ID of the item. This may be provided by the client or generated by the server.1882318824      - `object: optional "realtime.item"`1882518826        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1882718828        - `"realtime.item"`1882918830      - `status: optional "completed" or "incomplete" or "in_progress"`1883118832        The status of the item. Has no effect on the conversation.1883318834        - `"completed"`1883518836        - `"incomplete"`1883718838        - `"in_progress"`1883918840    - `RealtimeConversationItemAssistantMessage object { content, role, type, 3 more }`1884118842      An assistant message item in a Realtime conversation.1884318844      - `content: array of object { audio, text, transcript, type }`1884518846        The content of the message.1884718848        - `audio: optional string`1884918850          Base64-encoded audio bytes, these will be parsed as the format specified in the session output audio type configuration. This defaults to PCM 16-bit 24kHz mono if not specified.1885118852        - `text: optional string`1885318854          The text content.1885518856        - `transcript: optional string`1885718858          The transcript of the audio content, this will always be present if the output type is `audio`.1885918860        - `type: optional "output_text" or "output_audio"`1886118862          The content type, `output_text` or `output_audio` depending on the session `output_modalities` configuration.1886318864          - `"output_text"`1886518866          - `"output_audio"`1886718868      - `role: "assistant"`1886918870        The role of the message sender. Always `assistant`.1887118872        - `"assistant"`1887318874      - `type: "message"`1887518876        The type of the item. Always `message`.1887718878        - `"message"`1887918880      - `id: optional string`1888118882        The unique ID of the item. This may be provided by the client or generated by the server.1888318884      - `object: optional "realtime.item"`1888518886        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1888718888        - `"realtime.item"`1888918890      - `status: optional "completed" or "incomplete" or "in_progress"`1889118892        The status of the item. Has no effect on the conversation.1889318894        - `"completed"`1889518896        - `"incomplete"`1889718898        - `"in_progress"`1889918900    - `RealtimeConversationItemFunctionCall object { arguments, name, type, 4 more }`1890118902      A function call item in a Realtime conversation.1890318904      - `arguments: string`1890518906        The arguments of the function call. This is a JSON-encoded string representing the arguments passed to the function, for example `{"arg1": "value1", "arg2": 42}`.1890718908      - `name: string`1890918910        The name of the function being called.1891118912      - `type: "function_call"`1891318914        The type of the item. Always `function_call`.1891518916        - `"function_call"`1891718918      - `id: optional string`1891918920        The unique ID of the item. This may be provided by the client or generated by the server.1892118922      - `call_id: optional string`1892318924        The ID of the function call.1892518926      - `object: optional "realtime.item"`1892718928        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1892918930        - `"realtime.item"`1893118932      - `status: optional "completed" or "incomplete" or "in_progress"`1893318934        The status of the item. Has no effect on the conversation.1893518936        - `"completed"`1893718938        - `"incomplete"`1893918940        - `"in_progress"`1894118942    - `RealtimeConversationItemFunctionCallOutput object { call_id, output, type, 3 more }`1894318944      A function call output item in a Realtime conversation.1894518946      - `call_id: string`1894718948        The ID of the function call this output is for.1894918950      - `output: string`1895118952        The output of the function call, this is free text and can contain any information or simply be empty.1895318954      - `type: "function_call_output"`1895518956        The type of the item. Always `function_call_output`.1895718958        - `"function_call_output"`1895918960      - `id: optional string`1896118962        The unique ID of the item. This may be provided by the client or generated by the server.1896318964      - `object: optional "realtime.item"`1896518966        Identifier for the API object being returned - always `realtime.item`. Optional when creating a new item.1896718968        - `"realtime.item"`1896918970      - `status: optional "completed" or "incomplete" or "in_progress"`1897118972        The status of the item. Has no effect on the conversation.1897318974        - `"completed"`1897518976        - `"incomplete"`1897718978        - `"in_progress"`1897918980    - `RealtimeMcpApprovalResponse object { id, approval_request_id, approve, 2 more }`1898118982      A Realtime item responding to an MCP approval request.1898318984      - `id: string`1898518986        The unique ID of the approval response.1898718988      - `approval_request_id: string`1898918990        The ID of the approval request being answered.1899118992      - `approve: boolean`1899318994        Whether the request was approved.1899518996      - `type: "mcp_approval_response"`1899718998        The type of the item. Always `mcp_approval_response`.1899919000        - `"mcp_approval_response"`1900119002      - `reason: optional string or null`1900319004        Optional reason for the decision.1900519006    - `RealtimeMcpListTools object { server_label, tools, type, id }`1900719008      A Realtime item listing tools available on an MCP server.1900919010      - `server_label: string`1901119012        The label of the MCP server.1901319014      - `tools: array of object { input_schema, name, annotations, description }`1901519016        The tools available on the server.1901719018        - `input_schema: unknown`1901919020          The JSON schema describing the tool's input.1902119022        - `name: string`1902319024          The name of the tool.1902519026        - `annotations: optional unknown or null`1902719028          Additional annotations about the tool.1902919030        - `description: optional string or null`1903119032          The description of the tool.1903319034      - `type: "mcp_list_tools"`1903519036        The type of the item. Always `mcp_list_tools`.1903719038        - `"mcp_list_tools"`1903919040      - `id: optional string`1904119042        The unique ID of the list.1904319044    - `RealtimeMcpToolCall object { id, arguments, name, 5 more }`1904519046      A Realtime item representing an invocation of a tool on an MCP server.1904719048      - `id: string`1904919050        The unique ID of the tool call.1905119052      - `arguments: string`1905319054        A JSON string of the arguments passed to the tool.1905519056      - `name: string`1905719058        The name of the tool that was run.1905919060      - `server_label: string`1906119062        The label of the MCP server running the tool.1906319064      - `type: "mcp_call"`1906519066        The type of the item. Always `mcp_call`.1906719068        - `"mcp_call"`1906919070      - `approval_request_id: optional string or null`1907119072        The ID of an associated approval request, if any.1907319074      - `error: optional RealtimeMcpProtocolError or RealtimeMcpToolExecutionError or RealtimeMcphttpError or null`1907519076        The error from the tool call, if any.1907719078        - `RealtimeMcpProtocolError object { code, message, type }`1907919080          - `code: number`1908119082          - `message: string`1908319084          - `type: "protocol_error"`1908519086            - `"protocol_error"`1908719088        - `RealtimeMcpToolExecutionError object { message, type }`1908919090          - `message: string`1909119092          - `type: "tool_execution_error"`1909319094            - `"tool_execution_error"`1909519096        - `RealtimeMcphttpError object { code, message, type }`1909719098          - `code: number`1909919100          - `message: string`1910119102          - `type: "http_error"`1910319104            - `"http_error"`1910519106      - `output: optional string or null`1910719108        The output from the tool call.1910919110    - `RealtimeMcpApprovalRequest object { id, arguments, name, 2 more }`1911119112      A Realtime item requesting human approval of a tool invocation.1911319114      - `id: string`1911519116        The unique ID of the approval request.1911719118      - `arguments: string`1911919120        A JSON string of arguments for the tool.1912119122      - `name: string`1912319124        The name of the tool to run.1912519126      - `server_label: string`1912719128        The label of the MCP server making the request.1912919130      - `type: "mcp_approval_request"`1913119132        The type of the item. Always `mcp_approval_request`.1913319134        - `"mcp_approval_request"`1913519136  - `output_index: number`1913719138    The index of the output item in the Response.1913919140  - `response_id: string`1914119142    The ID of the Response to which the item belongs.1914319144  - `type: "response.output_item.done"`1914519146    The event type, must be `response.output_item.done`.1914719148    - `"response.output_item.done"`1914919150### Response Text Delta Event1915119152- `ResponseTextDeltaEvent object { content_index, delta, event_id, 4 more }`1915319154  Returned when the text value of an "output_text" content part is updated.1915519156  - `content_index: number`1915719158    The index of the content part in the item's content array.1915919160  - `delta: string`1916119162    The text delta.1916319164  - `event_id: string`1916519166    The unique ID of the server event.1916719168  - `item_id: string`1916919170    The ID of the item.1917119172  - `output_index: number`1917319174    The index of the output item in the response.1917519176  - `response_id: string`1917719178    The ID of the response.1917919180  - `type: "response.output_text.delta"`1918119182    The event type, must be `response.output_text.delta`.1918319184    - `"response.output_text.delta"`1918519186### Response Text Done Event1918719188- `ResponseTextDoneEvent object { content_index, event_id, item_id, 4 more }`1918919190  Returned when the text value of an "output_text" content part is done streaming. Also19191  emitted when a Response is interrupted, incomplete, or cancelled.1919219193  - `content_index: number`1919419195    The index of the content part in the item's content array.1919619197  - `event_id: string`1919819199    The unique ID of the server event.1920019201  - `item_id: string`1920219203    The ID of the item.1920419205  - `output_index: number`1920619207    The index of the output item in the response.1920819209  - `response_id: string`1921019211    The ID of the response.1921219213  - `text: string`1921419215    The final text content.1921619217  - `type: "response.output_text.done"`1921819219    The event type, must be `response.output_text.done`.1922019221    - `"response.output_text.done"`1922219223### Session Created Event1922419225- `SessionCreatedEvent object { event_id, session, type }`1922619227  Returned when a Session is created. Emitted automatically when a new19228  connection is established as the first server event. This event will contain19229  the default Session configuration.1923019231  - `event_id: string`1923219233    The unique ID of the server event.1923419235  - `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`1923619237    The session configuration.1923819239    - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`1924019241      A Realtime session configuration object.1924219243      - `id: string`1924419245        Unique identifier for the session that looks like `sess_1234567890abcdef`.1924619247      - `object: "realtime.session"`1924819249        The object type. Always `realtime.session`.1925019251        - `"realtime.session"`1925219253      - `type: "realtime"`1925419255        The type of session to create. Always `realtime` for the Realtime API.1925619257        - `"realtime"`1925819259      - `audio: optional object { input, output }`1926019261        Configuration for input and output audio.1926219263        - `input: optional object { format, noise_reduction, transcription, turn_detection }`1926419265          - `format: optional RealtimeAudioFormats`1926619267            The format of the input audio.1926819269            - `PCMAudio object { rate, type }`1927019271              The PCM audio format. Only a 24kHz sample rate is supported.1927219273              - `rate: optional 24000`1927419275                The sample rate of the audio. Always `24000`.1927619277                - `24000`1927819279              - `type: optional "audio/pcm"`1928019281                The audio format. Always `audio/pcm`.1928219283                - `"audio/pcm"`1928419285            - `PCMUAudio object { type }`1928619287              The G.711 μ-law format.1928819289              - `type: optional "audio/pcmu"`1929019291                The audio format. Always `audio/pcmu`.1929219293                - `"audio/pcmu"`1929419295            - `PCMAAudio object { type }`1929619297              The G.711 A-law format.1929819299              - `type: optional "audio/pcma"`1930019301                The audio format. Always `audio/pcma`.1930219303                - `"audio/pcma"`1930419305          - `noise_reduction: optional object { type }`1930619307            Configuration for input audio noise reduction. This can be set to `null` to turn off.19308            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.19309            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.1931019311            - `type: optional NoiseReductionType`1931219313              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.1931419315              - `"near_field"`1931619317              - `"far_field"`1931819319          - `transcription: optional object { language, languages, model, prompt }`1932019321            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.1932219323            - `language: optional string`1932419325              The language of the input audio.1932619327            - `languages: optional array of string`1932819329              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.1933019331            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1933219333              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1933419335              - `string`1933619337              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`1933819339                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.1934019341                - `"whisper-1"`1934219343                - `"gpt-transcribe"`1934419345                - `"gpt-live-transcribe"`1934619347                - `"gpt-4o-mini-transcribe"`1934819349                - `"gpt-4o-mini-transcribe-2025-12-15"`1935019351                - `"gpt-4o-transcribe"`1935219353                - `"gpt-4o-transcribe-diarize"`1935419355                - `"gpt-realtime-whisper"`1935619357            - `prompt: optional string`1935819359              The prompt configured for input audio transcription, when present.1936019361          - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`1936219363            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.1936419365            Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.1936619367            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.1936819369            For `gpt-realtime-whisper` transcription sessions, turn detection must be19370            set to `null`; VAD is not supported.1937119372            - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`1937319374              Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.1937519376              - `type: "server_vad"`1937719378                Type of turn detection, `server_vad` to turn on simple Server VAD.1937919380                - `"server_vad"`1938119382              - `create_response: optional boolean`1938319384                Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.1938519386                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1938719388              - `idle_timeout_ms: optional number or null`1938919390                Optional timeout after which a model response will be triggered automatically. This is19391                useful for situations in which a long pause from the user is unexpected, such as a phone19392                call. The model will effectively prompt the user to continue the conversation based19393                on the current context.1939419395                The timeout value will be applied after the last model response's audio has finished playing,19396                i.e. it's set to the `response.done` time plus audio playback duration.1939719398                An `input_audio_buffer.timeout_triggered` event (plus events19399                associated with the Response) will be emitted when the timeout is reached.19400                Idle timeout is currently only supported for `server_vad` mode.1940119402              - `interrupt_response: optional boolean`1940319404                Whether or not to automatically interrupt (cancel) any ongoing response with output to the default19405                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.1940619407                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.1940819409              - `prefix_padding_ms: optional number`1941019411                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in19412                milliseconds). Defaults to 300ms.1941319414              - `silence_duration_ms: optional number`1941519416                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults19417                to 500ms. With shorter values the model will respond more quickly,19418                but may jump in on short pauses from the user.1941919420              - `threshold: optional number`1942119422                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A19423                higher threshold will require louder audio to activate the model, and19424                thus might perform better in noisy environments.1942519426            - `SemanticVad object { type, create_response, eagerness, interrupt_response }`1942719428              Server-side semantic turn detection which uses a model to determine when the user has finished speaking.1942919430              - `type: "semantic_vad"`1943119432                Type of turn detection, `semantic_vad` to turn on Semantic VAD.1943319434                - `"semantic_vad"`1943519436              - `create_response: optional boolean`1943719438                Whether or not to automatically generate a response when a VAD stop event occurs.1943919440              - `eagerness: optional "low" or "medium" or "high" or "auto"`1944119442                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.1944319444                - `"low"`1944519446                - `"medium"`1944719448                - `"high"`1944919450                - `"auto"`1945119452              - `interrupt_response: optional boolean`1945319454                Whether or not to automatically interrupt any ongoing response with output to the default19455                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.1945619457        - `output: optional object { format, speed, voice }`1945819459          - `format: optional RealtimeAudioFormats`1946019461            The format of the output audio.1946219463          - `speed: optional number`1946419465            The speed of the model's spoken response as a multiple of the original speed.19466            1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.1946719468            This parameter is a post-processing adjustment to the audio after it is generated, it's19469            also possible to prompt the model to speak faster or slower.1947019471          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`1947219473            The voice the model uses to respond. Voice cannot be changed during the19474            session once the model has responded with audio at least once. Current19475            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,19476            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for19477            best quality.1947819479            - `string`1948019481            - `"alloy" or "ash" or "ballad" or 7 more`1948219483              The voice the model uses to respond. Voice cannot be changed during the19484              session once the model has responded with audio at least once. Current19485              voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,19486              `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for19487              best quality.1948819489              - `"alloy"`1949019491              - `"ash"`1949219493              - `"ballad"`1949419495              - `"coral"`1949619497              - `"echo"`1949819499              - `"sage"`1950019501              - `"shimmer"`1950219503              - `"verse"`1950419505              - `"marin"`1950619507              - `"cedar"`1950819509      - `expires_at: optional number`1951019511        Expiration timestamp for the session, in seconds since epoch.1951219513      - `include: optional array of "item.input_audio_transcription.logprobs"`1951419515        Additional fields to include in server outputs.1951619517        `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.1951819519        - `"item.input_audio_transcription.logprobs"`1952019521      - `instructions: optional string`1952219523        The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.1952419525        Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.1952619527      - `max_output_tokens: optional number or "inf"`1952819529        Maximum number of output tokens for a single assistant response,19530        inclusive of tool calls. Provide an integer between 1 and 4096 to19531        limit output tokens, or `inf` for the maximum available tokens for a19532        given model. Defaults to `inf`.1953319534        - `number`1953519536        - `"inf"`1953719538          - `"inf"`1953919540      - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1954119542        The Realtime model used for this session.1954319544        - `string`1954519546        - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`1954719548          The Realtime model used for this session.1954919550          - `"gpt-realtime"`1955119552          - `"gpt-realtime-1.5"`1955319554          - `"gpt-realtime-2"`1955519556          - `"gpt-realtime-2.1"`1955719558          - `"gpt-realtime-2.1-mini"`1955919560          - `"gpt-realtime-2025-08-28"`1956119562          - `"gpt-4o-realtime-preview"`1956319564          - `"gpt-4o-realtime-preview-2024-10-01"`1956519566          - `"gpt-4o-realtime-preview-2024-12-17"`1956719568          - `"gpt-4o-realtime-preview-2025-06-03"`1956919570          - `"gpt-4o-mini-realtime-preview"`1957119572          - `"gpt-4o-mini-realtime-preview-2024-12-17"`1957319574          - `"gpt-realtime-mini"`1957519576          - `"gpt-realtime-mini-2025-10-06"`1957719578          - `"gpt-realtime-mini-2025-12-15"`1957919580          - `"gpt-audio-1.5"`1958119582          - `"gpt-audio-mini"`1958319584          - `"gpt-audio-mini-2025-10-06"`1958519586          - `"gpt-audio-mini-2025-12-15"`1958719588      - `output_modalities: optional array of "text" or "audio"`1958919590        The set of modalities the model can respond with. It defaults to `["audio"]`, indicating19591        that the model will respond with audio plus a transcript. `["text"]` can be used to make19592        the model respond with text only. It is not possible to request both `text` and `audio` at the same time.1959319594        - `"text"`1959519596        - `"audio"`1959719598      - `prompt: optional ResponsePrompt or null`1959919600        Reference to a prompt template and its variables.19601        [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).1960219603        - `id: string`1960419605          The unique identifier of the prompt template to use.1960619607        - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`1960819609          Optional map of values to substitute in for variables in your19610          prompt. The substitution values can either be strings, or other19611          Response input types like images or files.1961219613          - `string`1961419615          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`1961619617            A text input to the model.1961819619            - `text: string`1962019621              The text input to the model.1962219623            - `type: "input_text"`1962419625              The type of the input item. Always `input_text`.1962619627              - `"input_text"`1962819629            - `prompt_cache_breakpoint: optional object { mode }`1963019631              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.1963219633              - `mode: "explicit"`1963419635                The breakpoint mode. Always `explicit`.1963619637                - `"explicit"`1963819639          - `ResponseInputImage object { detail, type, file_id, 2 more }`1964019641            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).1964219643            - `detail: ImageDetail`1964419645              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.1964619647              - `"low"`1964819649              - `"high"`1965019651              - `"auto"`1965219653              - `"original"`1965419655            - `type: "input_image"`1965619657              The type of the input item. Always `input_image`.1965819659              - `"input_image"`1966019661            - `file_id: optional string or null`1966219663              The ID of the file to be sent to the model.1966419665            - `image_url: optional string or null`1966619667              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.1966819669            - `prompt_cache_breakpoint: optional object { mode }`1967019671              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.1967219673              - `mode: "explicit"`1967419675                The breakpoint mode. Always `explicit`.1967619677                - `"explicit"`1967819679          - `ResponseInputFile object { type, detail, file_data, 4 more }`1968019681            A file input to the model.1968219683            - `type: "input_file"`1968419685              The type of the input item. Always `input_file`.1968619687              - `"input_file"`1968819689            - `detail: optional "auto" or "low" or "high"`1969019691              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`.1969219693              - `"auto"`1969419695              - `"low"`1969619697              - `"high"`1969819699            - `file_data: optional string`1970019701              The content of the file to be sent to the model.1970219703            - `file_id: optional string or null`1970419705              The ID of the file to be sent to the model.1970619707            - `file_url: optional string`1970819709              The URL of the file to be sent to the model.1971019711            - `filename: optional string`1971219713              The name of the file to be sent to the model.1971419715            - `prompt_cache_breakpoint: optional object { mode }`1971619717              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.1971819719              - `mode: "explicit"`1972019721                The breakpoint mode. Always `explicit`.1972219723                - `"explicit"`1972419725        - `version: optional string or null`1972619727          Optional version of the prompt template.1972819729      - `reasoning: optional RealtimeReasoning`1973019731        Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.1973219733        - `effort: optional RealtimeReasoningEffort`1973419735          Constrains effort on reasoning for reasoning-capable Realtime models such as19736          `gpt-realtime-2`.1973719738          - `"minimal"`1973919740          - `"low"`1974119742          - `"medium"`1974319744          - `"high"`1974519746          - `"xhigh"`1974719748      - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`1974919750        How the model chooses tools. Provide one of the string modes or force a specific19751        function/MCP tool.1975219753        - `ToolChoiceOptions = "none" or "auto" or "required"`1975419755          Controls which (if any) tool is called by the model.1975619757          `none` means the model will not call any tool and instead generates a message.1975819759          `auto` means the model can pick between generating a message or calling one or19760          more tools.1976119762          `required` means the model must call one or more tools.1976319764          - `"none"`1976519766          - `"auto"`1976719768          - `"required"`1976919770        - `ToolChoiceFunction object { name, type }`1977119772          Use this option to force the model to call a specific function.1977319774          - `name: string`1977519776            The name of the function to call.1977719778          - `type: "function"`1977919780            For function calling, the type is always `function`.1978119782            - `"function"`1978319784        - `ToolChoiceMcp object { server_label, type, name }`1978519786          Use this option to force the model to call a specific tool on a remote MCP server.1978719788          - `server_label: string`1978919790            The label of the MCP server to use.1979119792          - `type: "mcp"`1979319794            For MCP tools, the type is always `mcp`.1979519796            - `"mcp"`1979719798          - `name: optional string or null`1979919800            The name of the tool to call on the server.1980119802      - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`1980319804        Tools available to the model.1980519806        - `RealtimeFunctionTool object { description, name, parameters, type }`1980719808          - `description: optional string`1980919810            The description of the function, including guidance on when and how19811            to call it, and guidance about what to tell the user when calling19812            (if anything).1981319814          - `name: optional string`1981519816            The name of the function.1981719818          - `parameters: optional unknown`1981919820            Parameters of the function in JSON Schema.1982119822          - `type: optional "function"`1982319824            The type of the tool, i.e. `function`.1982519826            - `"function"`1982719828        - `McpTool object { server_label, type, allowed_callers, 9 more }`1982919830          Give the model access to additional tools via remote Model Context Protocol19831          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).1983219833          - `server_label: string`1983419835            A label for this MCP server, used to identify it in tool calls.1983619837          - `type: "mcp"`1983819839            The type of the MCP tool. Always `mcp`.1984019841            - `"mcp"`1984219843          - `allowed_callers: optional array of "direct" or "programmatic" or null`1984419845            The tool invocation context(s).1984619847            - `"direct"`1984819849            - `"programmatic"`1985019851          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`1985219853            List of allowed tool names or a filter object.1985419855            - `McpAllowedTools = array of string`1985619857              A string array of allowed tool names1985819859            - `McpToolFilter object { read_only, tool_names }`1986019861              A filter object to specify which tools are allowed.1986219863              - `read_only: optional boolean`1986419865                Indicates whether or not a tool modifies data or is read-only. If an19866                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),19867                it will match this filter.1986819869              - `tool_names: optional array of string`1987019871                List of allowed tool names.1987219873          - `authorization: optional string`1987419875            An OAuth access token that can be used with a remote MCP server, either19876            with a custom MCP server URL or a service connector. Your application19877            must handle the OAuth authorization flow and provide the token here.1987819879          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`1988019881            Identifier for service connectors, like those available in ChatGPT. One of19882            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more19883            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).1988419885            This field is deprecated for models released after September 1, 2026.19886            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to19887            connect through a Secure MCP Tunnel.1988819889            Currently supported `connector_id` values are:1989019891            - Dropbox: `connector_dropbox`19892            - Gmail: `connector_gmail`19893            - Google Calendar: `connector_googlecalendar`19894            - Google Drive: `connector_googledrive`19895            - Microsoft Teams: `connector_microsoftteams`19896            - Outlook Calendar: `connector_outlookcalendar`19897            - Outlook Email: `connector_outlookemail`19898            - SharePoint: `connector_sharepoint`1989919900            - `"connector_dropbox"`1990119902            - `"connector_gmail"`1990319904            - `"connector_googlecalendar"`1990519906            - `"connector_googledrive"`1990719908            - `"connector_microsoftteams"`1990919910            - `"connector_outlookcalendar"`1991119912            - `"connector_outlookemail"`1991319914            - `"connector_sharepoint"`1991519916          - `defer_loading: optional boolean`1991719918            Whether this MCP tool is deferred and discovered via tool search.1991919920          - `headers: optional map[string] or null`1992119922            Optional HTTP headers to send to the MCP server. Use for authentication19923            or other purposes.1992419925          - `require_approval: optional object { always, never }  or "always" or "never" or null`1992619927            Specify which of the MCP server's tools require approval.1992819929            - `McpToolApprovalFilter object { always, never }`1993019931              Specify which of the MCP server's tools require approval. Can be19932              `always`, `never`, or a filter object associated with tools19933              that require approval.1993419935              - `always: optional object { read_only, tool_names }`1993619937                A filter object to specify which tools are allowed.1993819939                - `read_only: optional boolean`1994019941                  Indicates whether or not a tool modifies data or is read-only. If an19942                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),19943                  it will match this filter.1994419945                - `tool_names: optional array of string`1994619947                  List of allowed tool names.1994819949              - `never: optional object { read_only, tool_names }`1995019951                A filter object to specify which tools are allowed.1995219953                - `read_only: optional boolean`1995419955                  Indicates whether or not a tool modifies data or is read-only. If an19956                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),19957                  it will match this filter.1995819959                - `tool_names: optional array of string`1996019961                  List of allowed tool names.1996219963            - `McpToolApprovalSetting = "always" or "never"`1996419965              Specify a single approval policy for all tools. One of `always` or19966              `never`. When set to `always`, all tools will require approval. When19967              set to `never`, all tools will not require approval.1996819969              - `"always"`1997019971              - `"never"`1997219973          - `server_description: optional string`1997419975            Optional description of the MCP server, used to provide more context.1997619977          - `server_url: optional string`1997819979            The URL for the MCP server. One of `server_url`, `connector_id`, or19980            `tunnel_id` must be provided.1998119982          - `tunnel_id: optional string`1998319984            The Secure MCP Tunnel ID to use instead of a direct server URL. One of19985            `server_url`, `connector_id`, or `tunnel_id` must be provided.1998619987      - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`1998819989        Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once19990        tracing is enabled for a session, the configuration cannot be modified.1999119992        `auto` will create a trace for the session with default values for the19993        workflow name, group id, and metadata.1999419995        - `Auto = "auto"`1999619997          Enables tracing and sets default values for tracing configuration options. Always `auto`.1999819999          - `"auto"`2000020001        - `TracingConfiguration object { group_id, metadata, workflow_name }`2000220003          Granular configuration for tracing.2000420005          - `group_id: optional string`2000620007            The group id to attach to this trace to enable filtering and20008            grouping in the Traces Dashboard.2000920010          - `metadata: optional unknown`2001120012            The arbitrary metadata to attach to this trace to enable20013            filtering in the Traces Dashboard.2001420015          - `workflow_name: optional string`2001620017            The name of the workflow to attach to this trace. This is used to20018            name the trace in the Traces Dashboard.2001920020      - `truncation: optional RealtimeTruncation`2002120022        When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2002320024        Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2002520026        Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2002720028        Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2002920030        - `"auto" or "disabled"`2003120032          The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2003320034          - `"auto"`2003520036          - `"disabled"`2003720038        - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2003920040          Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2004120042          - `retention_ratio: number`2004320044            Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2004520046          - `type: "retention_ratio"`2004720048            Use retention ratio truncation.2004920050            - `"retention_ratio"`2005120052          - `token_limits: optional object { post_instructions }`2005320054            Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2005520056            - `post_instructions: optional number`2005720058              Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2005920060    - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`2006120062      A Realtime transcription session configuration object.2006320064      - `id: string`2006520066        Unique identifier for the session that looks like `sess_1234567890abcdef`.2006720068      - `object: string`2006920070        The object type. Always `realtime.transcription_session`.2007120072      - `type: "transcription"`2007320074        The type of session. Always `transcription` for transcription sessions.2007520076        - `"transcription"`2007720078      - `audio: optional object { input }`2007920080        Configuration for input audio for the session.2008120082        - `input: optional object { format, noise_reduction, transcription, turn_detection }`2008320084          - `format: optional RealtimeAudioFormats`2008520086            The PCM audio format. Only a 24kHz sample rate is supported.2008720088          - `noise_reduction: optional object { type }`2008920090            Configuration for input audio noise reduction.2009120092            - `type: optional NoiseReductionType`2009320094              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2009520096          - `transcription: optional object { language, languages, model, prompt }`2009720098            Configuration of the transcription model.2009920100            - `language: optional string`2010120102              The language of the input audio.2010320104            - `languages: optional array of string`2010520106              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2010720108            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2010920110              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2011120112              - `string`2011320114              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2011520116                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2011720118                - `"whisper-1"`2011920120                - `"gpt-transcribe"`2012120122                - `"gpt-live-transcribe"`2012320124                - `"gpt-4o-mini-transcribe"`2012520126                - `"gpt-4o-mini-transcribe-2025-12-15"`2012720128                - `"gpt-4o-transcribe"`2012920130                - `"gpt-4o-transcribe-diarize"`2013120132                - `"gpt-realtime-whisper"`2013320134            - `prompt: optional string`2013520136              The prompt configured for input audio transcription, when present.2013720138          - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`2013920140            Configuration for turn detection. Can be set to `null` to turn off. Server20141            VAD means that the model will detect the start and end of speech based on20142            audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2014320144            - `prefix_padding_ms: optional number`2014520146              Amount of audio to include before the VAD detected speech (in20147              milliseconds). Defaults to 300ms.2014820149            - `silence_duration_ms: optional number`2015020151              Duration of silence to detect speech stop (in milliseconds). Defaults20152              to 500ms. With shorter values the model will respond more quickly,20153              but may jump in on short pauses from the user.2015420155            - `threshold: optional number`2015620157              Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A20158              higher threshold will require louder audio to activate the model, and20159              thus might perform better in noisy environments.2016020161            - `type: optional string`2016220163              Type of turn detection, only `server_vad` is currently supported.2016420165      - `expires_at: optional number`2016620167        Expiration timestamp for the session, in seconds since epoch.2016820169      - `include: optional array of "item.input_audio_transcription.logprobs"`2017020171        Additional fields to include in server outputs.2017220173        - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2017420175        - `"item.input_audio_transcription.logprobs"`2017620177  - `type: "session.created"`2017820179    The event type, must be `session.created`.2018020181    - `"session.created"`2018220183### Session Update Event2018420185- `SessionUpdateEvent object { session, type, event_id }`2018620187  Send this event to update the session’s configuration.20188  The client may send this event at any time to update any field20189  except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.2019020191  When the server receives a `session.update`, it will respond20192  with a `session.updated` event showing the full, effective configuration.20193  Only the fields that are present in the `session.update` are updated. To clear a field like20194  `instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.20195  To clear a field like `turn_detection`, pass `null`.2019620197  - `session: RealtimeSessionCreateRequest or RealtimeTranscriptionSessionCreateRequest`2019820199    Update the Realtime session. Choose either a realtime20200    session or a transcription session.2020120202    - `RealtimeSessionCreateRequest object { type, audio, include, 11 more }`2020320204      Realtime session object configuration.2020520206      - `type: "realtime"`2020720208        The type of session to create. Always `realtime` for the Realtime API.2020920210        - `"realtime"`2021120212      - `audio: optional RealtimeAudioConfig`2021320214        Configuration for input and output audio.2021520216        - `input: optional RealtimeAudioConfigInput`2021720218          - `format: optional RealtimeAudioFormats`2021920220            The format of the input audio.2022120222            - `PCMAudio object { rate, type }`2022320224              The PCM audio format. Only a 24kHz sample rate is supported.2022520226              - `rate: optional 24000`2022720228                The sample rate of the audio. Always `24000`.2022920230                - `24000`2023120232              - `type: optional "audio/pcm"`2023320234                The audio format. Always `audio/pcm`.2023520236                - `"audio/pcm"`2023720238            - `PCMUAudio object { type }`2023920240              The G.711 μ-law format.2024120242              - `type: optional "audio/pcmu"`2024320244                The audio format. Always `audio/pcmu`.2024520246                - `"audio/pcmu"`2024720248            - `PCMAAudio object { type }`2024920250              The G.711 A-law format.2025120252              - `type: optional "audio/pcma"`2025320254                The audio format. Always `audio/pcma`.2025520256                - `"audio/pcma"`2025720258          - `noise_reduction: optional object { type }`2025920260            Configuration for input audio noise reduction. This can be set to `null` to turn off.20261            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.20262            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2026320264            - `type: optional NoiseReductionType`2026520266              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2026720268              - `"near_field"`2026920270              - `"far_field"`2027120272          - `transcription: optional AudioTranscription`2027320274            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2027520276            - `delay: optional "minimal" or "low" or "medium" or 2 more`2027720278              Controls how long the model waits before emitting transcription text.20279              Higher values can improve transcription accuracy at the cost of latency.20280              Only supported with `gpt-realtime-whisper` in GA Realtime sessions.2028120282              - `"minimal"`2028320284              - `"low"`2028520286              - `"medium"`2028720288              - `"high"`2028920290              - `"xhigh"`2029120292            - `keywords: optional array of string`2029320294              Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2029520296            - `language: optional string`2029720298              The language of the input audio. Supplying the input language in20299              [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format20300              will improve accuracy and latency.2030120302            - `languages: optional array of string`2030320304              Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2030520306            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2030720308              The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2030920310              - `string`2031120312              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2031320314                The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2031520316                - `"whisper-1"`2031720318                - `"gpt-transcribe"`2031920320                - `"gpt-live-transcribe"`2032120322                - `"gpt-4o-mini-transcribe"`2032320324                - `"gpt-4o-mini-transcribe-2025-12-15"`2032520326                - `"gpt-4o-transcribe"`2032720328                - `"gpt-4o-transcribe-diarize"`2032920330                - `"gpt-realtime-whisper"`2033120332            - `prompt: optional string`2033320334              An optional text to guide the model's style or continue a previous audio20335              segment.20336              For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).20337              For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".20338              Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.2033920340          - `turn_detection: optional RealtimeAudioInputTurnDetection or null`2034120342            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2034320344            Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2034520346            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2034720348            For `gpt-realtime-whisper` transcription sessions, turn detection must be20349            set to `null`; VAD is not supported.2035020351            - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2035220353              Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2035420355              - `type: "server_vad"`2035620357                Type of turn detection, `server_vad` to turn on simple Server VAD.2035820359                - `"server_vad"`2036020361              - `create_response: optional boolean`2036220363                Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2036420365                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2036620367              - `idle_timeout_ms: optional number or null`2036820369                Optional timeout after which a model response will be triggered automatically. This is20370                useful for situations in which a long pause from the user is unexpected, such as a phone20371                call. The model will effectively prompt the user to continue the conversation based20372                on the current context.2037320374                The timeout value will be applied after the last model response's audio has finished playing,20375                i.e. it's set to the `response.done` time plus audio playback duration.2037620377                An `input_audio_buffer.timeout_triggered` event (plus events20378                associated with the Response) will be emitted when the timeout is reached.20379                Idle timeout is currently only supported for `server_vad` mode.2038020381              - `interrupt_response: optional boolean`2038220383                Whether or not to automatically interrupt (cancel) any ongoing response with output to the default20384                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2038520386                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2038720388              - `prefix_padding_ms: optional number`2038920390                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in20391                milliseconds). Defaults to 300ms.2039220393              - `silence_duration_ms: optional number`2039420395                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults20396                to 500ms. With shorter values the model will respond more quickly,20397                but may jump in on short pauses from the user.2039820399              - `threshold: optional number`2040020401                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A20402                higher threshold will require louder audio to activate the model, and20403                thus might perform better in noisy environments.2040420405            - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2040620407              Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2040820409              - `type: "semantic_vad"`2041020411                Type of turn detection, `semantic_vad` to turn on Semantic VAD.2041220413                - `"semantic_vad"`2041420415              - `create_response: optional boolean`2041620417                Whether or not to automatically generate a response when a VAD stop event occurs.2041820419              - `eagerness: optional "low" or "medium" or "high" or "auto"`2042020421                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2042220423                - `"low"`2042420425                - `"medium"`2042620427                - `"high"`2042820429                - `"auto"`2043020431              - `interrupt_response: optional boolean`2043220433                Whether or not to automatically interrupt any ongoing response with output to the default20434                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2043520436        - `output: optional RealtimeAudioConfigOutput`2043720438          - `format: optional RealtimeAudioFormats`2043920440            The format of the output audio.2044120442          - `speed: optional number`2044320444            The speed of the model's spoken response as a multiple of the original speed.20445            1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2044620447            This parameter is a post-processing adjustment to the audio after it is generated, it's20448            also possible to prompt the model to speak faster or slower.2044920450          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`2045120452            The voice the model uses to respond. Supported built-in voices are20453            `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,20454            `marin`, and `cedar`. You may also provide a custom voice object with20455            an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed20456            during the session once the model has responded with audio at least once.20457            We recommend `marin` and `cedar` for best quality.2045820459            - `string`2046020461            - `"alloy" or "ash" or "ballad" or 7 more`2046220463              - `"alloy"`2046420465              - `"ash"`2046620467              - `"ballad"`2046820469              - `"coral"`2047020471              - `"echo"`2047220473              - `"sage"`2047420475              - `"shimmer"`2047620477              - `"verse"`2047820479              - `"marin"`2048020481              - `"cedar"`2048220483            - `ID object { id }`2048420485              Custom voice reference.2048620487              - `id: string`2048820489                The custom voice ID, e.g. `voice_1234`.2049020491      - `include: optional array of "item.input_audio_transcription.logprobs"`2049220493        Additional fields to include in server outputs.2049420495        `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2049620497        - `"item.input_audio_transcription.logprobs"`2049820499      - `instructions: optional string`2050020501        The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2050220503        Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2050420505      - `max_output_tokens: optional number or "inf"`2050620507        Maximum number of output tokens for a single assistant response,20508        inclusive of tool calls. Provide an integer between 1 and 4096 to20509        limit output tokens, or `inf` for the maximum available tokens for a20510        given model. Defaults to `inf`.2051120512        - `number`2051320514        - `"inf"`2051520516          - `"inf"`2051720518      - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2051920520        The Realtime model used for this session.2052120522        - `string`2052320524        - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2052520526          The Realtime model used for this session.2052720528          - `"gpt-realtime"`2052920530          - `"gpt-realtime-1.5"`2053120532          - `"gpt-realtime-2"`2053320534          - `"gpt-realtime-2.1"`2053520536          - `"gpt-realtime-2.1-mini"`2053720538          - `"gpt-realtime-2025-08-28"`2053920540          - `"gpt-4o-realtime-preview"`2054120542          - `"gpt-4o-realtime-preview-2024-10-01"`2054320544          - `"gpt-4o-realtime-preview-2024-12-17"`2054520546          - `"gpt-4o-realtime-preview-2025-06-03"`2054720548          - `"gpt-4o-mini-realtime-preview"`2054920550          - `"gpt-4o-mini-realtime-preview-2024-12-17"`2055120552          - `"gpt-realtime-mini"`2055320554          - `"gpt-realtime-mini-2025-10-06"`2055520556          - `"gpt-realtime-mini-2025-12-15"`2055720558          - `"gpt-audio-1.5"`2055920560          - `"gpt-audio-mini"`2056120562          - `"gpt-audio-mini-2025-10-06"`2056320564          - `"gpt-audio-mini-2025-12-15"`2056520566      - `output_modalities: optional array of "text" or "audio"`2056720568        The set of modalities the model can respond with. It defaults to `["audio"]`, indicating20569        that the model will respond with audio plus a transcript. `["text"]` can be used to make20570        the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2057120572        - `"text"`2057320574        - `"audio"`2057520576      - `parallel_tool_calls: optional boolean`2057720578        Whether the model may call multiple tools in parallel. Only supported by20579        reasoning Realtime models such as `gpt-realtime-2`.2058020581      - `prompt: optional ResponsePrompt or null`2058220583        Reference to a prompt template and its variables.20584        [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2058520586        - `id: string`2058720588          The unique identifier of the prompt template to use.2058920590        - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2059120592          Optional map of values to substitute in for variables in your20593          prompt. The substitution values can either be strings, or other20594          Response input types like images or files.2059520596          - `string`2059720598          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2059920600            A text input to the model.2060120602            - `text: string`2060320604              The text input to the model.2060520606            - `type: "input_text"`2060720608              The type of the input item. Always `input_text`.2060920610              - `"input_text"`2061120612            - `prompt_cache_breakpoint: optional object { mode }`2061320614              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.2061520616              - `mode: "explicit"`2061720618                The breakpoint mode. Always `explicit`.2061920620                - `"explicit"`2062120622          - `ResponseInputImage object { detail, type, file_id, 2 more }`2062320624            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2062520626            - `detail: ImageDetail`2062720628              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2062920630              - `"low"`2063120632              - `"high"`2063320634              - `"auto"`2063520636              - `"original"`2063720638            - `type: "input_image"`2063920640              The type of the input item. Always `input_image`.2064120642              - `"input_image"`2064320644            - `file_id: optional string or null`2064520646              The ID of the file to be sent to the model.2064720648            - `image_url: optional string or null`2064920650              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2065120652            - `prompt_cache_breakpoint: optional object { mode }`2065320654              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.2065520656              - `mode: "explicit"`2065720658                The breakpoint mode. Always `explicit`.2065920660                - `"explicit"`2066120662          - `ResponseInputFile object { type, detail, file_data, 4 more }`2066320664            A file input to the model.2066520666            - `type: "input_file"`2066720668              The type of the input item. Always `input_file`.2066920670              - `"input_file"`2067120672            - `detail: optional "auto" or "low" or "high"`2067320674              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`.2067520676              - `"auto"`2067720678              - `"low"`2067920680              - `"high"`2068120682            - `file_data: optional string`2068320684              The content of the file to be sent to the model.2068520686            - `file_id: optional string or null`2068720688              The ID of the file to be sent to the model.2068920690            - `file_url: optional string`2069120692              The URL of the file to be sent to the model.2069320694            - `filename: optional string`2069520696              The name of the file to be sent to the model.2069720698            - `prompt_cache_breakpoint: optional object { mode }`2069920700              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.2070120702              - `mode: "explicit"`2070320704                The breakpoint mode. Always `explicit`.2070520706                - `"explicit"`2070720708        - `version: optional string or null`2070920710          Optional version of the prompt template.2071120712      - `reasoning: optional RealtimeReasoning`2071320714        Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2071520716        - `effort: optional RealtimeReasoningEffort`2071720718          Constrains effort on reasoning for reasoning-capable Realtime models such as20719          `gpt-realtime-2`.2072020721          - `"minimal"`2072220723          - `"low"`2072420725          - `"medium"`2072620727          - `"high"`2072820729          - `"xhigh"`2073020731      - `tool_choice: optional RealtimeToolChoiceConfig`2073220733        How the model chooses tools. Provide one of the string modes or force a specific20734        function/MCP tool.2073520736        - `ToolChoiceOptions = "none" or "auto" or "required"`2073720738          Controls which (if any) tool is called by the model.2073920740          `none` means the model will not call any tool and instead generates a message.2074120742          `auto` means the model can pick between generating a message or calling one or20743          more tools.2074420745          `required` means the model must call one or more tools.2074620747          - `"none"`2074820749          - `"auto"`2075020751          - `"required"`2075220753        - `ToolChoiceFunction object { name, type }`2075420755          Use this option to force the model to call a specific function.2075620757          - `name: string`2075820759            The name of the function to call.2076020761          - `type: "function"`2076220763            For function calling, the type is always `function`.2076420765            - `"function"`2076620767        - `ToolChoiceMcp object { server_label, type, name }`2076820769          Use this option to force the model to call a specific tool on a remote MCP server.2077020771          - `server_label: string`2077220773            The label of the MCP server to use.2077420775          - `type: "mcp"`2077620777            For MCP tools, the type is always `mcp`.2077820779            - `"mcp"`2078020781          - `name: optional string or null`2078220783            The name of the tool to call on the server.2078420785      - `tools: optional RealtimeToolsConfig`2078620787        Tools available to the model.2078820789        - `RealtimeFunctionTool object { description, name, parameters, type }`2079020791          - `description: optional string`2079220793            The description of the function, including guidance on when and how20794            to call it, and guidance about what to tell the user when calling20795            (if anything).2079620797          - `name: optional string`2079820799            The name of the function.2080020801          - `parameters: optional unknown`2080220803            Parameters of the function in JSON Schema.2080420805          - `type: optional "function"`2080620807            The type of the tool, i.e. `function`.2080820809            - `"function"`2081020811        - `McpTool object { server_label, type, allowed_callers, 9 more }`2081220813          Give the model access to additional tools via remote Model Context Protocol20814          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2081520816          - `server_label: string`2081720818            A label for this MCP server, used to identify it in tool calls.2081920820          - `type: "mcp"`2082120822            The type of the MCP tool. Always `mcp`.2082320824            - `"mcp"`2082520826          - `allowed_callers: optional array of "direct" or "programmatic" or null`2082720828            The tool invocation context(s).2082920830            - `"direct"`2083120832            - `"programmatic"`2083320834          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2083520836            List of allowed tool names or a filter object.2083720838            - `McpAllowedTools = array of string`2083920840              A string array of allowed tool names2084120842            - `McpToolFilter object { read_only, tool_names }`2084320844              A filter object to specify which tools are allowed.2084520846              - `read_only: optional boolean`2084720848                Indicates whether or not a tool modifies data or is read-only. If an20849                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),20850                it will match this filter.2085120852              - `tool_names: optional array of string`2085320854                List of allowed tool names.2085520856          - `authorization: optional string`2085720858            An OAuth access token that can be used with a remote MCP server, either20859            with a custom MCP server URL or a service connector. Your application20860            must handle the OAuth authorization flow and provide the token here.2086120862          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2086320864            Identifier for service connectors, like those available in ChatGPT. One of20865            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more20866            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2086720868            This field is deprecated for models released after September 1, 2026.20869            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to20870            connect through a Secure MCP Tunnel.2087120872            Currently supported `connector_id` values are:2087320874            - Dropbox: `connector_dropbox`20875            - Gmail: `connector_gmail`20876            - Google Calendar: `connector_googlecalendar`20877            - Google Drive: `connector_googledrive`20878            - Microsoft Teams: `connector_microsoftteams`20879            - Outlook Calendar: `connector_outlookcalendar`20880            - Outlook Email: `connector_outlookemail`20881            - SharePoint: `connector_sharepoint`2088220883            - `"connector_dropbox"`2088420885            - `"connector_gmail"`2088620887            - `"connector_googlecalendar"`2088820889            - `"connector_googledrive"`2089020891            - `"connector_microsoftteams"`2089220893            - `"connector_outlookcalendar"`2089420895            - `"connector_outlookemail"`2089620897            - `"connector_sharepoint"`2089820899          - `defer_loading: optional boolean`2090020901            Whether this MCP tool is deferred and discovered via tool search.2090220903          - `headers: optional map[string] or null`2090420905            Optional HTTP headers to send to the MCP server. Use for authentication20906            or other purposes.2090720908          - `require_approval: optional object { always, never }  or "always" or "never" or null`2090920910            Specify which of the MCP server's tools require approval.2091120912            - `McpToolApprovalFilter object { always, never }`2091320914              Specify which of the MCP server's tools require approval. Can be20915              `always`, `never`, or a filter object associated with tools20916              that require approval.2091720918              - `always: optional object { read_only, tool_names }`2091920920                A filter object to specify which tools are allowed.2092120922                - `read_only: optional boolean`2092320924                  Indicates whether or not a tool modifies data or is read-only. If an20925                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),20926                  it will match this filter.2092720928                - `tool_names: optional array of string`2092920930                  List of allowed tool names.2093120932              - `never: optional object { read_only, tool_names }`2093320934                A filter object to specify which tools are allowed.2093520936                - `read_only: optional boolean`2093720938                  Indicates whether or not a tool modifies data or is read-only. If an20939                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),20940                  it will match this filter.2094120942                - `tool_names: optional array of string`2094320944                  List of allowed tool names.2094520946            - `McpToolApprovalSetting = "always" or "never"`2094720948              Specify a single approval policy for all tools. One of `always` or20949              `never`. When set to `always`, all tools will require approval. When20950              set to `never`, all tools will not require approval.2095120952              - `"always"`2095320954              - `"never"`2095520956          - `server_description: optional string`2095720958            Optional description of the MCP server, used to provide more context.2095920960          - `server_url: optional string`2096120962            The URL for the MCP server. One of `server_url`, `connector_id`, or20963            `tunnel_id` must be provided.2096420965          - `tunnel_id: optional string`2096620967            The Secure MCP Tunnel ID to use instead of a direct server URL. One of20968            `server_url`, `connector_id`, or `tunnel_id` must be provided.2096920970      - `tracing: optional RealtimeTracingConfig or null`2097120972        Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once20973        tracing is enabled for a session, the configuration cannot be modified.2097420975        `auto` will create a trace for the session with default values for the20976        workflow name, group id, and metadata.2097720978        - `Auto = "auto"`2097920980          Enables tracing and sets default values for tracing configuration options. Always `auto`.2098120982          - `"auto"`2098320984        - `TracingConfiguration object { group_id, metadata, workflow_name }`2098520986          Granular configuration for tracing.2098720988          - `group_id: optional string`2098920990            The group id to attach to this trace to enable filtering and20991            grouping in the Traces Dashboard.2099220993          - `metadata: optional unknown`2099420995            The arbitrary metadata to attach to this trace to enable20996            filtering in the Traces Dashboard.2099720998          - `workflow_name: optional string`2099921000            The name of the workflow to attach to this trace. This is used to21001            name the trace in the Traces Dashboard.2100221003      - `truncation: optional RealtimeTruncation`2100421005        When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2100621007        Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2100821009        Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2101021011        Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2101221013        - `"auto" or "disabled"`2101421015          The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2101621017          - `"auto"`2101821019          - `"disabled"`2102021021        - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2102221023          Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2102421025          - `retention_ratio: number`2102621027            Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2102821029          - `type: "retention_ratio"`2103021031            Use retention ratio truncation.2103221033            - `"retention_ratio"`2103421035          - `token_limits: optional object { post_instructions }`2103621037            Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2103821039            - `post_instructions: optional number`2104021041              Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2104221043    - `RealtimeTranscriptionSessionCreateRequest object { type, audio, include }`2104421045      Realtime transcription session object configuration.2104621047      - `type: "transcription"`2104821049        The type of session to create. Always `transcription` for transcription sessions.2105021051        - `"transcription"`2105221053      - `audio: optional RealtimeTranscriptionSessionAudio`2105421055        Configuration for input and output audio.2105621057        - `input: optional RealtimeTranscriptionSessionAudioInput`2105821059          - `format: optional RealtimeAudioFormats`2106021061            The PCM audio format. Only a 24kHz sample rate is supported.2106221063          - `noise_reduction: optional object { type }`2106421065            Configuration for input audio noise reduction. This can be set to `null` to turn off.21066            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.21067            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2106821069            - `type: optional NoiseReductionType`2107021071              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2107221073          - `transcription: optional AudioTranscription`2107421075            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2107621077          - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`2107821079            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2108021081            Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2108221083            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2108421085            For `gpt-realtime-whisper` transcription sessions, turn detection must be21086            set to `null`; VAD is not supported.2108721088            - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2108921090              Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2109121092              - `type: "server_vad"`2109321094                Type of turn detection, `server_vad` to turn on simple Server VAD.2109521096                - `"server_vad"`2109721098              - `create_response: optional boolean`2109921100                Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2110121102                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2110321104              - `idle_timeout_ms: optional number or null`2110521106                Optional timeout after which a model response will be triggered automatically. This is21107                useful for situations in which a long pause from the user is unexpected, such as a phone21108                call. The model will effectively prompt the user to continue the conversation based21109                on the current context.2111021111                The timeout value will be applied after the last model response's audio has finished playing,21112                i.e. it's set to the `response.done` time plus audio playback duration.2111321114                An `input_audio_buffer.timeout_triggered` event (plus events21115                associated with the Response) will be emitted when the timeout is reached.21116                Idle timeout is currently only supported for `server_vad` mode.2111721118              - `interrupt_response: optional boolean`2111921120                Whether or not to automatically interrupt (cancel) any ongoing response with output to the default21121                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2112221123                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2112421125              - `prefix_padding_ms: optional number`2112621127                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in21128                milliseconds). Defaults to 300ms.2112921130              - `silence_duration_ms: optional number`2113121132                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults21133                to 500ms. With shorter values the model will respond more quickly,21134                but may jump in on short pauses from the user.2113521136              - `threshold: optional number`2113721138                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A21139                higher threshold will require louder audio to activate the model, and21140                thus might perform better in noisy environments.2114121142            - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2114321144              Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2114521146              - `type: "semantic_vad"`2114721148                Type of turn detection, `semantic_vad` to turn on Semantic VAD.2114921150                - `"semantic_vad"`2115121152              - `create_response: optional boolean`2115321154                Whether or not to automatically generate a response when a VAD stop event occurs.2115521156              - `eagerness: optional "low" or "medium" or "high" or "auto"`2115721158                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2115921160                - `"low"`2116121162                - `"medium"`2116321164                - `"high"`2116521166                - `"auto"`2116721168              - `interrupt_response: optional boolean`2116921170                Whether or not to automatically interrupt any ongoing response with output to the default21171                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2117221173      - `include: optional array of "item.input_audio_transcription.logprobs"`2117421175        Additional fields to include in server outputs.2117621177        `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2117821179        - `"item.input_audio_transcription.logprobs"`2118021181  - `type: "session.update"`2118221183    The event type, must be `session.update`.2118421185    - `"session.update"`2118621187  - `event_id: optional string`2118821189    Optional client-generated ID used to identify this event. This is an arbitrary string that a client may assign. It will be passed back if there is an error with the event, but the corresponding `session.updated` event will not include it.2119021191### Session Updated Event2119221193- `SessionUpdatedEvent object { event_id, session, type }`2119421195  Returned when a session is updated with a `session.update` event, unless21196  there is an error.2119721198  - `event_id: string`2119921200    The unique ID of the server event.2120121202  - `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`2120321204    The session configuration.2120521206    - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`2120721208      A Realtime session configuration object.2120921210      - `id: string`2121121212        Unique identifier for the session that looks like `sess_1234567890abcdef`.2121321214      - `object: "realtime.session"`2121521216        The object type. Always `realtime.session`.2121721218        - `"realtime.session"`2121921220      - `type: "realtime"`2122121222        The type of session to create. Always `realtime` for the Realtime API.2122321224        - `"realtime"`2122521226      - `audio: optional object { input, output }`2122721228        Configuration for input and output audio.2122921230        - `input: optional object { format, noise_reduction, transcription, turn_detection }`2123121232          - `format: optional RealtimeAudioFormats`2123321234            The format of the input audio.2123521236            - `PCMAudio object { rate, type }`2123721238              The PCM audio format. Only a 24kHz sample rate is supported.2123921240              - `rate: optional 24000`2124121242                The sample rate of the audio. Always `24000`.2124321244                - `24000`2124521246              - `type: optional "audio/pcm"`2124721248                The audio format. Always `audio/pcm`.2124921250                - `"audio/pcm"`2125121252            - `PCMUAudio object { type }`2125321254              The G.711 μ-law format.2125521256              - `type: optional "audio/pcmu"`2125721258                The audio format. Always `audio/pcmu`.2125921260                - `"audio/pcmu"`2126121262            - `PCMAAudio object { type }`2126321264              The G.711 A-law format.2126521266              - `type: optional "audio/pcma"`2126721268                The audio format. Always `audio/pcma`.2126921270                - `"audio/pcma"`2127121272          - `noise_reduction: optional object { type }`2127321274            Configuration for input audio noise reduction. This can be set to `null` to turn off.21275            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.21276            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2127721278            - `type: optional NoiseReductionType`2127921280              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2128121282              - `"near_field"`2128321284              - `"far_field"`2128521286          - `transcription: optional object { language, languages, model, prompt }`2128721288            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2128921290            - `language: optional string`2129121292              The language of the input audio.2129321294            - `languages: optional array of string`2129521296              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2129721298            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2129921300              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2130121302              - `string`2130321304              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2130521306                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2130721308                - `"whisper-1"`2130921310                - `"gpt-transcribe"`2131121312                - `"gpt-live-transcribe"`2131321314                - `"gpt-4o-mini-transcribe"`2131521316                - `"gpt-4o-mini-transcribe-2025-12-15"`2131721318                - `"gpt-4o-transcribe"`2131921320                - `"gpt-4o-transcribe-diarize"`2132121322                - `"gpt-realtime-whisper"`2132321324            - `prompt: optional string`2132521326              The prompt configured for input audio transcription, when present.2132721328          - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`2132921330            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2133121332            Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2133321334            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2133521336            For `gpt-realtime-whisper` transcription sessions, turn detection must be21337            set to `null`; VAD is not supported.2133821339            - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2134021341              Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2134221343              - `type: "server_vad"`2134421345                Type of turn detection, `server_vad` to turn on simple Server VAD.2134621347                - `"server_vad"`2134821349              - `create_response: optional boolean`2135021351                Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2135221353                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2135421355              - `idle_timeout_ms: optional number or null`2135621357                Optional timeout after which a model response will be triggered automatically. This is21358                useful for situations in which a long pause from the user is unexpected, such as a phone21359                call. The model will effectively prompt the user to continue the conversation based21360                on the current context.2136121362                The timeout value will be applied after the last model response's audio has finished playing,21363                i.e. it's set to the `response.done` time plus audio playback duration.2136421365                An `input_audio_buffer.timeout_triggered` event (plus events21366                associated with the Response) will be emitted when the timeout is reached.21367                Idle timeout is currently only supported for `server_vad` mode.2136821369              - `interrupt_response: optional boolean`2137021371                Whether or not to automatically interrupt (cancel) any ongoing response with output to the default21372                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2137321374                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2137521376              - `prefix_padding_ms: optional number`2137721378                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in21379                milliseconds). Defaults to 300ms.2138021381              - `silence_duration_ms: optional number`2138221383                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults21384                to 500ms. With shorter values the model will respond more quickly,21385                but may jump in on short pauses from the user.2138621387              - `threshold: optional number`2138821389                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A21390                higher threshold will require louder audio to activate the model, and21391                thus might perform better in noisy environments.2139221393            - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2139421395              Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2139621397              - `type: "semantic_vad"`2139821399                Type of turn detection, `semantic_vad` to turn on Semantic VAD.2140021401                - `"semantic_vad"`2140221403              - `create_response: optional boolean`2140421405                Whether or not to automatically generate a response when a VAD stop event occurs.2140621407              - `eagerness: optional "low" or "medium" or "high" or "auto"`2140821409                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2141021411                - `"low"`2141221413                - `"medium"`2141421415                - `"high"`2141621417                - `"auto"`2141821419              - `interrupt_response: optional boolean`2142021421                Whether or not to automatically interrupt any ongoing response with output to the default21422                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2142321424        - `output: optional object { format, speed, voice }`2142521426          - `format: optional RealtimeAudioFormats`2142721428            The format of the output audio.2142921430          - `speed: optional number`2143121432            The speed of the model's spoken response as a multiple of the original speed.21433            1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2143421435            This parameter is a post-processing adjustment to the audio after it is generated, it's21436            also possible to prompt the model to speak faster or slower.2143721438          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2143921440            The voice the model uses to respond. Voice cannot be changed during the21441            session once the model has responded with audio at least once. Current21442            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,21443            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for21444            best quality.2144521446            - `string`2144721448            - `"alloy" or "ash" or "ballad" or 7 more`2144921450              The voice the model uses to respond. Voice cannot be changed during the21451              session once the model has responded with audio at least once. Current21452              voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,21453              `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for21454              best quality.2145521456              - `"alloy"`2145721458              - `"ash"`2145921460              - `"ballad"`2146121462              - `"coral"`2146321464              - `"echo"`2146521466              - `"sage"`2146721468              - `"shimmer"`2146921470              - `"verse"`2147121472              - `"marin"`2147321474              - `"cedar"`2147521476      - `expires_at: optional number`2147721478        Expiration timestamp for the session, in seconds since epoch.2147921480      - `include: optional array of "item.input_audio_transcription.logprobs"`2148121482        Additional fields to include in server outputs.2148321484        `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2148521486        - `"item.input_audio_transcription.logprobs"`2148721488      - `instructions: optional string`2148921490        The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2149121492        Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2149321494      - `max_output_tokens: optional number or "inf"`2149521496        Maximum number of output tokens for a single assistant response,21497        inclusive of tool calls. Provide an integer between 1 and 4096 to21498        limit output tokens, or `inf` for the maximum available tokens for a21499        given model. Defaults to `inf`.2150021501        - `number`2150221503        - `"inf"`2150421505          - `"inf"`2150621507      - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2150821509        The Realtime model used for this session.2151021511        - `string`2151221513        - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2151421515          The Realtime model used for this session.2151621517          - `"gpt-realtime"`2151821519          - `"gpt-realtime-1.5"`2152021521          - `"gpt-realtime-2"`2152221523          - `"gpt-realtime-2.1"`2152421525          - `"gpt-realtime-2.1-mini"`2152621527          - `"gpt-realtime-2025-08-28"`2152821529          - `"gpt-4o-realtime-preview"`2153021531          - `"gpt-4o-realtime-preview-2024-10-01"`2153221533          - `"gpt-4o-realtime-preview-2024-12-17"`2153421535          - `"gpt-4o-realtime-preview-2025-06-03"`2153621537          - `"gpt-4o-mini-realtime-preview"`2153821539          - `"gpt-4o-mini-realtime-preview-2024-12-17"`2154021541          - `"gpt-realtime-mini"`2154221543          - `"gpt-realtime-mini-2025-10-06"`2154421545          - `"gpt-realtime-mini-2025-12-15"`2154621547          - `"gpt-audio-1.5"`2154821549          - `"gpt-audio-mini"`2155021551          - `"gpt-audio-mini-2025-10-06"`2155221553          - `"gpt-audio-mini-2025-12-15"`2155421555      - `output_modalities: optional array of "text" or "audio"`2155621557        The set of modalities the model can respond with. It defaults to `["audio"]`, indicating21558        that the model will respond with audio plus a transcript. `["text"]` can be used to make21559        the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2156021561        - `"text"`2156221563        - `"audio"`2156421565      - `prompt: optional ResponsePrompt or null`2156621567        Reference to a prompt template and its variables.21568        [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2156921570        - `id: string`2157121572          The unique identifier of the prompt template to use.2157321574        - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2157521576          Optional map of values to substitute in for variables in your21577          prompt. The substitution values can either be strings, or other21578          Response input types like images or files.2157921580          - `string`2158121582          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2158321584            A text input to the model.2158521586            - `text: string`2158721588              The text input to the model.2158921590            - `type: "input_text"`2159121592              The type of the input item. Always `input_text`.2159321594              - `"input_text"`2159521596            - `prompt_cache_breakpoint: optional object { mode }`2159721598              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.2159921600              - `mode: "explicit"`2160121602                The breakpoint mode. Always `explicit`.2160321604                - `"explicit"`2160521606          - `ResponseInputImage object { detail, type, file_id, 2 more }`2160721608            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2160921610            - `detail: ImageDetail`2161121612              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2161321614              - `"low"`2161521616              - `"high"`2161721618              - `"auto"`2161921620              - `"original"`2162121622            - `type: "input_image"`2162321624              The type of the input item. Always `input_image`.2162521626              - `"input_image"`2162721628            - `file_id: optional string or null`2162921630              The ID of the file to be sent to the model.2163121632            - `image_url: optional string or null`2163321634              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2163521636            - `prompt_cache_breakpoint: optional object { mode }`2163721638              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.2163921640              - `mode: "explicit"`2164121642                The breakpoint mode. Always `explicit`.2164321644                - `"explicit"`2164521646          - `ResponseInputFile object { type, detail, file_data, 4 more }`2164721648            A file input to the model.2164921650            - `type: "input_file"`2165121652              The type of the input item. Always `input_file`.2165321654              - `"input_file"`2165521656            - `detail: optional "auto" or "low" or "high"`2165721658              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`.2165921660              - `"auto"`2166121662              - `"low"`2166321664              - `"high"`2166521666            - `file_data: optional string`2166721668              The content of the file to be sent to the model.2166921670            - `file_id: optional string or null`2167121672              The ID of the file to be sent to the model.2167321674            - `file_url: optional string`2167521676              The URL of the file to be sent to the model.2167721678            - `filename: optional string`2167921680              The name of the file to be sent to the model.2168121682            - `prompt_cache_breakpoint: optional object { mode }`2168321684              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.2168521686              - `mode: "explicit"`2168721688                The breakpoint mode. Always `explicit`.2168921690                - `"explicit"`2169121692        - `version: optional string or null`2169321694          Optional version of the prompt template.2169521696      - `reasoning: optional RealtimeReasoning`2169721698        Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2169921700        - `effort: optional RealtimeReasoningEffort`2170121702          Constrains effort on reasoning for reasoning-capable Realtime models such as21703          `gpt-realtime-2`.2170421705          - `"minimal"`2170621707          - `"low"`2170821709          - `"medium"`2171021711          - `"high"`2171221713          - `"xhigh"`2171421715      - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`2171621717        How the model chooses tools. Provide one of the string modes or force a specific21718        function/MCP tool.2171921720        - `ToolChoiceOptions = "none" or "auto" or "required"`2172121722          Controls which (if any) tool is called by the model.2172321724          `none` means the model will not call any tool and instead generates a message.2172521726          `auto` means the model can pick between generating a message or calling one or21727          more tools.2172821729          `required` means the model must call one or more tools.2173021731          - `"none"`2173221733          - `"auto"`2173421735          - `"required"`2173621737        - `ToolChoiceFunction object { name, type }`2173821739          Use this option to force the model to call a specific function.2174021741          - `name: string`2174221743            The name of the function to call.2174421745          - `type: "function"`2174621747            For function calling, the type is always `function`.2174821749            - `"function"`2175021751        - `ToolChoiceMcp object { server_label, type, name }`2175221753          Use this option to force the model to call a specific tool on a remote MCP server.2175421755          - `server_label: string`2175621757            The label of the MCP server to use.2175821759          - `type: "mcp"`2176021761            For MCP tools, the type is always `mcp`.2176221763            - `"mcp"`2176421765          - `name: optional string or null`2176621767            The name of the tool to call on the server.2176821769      - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`2177021771        Tools available to the model.2177221773        - `RealtimeFunctionTool object { description, name, parameters, type }`2177421775          - `description: optional string`2177621777            The description of the function, including guidance on when and how21778            to call it, and guidance about what to tell the user when calling21779            (if anything).2178021781          - `name: optional string`2178221783            The name of the function.2178421785          - `parameters: optional unknown`2178621787            Parameters of the function in JSON Schema.2178821789          - `type: optional "function"`2179021791            The type of the tool, i.e. `function`.2179221793            - `"function"`2179421795        - `McpTool object { server_label, type, allowed_callers, 9 more }`2179621797          Give the model access to additional tools via remote Model Context Protocol21798          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2179921800          - `server_label: string`2180121802            A label for this MCP server, used to identify it in tool calls.2180321804          - `type: "mcp"`2180521806            The type of the MCP tool. Always `mcp`.2180721808            - `"mcp"`2180921810          - `allowed_callers: optional array of "direct" or "programmatic" or null`2181121812            The tool invocation context(s).2181321814            - `"direct"`2181521816            - `"programmatic"`2181721818          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2181921820            List of allowed tool names or a filter object.2182121822            - `McpAllowedTools = array of string`2182321824              A string array of allowed tool names2182521826            - `McpToolFilter object { read_only, tool_names }`2182721828              A filter object to specify which tools are allowed.2182921830              - `read_only: optional boolean`2183121832                Indicates whether or not a tool modifies data or is read-only. If an21833                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),21834                it will match this filter.2183521836              - `tool_names: optional array of string`2183721838                List of allowed tool names.2183921840          - `authorization: optional string`2184121842            An OAuth access token that can be used with a remote MCP server, either21843            with a custom MCP server URL or a service connector. Your application21844            must handle the OAuth authorization flow and provide the token here.2184521846          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2184721848            Identifier for service connectors, like those available in ChatGPT. One of21849            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more21850            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2185121852            This field is deprecated for models released after September 1, 2026.21853            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to21854            connect through a Secure MCP Tunnel.2185521856            Currently supported `connector_id` values are:2185721858            - Dropbox: `connector_dropbox`21859            - Gmail: `connector_gmail`21860            - Google Calendar: `connector_googlecalendar`21861            - Google Drive: `connector_googledrive`21862            - Microsoft Teams: `connector_microsoftteams`21863            - Outlook Calendar: `connector_outlookcalendar`21864            - Outlook Email: `connector_outlookemail`21865            - SharePoint: `connector_sharepoint`2186621867            - `"connector_dropbox"`2186821869            - `"connector_gmail"`2187021871            - `"connector_googlecalendar"`2187221873            - `"connector_googledrive"`2187421875            - `"connector_microsoftteams"`2187621877            - `"connector_outlookcalendar"`2187821879            - `"connector_outlookemail"`2188021881            - `"connector_sharepoint"`2188221883          - `defer_loading: optional boolean`2188421885            Whether this MCP tool is deferred and discovered via tool search.2188621887          - `headers: optional map[string] or null`2188821889            Optional HTTP headers to send to the MCP server. Use for authentication21890            or other purposes.2189121892          - `require_approval: optional object { always, never }  or "always" or "never" or null`2189321894            Specify which of the MCP server's tools require approval.2189521896            - `McpToolApprovalFilter object { always, never }`2189721898              Specify which of the MCP server's tools require approval. Can be21899              `always`, `never`, or a filter object associated with tools21900              that require approval.2190121902              - `always: optional object { read_only, tool_names }`2190321904                A filter object to specify which tools are allowed.2190521906                - `read_only: optional boolean`2190721908                  Indicates whether or not a tool modifies data or is read-only. If an21909                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),21910                  it will match this filter.2191121912                - `tool_names: optional array of string`2191321914                  List of allowed tool names.2191521916              - `never: optional object { read_only, tool_names }`2191721918                A filter object to specify which tools are allowed.2191921920                - `read_only: optional boolean`2192121922                  Indicates whether or not a tool modifies data or is read-only. If an21923                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),21924                  it will match this filter.2192521926                - `tool_names: optional array of string`2192721928                  List of allowed tool names.2192921930            - `McpToolApprovalSetting = "always" or "never"`2193121932              Specify a single approval policy for all tools. One of `always` or21933              `never`. When set to `always`, all tools will require approval. When21934              set to `never`, all tools will not require approval.2193521936              - `"always"`2193721938              - `"never"`2193921940          - `server_description: optional string`2194121942            Optional description of the MCP server, used to provide more context.2194321944          - `server_url: optional string`2194521946            The URL for the MCP server. One of `server_url`, `connector_id`, or21947            `tunnel_id` must be provided.2194821949          - `tunnel_id: optional string`2195021951            The Secure MCP Tunnel ID to use instead of a direct server URL. One of21952            `server_url`, `connector_id`, or `tunnel_id` must be provided.2195321954      - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`2195521956        Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once21957        tracing is enabled for a session, the configuration cannot be modified.2195821959        `auto` will create a trace for the session with default values for the21960        workflow name, group id, and metadata.2196121962        - `Auto = "auto"`2196321964          Enables tracing and sets default values for tracing configuration options. Always `auto`.2196521966          - `"auto"`2196721968        - `TracingConfiguration object { group_id, metadata, workflow_name }`2196921970          Granular configuration for tracing.2197121972          - `group_id: optional string`2197321974            The group id to attach to this trace to enable filtering and21975            grouping in the Traces Dashboard.2197621977          - `metadata: optional unknown`2197821979            The arbitrary metadata to attach to this trace to enable21980            filtering in the Traces Dashboard.2198121982          - `workflow_name: optional string`2198321984            The name of the workflow to attach to this trace. This is used to21985            name the trace in the Traces Dashboard.2198621987      - `truncation: optional RealtimeTruncation`2198821989        When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2199021991        Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2199221993        Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2199421995        Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2199621997        - `"auto" or "disabled"`2199821999          The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2200022001          - `"auto"`2200222003          - `"disabled"`2200422005        - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2200622007          Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2200822009          - `retention_ratio: number`2201022011            Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2201222013          - `type: "retention_ratio"`2201422015            Use retention ratio truncation.2201622017            - `"retention_ratio"`2201822019          - `token_limits: optional object { post_instructions }`2202022021            Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2202222023            - `post_instructions: optional number`2202422025              Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2202622027    - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`2202822029      A Realtime transcription session configuration object.2203022031      - `id: string`2203222033        Unique identifier for the session that looks like `sess_1234567890abcdef`.2203422035      - `object: string`2203622037        The object type. Always `realtime.transcription_session`.2203822039      - `type: "transcription"`2204022041        The type of session. Always `transcription` for transcription sessions.2204222043        - `"transcription"`2204422045      - `audio: optional object { input }`2204622047        Configuration for input audio for the session.2204822049        - `input: optional object { format, noise_reduction, transcription, turn_detection }`2205022051          - `format: optional RealtimeAudioFormats`2205222053            The PCM audio format. Only a 24kHz sample rate is supported.2205422055          - `noise_reduction: optional object { type }`2205622057            Configuration for input audio noise reduction.2205822059            - `type: optional NoiseReductionType`2206022061              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2206222063          - `transcription: optional object { language, languages, model, prompt }`2206422065            Configuration of the transcription model.2206622067            - `language: optional string`2206822069              The language of the input audio.2207022071            - `languages: optional array of string`2207222073              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2207422075            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2207622077              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2207822079              - `string`2208022081              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2208222083                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2208422085                - `"whisper-1"`2208622087                - `"gpt-transcribe"`2208822089                - `"gpt-live-transcribe"`2209022091                - `"gpt-4o-mini-transcribe"`2209222093                - `"gpt-4o-mini-transcribe-2025-12-15"`2209422095                - `"gpt-4o-transcribe"`2209622097                - `"gpt-4o-transcribe-diarize"`2209822099                - `"gpt-realtime-whisper"`2210022101            - `prompt: optional string`2210222103              The prompt configured for input audio transcription, when present.2210422105          - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`2210622107            Configuration for turn detection. Can be set to `null` to turn off. Server22108            VAD means that the model will detect the start and end of speech based on22109            audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2211022111            - `prefix_padding_ms: optional number`2211222113              Amount of audio to include before the VAD detected speech (in22114              milliseconds). Defaults to 300ms.2211522116            - `silence_duration_ms: optional number`2211722118              Duration of silence to detect speech stop (in milliseconds). Defaults22119              to 500ms. With shorter values the model will respond more quickly,22120              but may jump in on short pauses from the user.2212122122            - `threshold: optional number`2212322124              Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A22125              higher threshold will require louder audio to activate the model, and22126              thus might perform better in noisy environments.2212722128            - `type: optional string`2212922130              Type of turn detection, only `server_vad` is currently supported.2213122132      - `expires_at: optional number`2213322134        Expiration timestamp for the session, in seconds since epoch.2213522136      - `include: optional array of "item.input_audio_transcription.logprobs"`2213722138        Additional fields to include in server outputs.2213922140        - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2214122142        - `"item.input_audio_transcription.logprobs"`2214322144  - `type: "session.updated"`2214522146    The event type, must be `session.updated`.2214722148    - `"session.updated"`2214922150### Transcription Session Update2215122152- `TranscriptionSessionUpdate object { session, type, event_id }`2215322154  Send this event to update a transcription session.2215522156  - `session: object { include, input_audio_format, input_audio_noise_reduction, 2 more }`2215722158    Realtime transcription session object configuration.2215922160    - `include: optional array of "item.input_audio_transcription.logprobs"`2216122162      The set of items to include in the transcription. Current available items are:22163      `item.input_audio_transcription.logprobs`2216422165      - `"item.input_audio_transcription.logprobs"`2216622167    - `input_audio_format: optional "pcm16" or "g711_ulaw" or "g711_alaw"`2216822169      The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.22170      For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,22171      single channel (mono), and little-endian byte order.2217222173      - `"pcm16"`2217422175      - `"g711_ulaw"`2217622177      - `"g711_alaw"`2217822179    - `input_audio_noise_reduction: optional object { type }`2218022181      Configuration for input audio noise reduction. This can be set to `null` to turn off.22182      Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.22183      Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2218422185      - `type: optional NoiseReductionType`2218622187        Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2218822189        - `"near_field"`2219022191        - `"far_field"`2219222193    - `input_audio_transcription: optional AudioTranscription`2219422195      Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2219622197      - `delay: optional "minimal" or "low" or "medium" or 2 more`2219822199        Controls how long the model waits before emitting transcription text.22200        Higher values can improve transcription accuracy at the cost of latency.22201        Only supported with `gpt-realtime-whisper` in GA Realtime sessions.2220222203        - `"minimal"`2220422205        - `"low"`2220622207        - `"medium"`2220822209        - `"high"`2221022211        - `"xhigh"`2221222213      - `keywords: optional array of string`2221422215        Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2221622217      - `language: optional string`2221822219        The language of the input audio. Supplying the input language in22220        [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format22221        will improve accuracy and latency.2222222223      - `languages: optional array of string`2222422225        Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2222622227      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2222822229        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2223022231        - `string`2223222233        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2223422235          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2223622237          - `"whisper-1"`2223822239          - `"gpt-transcribe"`2224022241          - `"gpt-live-transcribe"`2224222243          - `"gpt-4o-mini-transcribe"`2224422245          - `"gpt-4o-mini-transcribe-2025-12-15"`2224622247          - `"gpt-4o-transcribe"`2224822249          - `"gpt-4o-transcribe-diarize"`2225022251          - `"gpt-realtime-whisper"`2225222253      - `prompt: optional string`2225422255        An optional text to guide the model's style or continue a previous audio22256        segment.22257        For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).22258        For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".22259        Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.2226022261    - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2226222263      Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2226422265      - `prefix_padding_ms: optional number`2226622267        Amount of audio to include before the VAD detected speech (in22268        milliseconds). Defaults to 300ms.2226922270      - `silence_duration_ms: optional number`2227122272        Duration of silence to detect speech stop (in milliseconds). Defaults22273        to 500ms. With shorter values the model will respond more quickly,22274        but may jump in on short pauses from the user.2227522276      - `threshold: optional number`2227722278        Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A22279        higher threshold will require louder audio to activate the model, and22280        thus might perform better in noisy environments.2228122282      - `type: optional "server_vad"`2228322284        Type of turn detection. Only `server_vad` is currently supported for transcription sessions.2228522286        - `"server_vad"`2228722288  - `type: "transcription_session.update"`2228922290    The event type, must be `transcription_session.update`.2229122292    - `"transcription_session.update"`2229322294  - `event_id: optional string`2229522296    Optional client-generated ID used to identify this event.2229722298### Transcription Session Updated Event2229922300- `TranscriptionSessionUpdatedEvent object { event_id, session, type }`2230122302  Returned when a transcription session is updated with a `transcription_session.update` event, unless22303  there is an error.2230422305  - `event_id: string`2230622307    The unique ID of the server event.2230822309  - `session: object { client_secret, input_audio_format, input_audio_transcription, 2 more }`2231022311    A new Realtime transcription session configuration.2231222313    When a session is created on the server via REST API, the session object22314    also contains an ephemeral key. Default TTL for keys is 10 minutes. This22315    property is not present when a session is updated via the WebSocket API.2231622317    - `client_secret: object { expires_at, value }`2231822319      Ephemeral key returned by the API. Only present when the session is22320      created on the server via REST API.2232122322      - `expires_at: number`2232322324        Timestamp for when the token expires. Currently, all tokens expire22325        after one minute.2232622327      - `value: string`2232822329        Ephemeral key usable in client environments to authenticate connections22330        to the Realtime API. Use this in client-side environments rather than22331        a standard API token, which should only be used server-side.2233222333    - `input_audio_format: optional string`2233422335      The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.2233622337    - `input_audio_transcription: optional object { language, languages, model, prompt }`2233822339      Configuration of the transcription model.2234022341      - `language: optional string`2234222343        The language of the input audio.2234422345      - `languages: optional array of string`2234622347        The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2234822349      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2235022351        The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2235222353        - `string`2235422355        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2235622357          The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2235822359          - `"whisper-1"`2236022361          - `"gpt-transcribe"`2236222363          - `"gpt-live-transcribe"`2236422365          - `"gpt-4o-mini-transcribe"`2236622367          - `"gpt-4o-mini-transcribe-2025-12-15"`2236822369          - `"gpt-4o-transcribe"`2237022371          - `"gpt-4o-transcribe-diarize"`2237222373          - `"gpt-realtime-whisper"`2237422375      - `prompt: optional string`2237622377        The prompt configured for input audio transcription, when present.2237822379    - `modalities: optional array of "text" or "audio"`2238022381      The set of modalities the model can respond with. To disable audio,22382      set this to ["text"].2238322384      - `"text"`2238522386      - `"audio"`2238722388    - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2238922390      Configuration for turn detection. Can be set to `null` to turn off. Server22391      VAD means that the model will detect the start and end of speech based on22392      audio volume and respond at the end of user speech.2239322394      - `prefix_padding_ms: optional number`2239522396        Amount of audio to include before the VAD detected speech (in22397        milliseconds). Defaults to 300ms.2239822399      - `silence_duration_ms: optional number`2240022401        Duration of silence to detect speech stop (in milliseconds). Defaults22402        to 500ms. With shorter values the model will respond more quickly,22403        but may jump in on short pauses from the user.2240422405      - `threshold: optional number`2240622407        Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A22408        higher threshold will require louder audio to activate the model, and22409        thus might perform better in noisy environments.2241022411      - `type: optional string`2241222413        Type of turn detection, only `server_vad` is currently supported.2241422415  - `type: "transcription_session.updated"`2241622417    The event type, must be `transcription_session.updated`.2241822419    - `"transcription_session.updated"`2242022421# Calls2242222423## Accept call2242422425**post** `/realtime/calls/{call_id}/accept`2242622427Accept an incoming SIP call and configure the realtime session that will22428handle it.2242922430### Path Parameters2243122432- `call_id: string`2243322434### Body Parameters2243522436- `type: "realtime"`2243722438  The type of session to create. Always `realtime` for the Realtime API.2243922440  - `"realtime"`2244122442- `audio: optional RealtimeAudioConfig`2244322444  Configuration for input and output audio.2244522446  - `input: optional RealtimeAudioConfigInput`2244722448    - `format: optional RealtimeAudioFormats`2244922450      The format of the input audio.2245122452      - `PCMAudio object { rate, type }`2245322454        The PCM audio format. Only a 24kHz sample rate is supported.2245522456        - `rate: optional 24000`2245722458          The sample rate of the audio. Always `24000`.2245922460          - `24000`2246122462        - `type: optional "audio/pcm"`2246322464          The audio format. Always `audio/pcm`.2246522466          - `"audio/pcm"`2246722468      - `PCMUAudio object { type }`2246922470        The G.711 μ-law format.2247122472        - `type: optional "audio/pcmu"`2247322474          The audio format. Always `audio/pcmu`.2247522476          - `"audio/pcmu"`2247722478      - `PCMAAudio object { type }`2247922480        The G.711 A-law format.2248122482        - `type: optional "audio/pcma"`2248322484          The audio format. Always `audio/pcma`.2248522486          - `"audio/pcma"`2248722488    - `noise_reduction: optional object { type }`2248922490      Configuration for input audio noise reduction. This can be set to `null` to turn off.22491      Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.22492      Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2249322494      - `type: optional NoiseReductionType`2249522496        Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2249722498        - `"near_field"`2249922500        - `"far_field"`2250122502    - `transcription: optional AudioTranscription`2250322504      Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2250522506      - `delay: optional "minimal" or "low" or "medium" or 2 more`2250722508        Controls how long the model waits before emitting transcription text.22509        Higher values can improve transcription accuracy at the cost of latency.22510        Only supported with `gpt-realtime-whisper` in GA Realtime sessions.2251122512        - `"minimal"`2251322514        - `"low"`2251522516        - `"medium"`2251722518        - `"high"`2251922520        - `"xhigh"`2252122522      - `keywords: optional array of string`2252322524        Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2252522526      - `language: optional string`2252722528        The language of the input audio. Supplying the input language in22529        [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format22530        will improve accuracy and latency.2253122532      - `languages: optional array of string`2253322534        Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2253522536      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2253722538        The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2253922540        - `string`2254122542        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2254322544          The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2254522546          - `"whisper-1"`2254722548          - `"gpt-transcribe"`2254922550          - `"gpt-live-transcribe"`2255122552          - `"gpt-4o-mini-transcribe"`2255322554          - `"gpt-4o-mini-transcribe-2025-12-15"`2255522556          - `"gpt-4o-transcribe"`2255722558          - `"gpt-4o-transcribe-diarize"`2255922560          - `"gpt-realtime-whisper"`2256122562      - `prompt: optional string`2256322564        An optional text to guide the model's style or continue a previous audio22565        segment.22566        For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).22567        For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".22568        Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.2256922570    - `turn_detection: optional RealtimeAudioInputTurnDetection or null`2257122572      Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2257322574      Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2257522576      Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2257722578      For `gpt-realtime-whisper` transcription sessions, turn detection must be22579      set to `null`; VAD is not supported.2258022581      - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2258222583        Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2258422585        - `type: "server_vad"`2258622587          Type of turn detection, `server_vad` to turn on simple Server VAD.2258822589          - `"server_vad"`2259022591        - `create_response: optional boolean`2259222593          Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2259422595          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2259622597        - `idle_timeout_ms: optional number or null`2259822599          Optional timeout after which a model response will be triggered automatically. This is22600          useful for situations in which a long pause from the user is unexpected, such as a phone22601          call. The model will effectively prompt the user to continue the conversation based22602          on the current context.2260322604          The timeout value will be applied after the last model response's audio has finished playing,22605          i.e. it's set to the `response.done` time plus audio playback duration.2260622607          An `input_audio_buffer.timeout_triggered` event (plus events22608          associated with the Response) will be emitted when the timeout is reached.22609          Idle timeout is currently only supported for `server_vad` mode.2261022611        - `interrupt_response: optional boolean`2261222613          Whether or not to automatically interrupt (cancel) any ongoing response with output to the default22614          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2261522616          If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2261722618        - `prefix_padding_ms: optional number`2261922620          Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in22621          milliseconds). Defaults to 300ms.2262222623        - `silence_duration_ms: optional number`2262422625          Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults22626          to 500ms. With shorter values the model will respond more quickly,22627          but may jump in on short pauses from the user.2262822629        - `threshold: optional number`2263022631          Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A22632          higher threshold will require louder audio to activate the model, and22633          thus might perform better in noisy environments.2263422635      - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2263622637        Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2263822639        - `type: "semantic_vad"`2264022641          Type of turn detection, `semantic_vad` to turn on Semantic VAD.2264222643          - `"semantic_vad"`2264422645        - `create_response: optional boolean`2264622647          Whether or not to automatically generate a response when a VAD stop event occurs.2264822649        - `eagerness: optional "low" or "medium" or "high" or "auto"`2265022651          Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2265222653          - `"low"`2265422655          - `"medium"`2265622657          - `"high"`2265822659          - `"auto"`2266022661        - `interrupt_response: optional boolean`2266222663          Whether or not to automatically interrupt any ongoing response with output to the default22664          conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2266522666  - `output: optional RealtimeAudioConfigOutput`2266722668    - `format: optional RealtimeAudioFormats`2266922670      The format of the output audio.2267122672    - `speed: optional number`2267322674      The speed of the model's spoken response as a multiple of the original speed.22675      1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2267622677      This parameter is a post-processing adjustment to the audio after it is generated, it's22678      also possible to prompt the model to speak faster or slower.2267922680    - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`2268122682      The voice the model uses to respond. Supported built-in voices are22683      `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,22684      `marin`, and `cedar`. You may also provide a custom voice object with22685      an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed22686      during the session once the model has responded with audio at least once.22687      We recommend `marin` and `cedar` for best quality.2268822689      - `string`2269022691      - `"alloy" or "ash" or "ballad" or 7 more`2269222693        - `"alloy"`2269422695        - `"ash"`2269622697        - `"ballad"`2269822699        - `"coral"`2270022701        - `"echo"`2270222703        - `"sage"`2270422705        - `"shimmer"`2270622707        - `"verse"`2270822709        - `"marin"`2271022711        - `"cedar"`2271222713      - `ID object { id }`2271422715        Custom voice reference.2271622717        - `id: string`2271822719          The custom voice ID, e.g. `voice_1234`.2272022721- `include: optional array of "item.input_audio_transcription.logprobs"`2272222723  Additional fields to include in server outputs.2272422725  `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2272622727  - `"item.input_audio_transcription.logprobs"`2272822729- `instructions: optional string`2273022731  The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2273222733  Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2273422735- `max_output_tokens: optional number or "inf"`2273622737  Maximum number of output tokens for a single assistant response,22738  inclusive of tool calls. Provide an integer between 1 and 4096 to22739  limit output tokens, or `inf` for the maximum available tokens for a22740  given model. Defaults to `inf`.2274122742  - `number`2274322744  - `"inf"`2274522746    - `"inf"`2274722748- `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2274922750  The Realtime model used for this session.2275122752  - `string`2275322754  - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2275522756    The Realtime model used for this session.2275722758    - `"gpt-realtime"`2275922760    - `"gpt-realtime-1.5"`2276122762    - `"gpt-realtime-2"`2276322764    - `"gpt-realtime-2.1"`2276522766    - `"gpt-realtime-2.1-mini"`2276722768    - `"gpt-realtime-2025-08-28"`2276922770    - `"gpt-4o-realtime-preview"`2277122772    - `"gpt-4o-realtime-preview-2024-10-01"`2277322774    - `"gpt-4o-realtime-preview-2024-12-17"`2277522776    - `"gpt-4o-realtime-preview-2025-06-03"`2277722778    - `"gpt-4o-mini-realtime-preview"`2277922780    - `"gpt-4o-mini-realtime-preview-2024-12-17"`2278122782    - `"gpt-realtime-mini"`2278322784    - `"gpt-realtime-mini-2025-10-06"`2278522786    - `"gpt-realtime-mini-2025-12-15"`2278722788    - `"gpt-audio-1.5"`2278922790    - `"gpt-audio-mini"`2279122792    - `"gpt-audio-mini-2025-10-06"`2279322794    - `"gpt-audio-mini-2025-12-15"`2279522796- `output_modalities: optional array of "text" or "audio"`2279722798  The set of modalities the model can respond with. It defaults to `["audio"]`, indicating22799  that the model will respond with audio plus a transcript. `["text"]` can be used to make22800  the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2280122802  - `"text"`2280322804  - `"audio"`2280522806- `parallel_tool_calls: optional boolean`2280722808  Whether the model may call multiple tools in parallel. Only supported by22809  reasoning Realtime models such as `gpt-realtime-2`.2281022811- `prompt: optional ResponsePrompt or null`2281222813  Reference to a prompt template and its variables.22814  [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2281522816  - `id: string`2281722818    The unique identifier of the prompt template to use.2281922820  - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2282122822    Optional map of values to substitute in for variables in your22823    prompt. The substitution values can either be strings, or other22824    Response input types like images or files.2282522826    - `string`2282722828    - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2282922830      A text input to the model.2283122832      - `text: string`2283322834        The text input to the model.2283522836      - `type: "input_text"`2283722838        The type of the input item. Always `input_text`.2283922840        - `"input_text"`2284122842      - `prompt_cache_breakpoint: optional object { mode }`2284322844        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.2284522846        - `mode: "explicit"`2284722848          The breakpoint mode. Always `explicit`.2284922850          - `"explicit"`2285122852    - `ResponseInputImage object { detail, type, file_id, 2 more }`2285322854      An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2285522856      - `detail: ImageDetail`2285722858        The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2285922860        - `"low"`2286122862        - `"high"`2286322864        - `"auto"`2286522866        - `"original"`2286722868      - `type: "input_image"`2286922870        The type of the input item. Always `input_image`.2287122872        - `"input_image"`2287322874      - `file_id: optional string or null`2287522876        The ID of the file to be sent to the model.2287722878      - `image_url: optional string or null`2287922880        The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2288122882      - `prompt_cache_breakpoint: optional object { mode }`2288322884        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.2288522886        - `mode: "explicit"`2288722888          The breakpoint mode. Always `explicit`.2288922890          - `"explicit"`2289122892    - `ResponseInputFile object { type, detail, file_data, 4 more }`2289322894      A file input to the model.2289522896      - `type: "input_file"`2289722898        The type of the input item. Always `input_file`.2289922900        - `"input_file"`2290122902      - `detail: optional "auto" or "low" or "high"`2290322904        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`.2290522906        - `"auto"`2290722908        - `"low"`2290922910        - `"high"`2291122912      - `file_data: optional string`2291322914        The content of the file to be sent to the model.2291522916      - `file_id: optional string or null`2291722918        The ID of the file to be sent to the model.2291922920      - `file_url: optional string`2292122922        The URL of the file to be sent to the model.2292322924      - `filename: optional string`2292522926        The name of the file to be sent to the model.2292722928      - `prompt_cache_breakpoint: optional object { mode }`2292922930        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.2293122932        - `mode: "explicit"`2293322934          The breakpoint mode. Always `explicit`.2293522936          - `"explicit"`2293722938  - `version: optional string or null`2293922940    Optional version of the prompt template.2294122942- `reasoning: optional RealtimeReasoning`2294322944  Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2294522946  - `effort: optional RealtimeReasoningEffort`2294722948    Constrains effort on reasoning for reasoning-capable Realtime models such as22949    `gpt-realtime-2`.2295022951    - `"minimal"`2295222953    - `"low"`2295422955    - `"medium"`2295622957    - `"high"`2295822959    - `"xhigh"`2296022961- `tool_choice: optional RealtimeToolChoiceConfig`2296222963  How the model chooses tools. Provide one of the string modes or force a specific22964  function/MCP tool.2296522966  - `ToolChoiceOptions = "none" or "auto" or "required"`2296722968    Controls which (if any) tool is called by the model.2296922970    `none` means the model will not call any tool and instead generates a message.2297122972    `auto` means the model can pick between generating a message or calling one or22973    more tools.2297422975    `required` means the model must call one or more tools.2297622977    - `"none"`2297822979    - `"auto"`2298022981    - `"required"`2298222983  - `ToolChoiceFunction object { name, type }`2298422985    Use this option to force the model to call a specific function.2298622987    - `name: string`2298822989      The name of the function to call.2299022991    - `type: "function"`2299222993      For function calling, the type is always `function`.2299422995      - `"function"`2299622997  - `ToolChoiceMcp object { server_label, type, name }`2299822999    Use this option to force the model to call a specific tool on a remote MCP server.2300023001    - `server_label: string`2300223003      The label of the MCP server to use.2300423005    - `type: "mcp"`2300623007      For MCP tools, the type is always `mcp`.2300823009      - `"mcp"`2301023011    - `name: optional string or null`2301223013      The name of the tool to call on the server.2301423015- `tools: optional RealtimeToolsConfig`2301623017  Tools available to the model.2301823019  - `RealtimeFunctionTool object { description, name, parameters, type }`2302023021    - `description: optional string`2302223023      The description of the function, including guidance on when and how23024      to call it, and guidance about what to tell the user when calling23025      (if anything).2302623027    - `name: optional string`2302823029      The name of the function.2303023031    - `parameters: optional unknown`2303223033      Parameters of the function in JSON Schema.2303423035    - `type: optional "function"`2303623037      The type of the tool, i.e. `function`.2303823039      - `"function"`2304023041  - `McpTool object { server_label, type, allowed_callers, 9 more }`2304223043    Give the model access to additional tools via remote Model Context Protocol23044    (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2304523046    - `server_label: string`2304723048      A label for this MCP server, used to identify it in tool calls.2304923050    - `type: "mcp"`2305123052      The type of the MCP tool. Always `mcp`.2305323054      - `"mcp"`2305523056    - `allowed_callers: optional array of "direct" or "programmatic" or null`2305723058      The tool invocation context(s).2305923060      - `"direct"`2306123062      - `"programmatic"`2306323064    - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2306523066      List of allowed tool names or a filter object.2306723068      - `McpAllowedTools = array of string`2306923070        A string array of allowed tool names2307123072      - `McpToolFilter object { read_only, tool_names }`2307323074        A filter object to specify which tools are allowed.2307523076        - `read_only: optional boolean`2307723078          Indicates whether or not a tool modifies data or is read-only. If an23079          MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),23080          it will match this filter.2308123082        - `tool_names: optional array of string`2308323084          List of allowed tool names.2308523086    - `authorization: optional string`2308723088      An OAuth access token that can be used with a remote MCP server, either23089      with a custom MCP server URL or a service connector. Your application23090      must handle the OAuth authorization flow and provide the token here.2309123092    - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2309323094      Identifier for service connectors, like those available in ChatGPT. One of23095      `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more23096      about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2309723098      This field is deprecated for models released after September 1, 2026.23099      Use `server_url` to connect to a remote MCP server, or `tunnel_id` to23100      connect through a Secure MCP Tunnel.2310123102      Currently supported `connector_id` values are:2310323104      - Dropbox: `connector_dropbox`23105      - Gmail: `connector_gmail`23106      - Google Calendar: `connector_googlecalendar`23107      - Google Drive: `connector_googledrive`23108      - Microsoft Teams: `connector_microsoftteams`23109      - Outlook Calendar: `connector_outlookcalendar`23110      - Outlook Email: `connector_outlookemail`23111      - SharePoint: `connector_sharepoint`2311223113      - `"connector_dropbox"`2311423115      - `"connector_gmail"`2311623117      - `"connector_googlecalendar"`2311823119      - `"connector_googledrive"`2312023121      - `"connector_microsoftteams"`2312223123      - `"connector_outlookcalendar"`2312423125      - `"connector_outlookemail"`2312623127      - `"connector_sharepoint"`2312823129    - `defer_loading: optional boolean`2313023131      Whether this MCP tool is deferred and discovered via tool search.2313223133    - `headers: optional map[string] or null`2313423135      Optional HTTP headers to send to the MCP server. Use for authentication23136      or other purposes.2313723138    - `require_approval: optional object { always, never }  or "always" or "never" or null`2313923140      Specify which of the MCP server's tools require approval.2314123142      - `McpToolApprovalFilter object { always, never }`2314323144        Specify which of the MCP server's tools require approval. Can be23145        `always`, `never`, or a filter object associated with tools23146        that require approval.2314723148        - `always: optional object { read_only, tool_names }`2314923150          A filter object to specify which tools are allowed.2315123152          - `read_only: optional boolean`2315323154            Indicates whether or not a tool modifies data or is read-only. If an23155            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),23156            it will match this filter.2315723158          - `tool_names: optional array of string`2315923160            List of allowed tool names.2316123162        - `never: optional object { read_only, tool_names }`2316323164          A filter object to specify which tools are allowed.2316523166          - `read_only: optional boolean`2316723168            Indicates whether or not a tool modifies data or is read-only. If an23169            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),23170            it will match this filter.2317123172          - `tool_names: optional array of string`2317323174            List of allowed tool names.2317523176      - `McpToolApprovalSetting = "always" or "never"`2317723178        Specify a single approval policy for all tools. One of `always` or23179        `never`. When set to `always`, all tools will require approval. When23180        set to `never`, all tools will not require approval.2318123182        - `"always"`2318323184        - `"never"`2318523186    - `server_description: optional string`2318723188      Optional description of the MCP server, used to provide more context.2318923190    - `server_url: optional string`2319123192      The URL for the MCP server. One of `server_url`, `connector_id`, or23193      `tunnel_id` must be provided.2319423195    - `tunnel_id: optional string`2319623197      The Secure MCP Tunnel ID to use instead of a direct server URL. One of23198      `server_url`, `connector_id`, or `tunnel_id` must be provided.2319923200- `tracing: optional RealtimeTracingConfig or null`2320123202  Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once23203  tracing is enabled for a session, the configuration cannot be modified.2320423205  `auto` will create a trace for the session with default values for the23206  workflow name, group id, and metadata.2320723208  - `Auto = "auto"`2320923210    Enables tracing and sets default values for tracing configuration options. Always `auto`.2321123212    - `"auto"`2321323214  - `TracingConfiguration object { group_id, metadata, workflow_name }`2321523216    Granular configuration for tracing.2321723218    - `group_id: optional string`2321923220      The group id to attach to this trace to enable filtering and23221      grouping in the Traces Dashboard.2322223223    - `metadata: optional unknown`2322423225      The arbitrary metadata to attach to this trace to enable23226      filtering in the Traces Dashboard.2322723228    - `workflow_name: optional string`2322923230      The name of the workflow to attach to this trace. This is used to23231      name the trace in the Traces Dashboard.2323223233- `truncation: optional RealtimeTruncation`2323423235  When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2323623237  Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2323823239  Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2324023241  Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2324223243  - `"auto" or "disabled"`2324423245    The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2324623247    - `"auto"`2324823249    - `"disabled"`2325023251  - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2325223253    Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2325423255    - `retention_ratio: number`2325623257      Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2325823259    - `type: "retention_ratio"`2326023261      Use retention ratio truncation.2326223263      - `"retention_ratio"`2326423265    - `token_limits: optional object { post_instructions }`2326623267      Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2326823269      - `post_instructions: optional number`2327023271        Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2327223273### Example2327423275```http23276curl https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \23277    -H 'Content-Type: application/json' \23278    -H "Authorization: Bearer $OPENAI_API_KEY" \23279    -d '{23280          "type": "realtime"23281        }'23282```2328323284### Example2328523286```http23287curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/accept \23288  -H "Authorization: Bearer $OPENAI_API_KEY" \23289  -H "Content-Type: application/json" \23290  -d '{23291        "type": "realtime",23292        "model": "gpt-realtime",23293        "instructions": "You are Alex, a friendly concierge for Example Corp.",23294      }'23295```2329623297## Create call2329823299**post** `/realtime/calls`2330023301Create a new Realtime API call over WebRTC and receive the SDP answer needed23302to complete the peer connection.2330323304### Example2330523306```http23307curl https://api.openai.com/v1/realtime/calls \23308    -H 'Content-Type: multipart/form-data' \23309    -H "Authorization: Bearer $OPENAI_API_KEY" \23310    -F sdp=sdp23311```2331223313### Example2331423315```http23316curl -X POST https://api.openai.com/v1/realtime/calls \23317  -H "Authorization: Bearer $OPENAI_API_KEY" \23318  -F "sdp=<offer.sdp;type=application/sdp" \23319  -F 'session={"type":"realtime","model":"gpt-realtime"};type=application/json'23320```2332123322#### Response2332323324```json23325v=023326o=- 4227147428 1719357865 IN IP4 127.0.0.123327s=-23328c=IN IP4 0.0.0.023329t=0 023330a=group:BUNDLE 0 123331a=msid-semantic:WMS *23332a=fingerprint:sha-256 CA:92:52:51:B4:91:3B:34:DD:9C:0B:FB:76:19:7E:3B:F1:21:0F:32:2C:38:01:72:5D:3F:78:C7:5F:8B:C7:3623333m=audio 9 UDP/TLS/RTP/SAVPF 111 0 823334a=mid:023335a=ice-ufrag:kZ2qkHXX/u1123336a=ice-pwd:uoD16Di5OGx3VbqgA3ymjEQV2kwiOjw623337a=setup:active23338a=rtcp-mux23339a=rtpmap:111 opus/48000/223340a=candidate:993865896 1 udp 2130706431 4.155.146.196 3478 typ host ufrag kZ2qkHXX/u1123341a=candidate:1432411780 1 tcp 1671430143 4.155.146.196 443 typ host tcptype passive ufrag kZ2qkHXX/u1123342m=application 9 UDP/DTLS/SCTP webrtc-datachannel23343a=mid:123344a=sctp-port:500023345```2334623347## Hang up call2334823349**post** `/realtime/calls/{call_id}/hangup`2335023351End an active Realtime API call, whether it was initiated over SIP or23352WebRTC.2335323354### Path Parameters2335523356- `call_id: string`2335723358### Example2335923360```http23361curl https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \23362    -X POST \23363    -H "Authorization: Bearer $OPENAI_API_KEY"23364```2336523366### Example2336723368```http23369curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/hangup \23370  -H "Authorization: Bearer $OPENAI_API_KEY"23371```2337223373## Refer call2337423375**post** `/realtime/calls/{call_id}/refer`2337623377Transfer an active SIP call to a new destination using the SIP REFER verb.2337823379### Path Parameters2338023381- `call_id: string`2338223383### Body Parameters2338423385- `target_uri: string`2338623387  URI that should appear in the SIP Refer-To header. Supports values like23388  `tel:+14155550123` or `sip:agent@example.com`.2338923390### Example2339123392```http23393curl https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \23394    -H 'Content-Type: application/json' \23395    -H "Authorization: Bearer $OPENAI_API_KEY" \23396    -d '{23397          "target_uri": "tel:+14155550123"23398        }'23399```2340023401### Example2340223403```http23404curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/refer \23405  -H "Authorization: Bearer $OPENAI_API_KEY" \23406  -H "Content-Type: application/json" \23407  -d '{"target_uri": "tel:+14155550123"}'23408```2340923410## Reject call2341123412**post** `/realtime/calls/{call_id}/reject`2341323414Decline an incoming SIP call by returning a SIP status code to the caller.2341523416### Path Parameters2341723418- `call_id: string`2341923420### Body Parameters2342123422- `status_code: optional number`2342323424  SIP response code to send back to the caller. Defaults to `603` (Decline)23425  when omitted.2342623427### Example2342823429```http23430curl https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \23431    -X POST \23432    -H "Authorization: Bearer $OPENAI_API_KEY"23433```2343423435### Example2343623437```http23438curl -X POST https://api.openai.com/v1/realtime/calls/$CALL_ID/reject \23439  -H "Authorization: Bearer $OPENAI_API_KEY" \23440  -H "Content-Type: application/json" \23441  -d '{"status_code": 486}'23442```2344323444# Client Secrets2344523446## Create client secret2344723448**post** `/realtime/client_secrets`2344923450Create a Realtime client secret with an associated session configuration.2345123452Client secrets are short-lived tokens that can be passed to a client app,23453such as a web frontend or mobile client, which grants access to the Realtime API without23454leaking your main API key. You can configure a custom TTL for each client secret.2345523456You can also attach session configuration options to the client secret, which will be23457applied to any sessions created using that client secret, but these can also be overridden23458by the client connection.2345923460[Learn more about authentication with client secrets over WebRTC](/api/docs/guides/realtime-webrtc).2346123462Returns the created client secret and the effective session object. The client secret is a string that looks like `ek_1234`.2346323464### Body Parameters2346523466- `expires_after: optional object { anchor, seconds }`2346723468  Configuration for the client secret expiration. Expiration refers to the time after which23469  a client secret will no longer be valid for creating sessions. The session itself may23470  continue after that time once started. A secret can be used to create multiple sessions23471  until it expires.2347223473  - `anchor: optional "created_at"`2347423475    The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.2347623477    - `"created_at"`2347823479  - `seconds: optional number`2348023481    The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.2348223483- `session: optional RealtimeSessionCreateRequest or RealtimeTranscriptionSessionCreateRequest`2348423485  Session configuration to use for the client secret. Choose either a realtime23486  session or a transcription session.2348723488  - `RealtimeSessionCreateRequest object { type, audio, include, 11 more }`2348923490    Realtime session object configuration.2349123492    - `type: "realtime"`2349323494      The type of session to create. Always `realtime` for the Realtime API.2349523496      - `"realtime"`2349723498    - `audio: optional RealtimeAudioConfig`2349923500      Configuration for input and output audio.2350123502      - `input: optional RealtimeAudioConfigInput`2350323504        - `format: optional RealtimeAudioFormats`2350523506          The format of the input audio.2350723508          - `PCMAudio object { rate, type }`2350923510            The PCM audio format. Only a 24kHz sample rate is supported.2351123512            - `rate: optional 24000`2351323514              The sample rate of the audio. Always `24000`.2351523516              - `24000`2351723518            - `type: optional "audio/pcm"`2351923520              The audio format. Always `audio/pcm`.2352123522              - `"audio/pcm"`2352323524          - `PCMUAudio object { type }`2352523526            The G.711 μ-law format.2352723528            - `type: optional "audio/pcmu"`2352923530              The audio format. Always `audio/pcmu`.2353123532              - `"audio/pcmu"`2353323534          - `PCMAAudio object { type }`2353523536            The G.711 A-law format.2353723538            - `type: optional "audio/pcma"`2353923540              The audio format. Always `audio/pcma`.2354123542              - `"audio/pcma"`2354323544        - `noise_reduction: optional object { type }`2354523546          Configuration for input audio noise reduction. This can be set to `null` to turn off.23547          Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.23548          Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2354923550          - `type: optional NoiseReductionType`2355123552            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2355323554            - `"near_field"`2355523556            - `"far_field"`2355723558        - `transcription: optional AudioTranscription`2355923560          Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2356123562          - `delay: optional "minimal" or "low" or "medium" or 2 more`2356323564            Controls how long the model waits before emitting transcription text.23565            Higher values can improve transcription accuracy at the cost of latency.23566            Only supported with `gpt-realtime-whisper` in GA Realtime sessions.2356723568            - `"minimal"`2356923570            - `"low"`2357123572            - `"medium"`2357323574            - `"high"`2357523576            - `"xhigh"`2357723578          - `keywords: optional array of string`2357923580            Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2358123582          - `language: optional string`2358323584            The language of the input audio. Supplying the input language in23585            [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format23586            will improve accuracy and latency.2358723588          - `languages: optional array of string`2358923590            Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2359123592          - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2359323594            The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2359523596            - `string`2359723598            - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2359923600              The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2360123602              - `"whisper-1"`2360323604              - `"gpt-transcribe"`2360523606              - `"gpt-live-transcribe"`2360723608              - `"gpt-4o-mini-transcribe"`2360923610              - `"gpt-4o-mini-transcribe-2025-12-15"`2361123612              - `"gpt-4o-transcribe"`2361323614              - `"gpt-4o-transcribe-diarize"`2361523616              - `"gpt-realtime-whisper"`2361723618          - `prompt: optional string`2361923620            An optional text to guide the model's style or continue a previous audio23621            segment.23622            For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).23623            For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".23624            Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.2362523626        - `turn_detection: optional RealtimeAudioInputTurnDetection or null`2362723628          Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2362923630          Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2363123632          Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2363323634          For `gpt-realtime-whisper` transcription sessions, turn detection must be23635          set to `null`; VAD is not supported.2363623637          - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2363823639            Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2364023641            - `type: "server_vad"`2364223643              Type of turn detection, `server_vad` to turn on simple Server VAD.2364423645              - `"server_vad"`2364623647            - `create_response: optional boolean`2364823649              Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2365023651              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2365223653            - `idle_timeout_ms: optional number or null`2365423655              Optional timeout after which a model response will be triggered automatically. This is23656              useful for situations in which a long pause from the user is unexpected, such as a phone23657              call. The model will effectively prompt the user to continue the conversation based23658              on the current context.2365923660              The timeout value will be applied after the last model response's audio has finished playing,23661              i.e. it's set to the `response.done` time plus audio playback duration.2366223663              An `input_audio_buffer.timeout_triggered` event (plus events23664              associated with the Response) will be emitted when the timeout is reached.23665              Idle timeout is currently only supported for `server_vad` mode.2366623667            - `interrupt_response: optional boolean`2366823669              Whether or not to automatically interrupt (cancel) any ongoing response with output to the default23670              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2367123672              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2367323674            - `prefix_padding_ms: optional number`2367523676              Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in23677              milliseconds). Defaults to 300ms.2367823679            - `silence_duration_ms: optional number`2368023681              Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults23682              to 500ms. With shorter values the model will respond more quickly,23683              but may jump in on short pauses from the user.2368423685            - `threshold: optional number`2368623687              Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A23688              higher threshold will require louder audio to activate the model, and23689              thus might perform better in noisy environments.2369023691          - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2369223693            Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2369423695            - `type: "semantic_vad"`2369623697              Type of turn detection, `semantic_vad` to turn on Semantic VAD.2369823699              - `"semantic_vad"`2370023701            - `create_response: optional boolean`2370223703              Whether or not to automatically generate a response when a VAD stop event occurs.2370423705            - `eagerness: optional "low" or "medium" or "high" or "auto"`2370623707              Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2370823709              - `"low"`2371023711              - `"medium"`2371223713              - `"high"`2371423715              - `"auto"`2371623717            - `interrupt_response: optional boolean`2371823719              Whether or not to automatically interrupt any ongoing response with output to the default23720              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2372123722      - `output: optional RealtimeAudioConfigOutput`2372323724        - `format: optional RealtimeAudioFormats`2372523726          The format of the output audio.2372723728        - `speed: optional number`2372923730          The speed of the model's spoken response as a multiple of the original speed.23731          1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2373223733          This parameter is a post-processing adjustment to the audio after it is generated, it's23734          also possible to prompt the model to speak faster or slower.2373523736        - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`2373723738          The voice the model uses to respond. Supported built-in voices are23739          `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,23740          `marin`, and `cedar`. You may also provide a custom voice object with23741          an `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed23742          during the session once the model has responded with audio at least once.23743          We recommend `marin` and `cedar` for best quality.2374423745          - `string`2374623747          - `"alloy" or "ash" or "ballad" or 7 more`2374823749            - `"alloy"`2375023751            - `"ash"`2375223753            - `"ballad"`2375423755            - `"coral"`2375623757            - `"echo"`2375823759            - `"sage"`2376023761            - `"shimmer"`2376223763            - `"verse"`2376423765            - `"marin"`2376623767            - `"cedar"`2376823769          - `ID object { id }`2377023771            Custom voice reference.2377223773            - `id: string`2377423775              The custom voice ID, e.g. `voice_1234`.2377623777    - `include: optional array of "item.input_audio_transcription.logprobs"`2377823779      Additional fields to include in server outputs.2378023781      `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2378223783      - `"item.input_audio_transcription.logprobs"`2378423785    - `instructions: optional string`2378623787      The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2378823789      Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2379023791    - `max_output_tokens: optional number or "inf"`2379223793      Maximum number of output tokens for a single assistant response,23794      inclusive of tool calls. Provide an integer between 1 and 4096 to23795      limit output tokens, or `inf` for the maximum available tokens for a23796      given model. Defaults to `inf`.2379723798      - `number`2379923800      - `"inf"`2380123802        - `"inf"`2380323804    - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2380523806      The Realtime model used for this session.2380723808      - `string`2380923810      - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2381123812        The Realtime model used for this session.2381323814        - `"gpt-realtime"`2381523816        - `"gpt-realtime-1.5"`2381723818        - `"gpt-realtime-2"`2381923820        - `"gpt-realtime-2.1"`2382123822        - `"gpt-realtime-2.1-mini"`2382323824        - `"gpt-realtime-2025-08-28"`2382523826        - `"gpt-4o-realtime-preview"`2382723828        - `"gpt-4o-realtime-preview-2024-10-01"`2382923830        - `"gpt-4o-realtime-preview-2024-12-17"`2383123832        - `"gpt-4o-realtime-preview-2025-06-03"`2383323834        - `"gpt-4o-mini-realtime-preview"`2383523836        - `"gpt-4o-mini-realtime-preview-2024-12-17"`2383723838        - `"gpt-realtime-mini"`2383923840        - `"gpt-realtime-mini-2025-10-06"`2384123842        - `"gpt-realtime-mini-2025-12-15"`2384323844        - `"gpt-audio-1.5"`2384523846        - `"gpt-audio-mini"`2384723848        - `"gpt-audio-mini-2025-10-06"`2384923850        - `"gpt-audio-mini-2025-12-15"`2385123852    - `output_modalities: optional array of "text" or "audio"`2385323854      The set of modalities the model can respond with. It defaults to `["audio"]`, indicating23855      that the model will respond with audio plus a transcript. `["text"]` can be used to make23856      the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2385723858      - `"text"`2385923860      - `"audio"`2386123862    - `parallel_tool_calls: optional boolean`2386323864      Whether the model may call multiple tools in parallel. Only supported by23865      reasoning Realtime models such as `gpt-realtime-2`.2386623867    - `prompt: optional ResponsePrompt or null`2386823869      Reference to a prompt template and its variables.23870      [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2387123872      - `id: string`2387323874        The unique identifier of the prompt template to use.2387523876      - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2387723878        Optional map of values to substitute in for variables in your23879        prompt. The substitution values can either be strings, or other23880        Response input types like images or files.2388123882        - `string`2388323884        - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2388523886          A text input to the model.2388723888          - `text: string`2388923890            The text input to the model.2389123892          - `type: "input_text"`2389323894            The type of the input item. Always `input_text`.2389523896            - `"input_text"`2389723898          - `prompt_cache_breakpoint: optional object { mode }`2389923900            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.2390123902            - `mode: "explicit"`2390323904              The breakpoint mode. Always `explicit`.2390523906              - `"explicit"`2390723908        - `ResponseInputImage object { detail, type, file_id, 2 more }`2390923910          An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2391123912          - `detail: ImageDetail`2391323914            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2391523916            - `"low"`2391723918            - `"high"`2391923920            - `"auto"`2392123922            - `"original"`2392323924          - `type: "input_image"`2392523926            The type of the input item. Always `input_image`.2392723928            - `"input_image"`2392923930          - `file_id: optional string or null`2393123932            The ID of the file to be sent to the model.2393323934          - `image_url: optional string or null`2393523936            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2393723938          - `prompt_cache_breakpoint: optional object { mode }`2393923940            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.2394123942            - `mode: "explicit"`2394323944              The breakpoint mode. Always `explicit`.2394523946              - `"explicit"`2394723948        - `ResponseInputFile object { type, detail, file_data, 4 more }`2394923950          A file input to the model.2395123952          - `type: "input_file"`2395323954            The type of the input item. Always `input_file`.2395523956            - `"input_file"`2395723958          - `detail: optional "auto" or "low" or "high"`2395923960            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`.2396123962            - `"auto"`2396323964            - `"low"`2396523966            - `"high"`2396723968          - `file_data: optional string`2396923970            The content of the file to be sent to the model.2397123972          - `file_id: optional string or null`2397323974            The ID of the file to be sent to the model.2397523976          - `file_url: optional string`2397723978            The URL of the file to be sent to the model.2397923980          - `filename: optional string`2398123982            The name of the file to be sent to the model.2398323984          - `prompt_cache_breakpoint: optional object { mode }`2398523986            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.2398723988            - `mode: "explicit"`2398923990              The breakpoint mode. Always `explicit`.2399123992              - `"explicit"`2399323994      - `version: optional string or null`2399523996        Optional version of the prompt template.2399723998    - `reasoning: optional RealtimeReasoning`2399924000      Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2400124002      - `effort: optional RealtimeReasoningEffort`2400324004        Constrains effort on reasoning for reasoning-capable Realtime models such as24005        `gpt-realtime-2`.2400624007        - `"minimal"`2400824009        - `"low"`2401024011        - `"medium"`2401224013        - `"high"`2401424015        - `"xhigh"`2401624017    - `tool_choice: optional RealtimeToolChoiceConfig`2401824019      How the model chooses tools. Provide one of the string modes or force a specific24020      function/MCP tool.2402124022      - `ToolChoiceOptions = "none" or "auto" or "required"`2402324024        Controls which (if any) tool is called by the model.2402524026        `none` means the model will not call any tool and instead generates a message.2402724028        `auto` means the model can pick between generating a message or calling one or24029        more tools.2403024031        `required` means the model must call one or more tools.2403224033        - `"none"`2403424035        - `"auto"`2403624037        - `"required"`2403824039      - `ToolChoiceFunction object { name, type }`2404024041        Use this option to force the model to call a specific function.2404224043        - `name: string`2404424045          The name of the function to call.2404624047        - `type: "function"`2404824049          For function calling, the type is always `function`.2405024051          - `"function"`2405224053      - `ToolChoiceMcp object { server_label, type, name }`2405424055        Use this option to force the model to call a specific tool on a remote MCP server.2405624057        - `server_label: string`2405824059          The label of the MCP server to use.2406024061        - `type: "mcp"`2406224063          For MCP tools, the type is always `mcp`.2406424065          - `"mcp"`2406624067        - `name: optional string or null`2406824069          The name of the tool to call on the server.2407024071    - `tools: optional RealtimeToolsConfig`2407224073      Tools available to the model.2407424075      - `RealtimeFunctionTool object { description, name, parameters, type }`2407624077        - `description: optional string`2407824079          The description of the function, including guidance on when and how24080          to call it, and guidance about what to tell the user when calling24081          (if anything).2408224083        - `name: optional string`2408424085          The name of the function.2408624087        - `parameters: optional unknown`2408824089          Parameters of the function in JSON Schema.2409024091        - `type: optional "function"`2409224093          The type of the tool, i.e. `function`.2409424095          - `"function"`2409624097      - `McpTool object { server_label, type, allowed_callers, 9 more }`2409824099        Give the model access to additional tools via remote Model Context Protocol24100        (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2410124102        - `server_label: string`2410324104          A label for this MCP server, used to identify it in tool calls.2410524106        - `type: "mcp"`2410724108          The type of the MCP tool. Always `mcp`.2410924110          - `"mcp"`2411124112        - `allowed_callers: optional array of "direct" or "programmatic" or null`2411324114          The tool invocation context(s).2411524116          - `"direct"`2411724118          - `"programmatic"`2411924120        - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2412124122          List of allowed tool names or a filter object.2412324124          - `McpAllowedTools = array of string`2412524126            A string array of allowed tool names2412724128          - `McpToolFilter object { read_only, tool_names }`2412924130            A filter object to specify which tools are allowed.2413124132            - `read_only: optional boolean`2413324134              Indicates whether or not a tool modifies data or is read-only. If an24135              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),24136              it will match this filter.2413724138            - `tool_names: optional array of string`2413924140              List of allowed tool names.2414124142        - `authorization: optional string`2414324144          An OAuth access token that can be used with a remote MCP server, either24145          with a custom MCP server URL or a service connector. Your application24146          must handle the OAuth authorization flow and provide the token here.2414724148        - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2414924150          Identifier for service connectors, like those available in ChatGPT. One of24151          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more24152          about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2415324154          This field is deprecated for models released after September 1, 2026.24155          Use `server_url` to connect to a remote MCP server, or `tunnel_id` to24156          connect through a Secure MCP Tunnel.2415724158          Currently supported `connector_id` values are:2415924160          - Dropbox: `connector_dropbox`24161          - Gmail: `connector_gmail`24162          - Google Calendar: `connector_googlecalendar`24163          - Google Drive: `connector_googledrive`24164          - Microsoft Teams: `connector_microsoftteams`24165          - Outlook Calendar: `connector_outlookcalendar`24166          - Outlook Email: `connector_outlookemail`24167          - SharePoint: `connector_sharepoint`2416824169          - `"connector_dropbox"`2417024171          - `"connector_gmail"`2417224173          - `"connector_googlecalendar"`2417424175          - `"connector_googledrive"`2417624177          - `"connector_microsoftteams"`2417824179          - `"connector_outlookcalendar"`2418024181          - `"connector_outlookemail"`2418224183          - `"connector_sharepoint"`2418424185        - `defer_loading: optional boolean`2418624187          Whether this MCP tool is deferred and discovered via tool search.2418824189        - `headers: optional map[string] or null`2419024191          Optional HTTP headers to send to the MCP server. Use for authentication24192          or other purposes.2419324194        - `require_approval: optional object { always, never }  or "always" or "never" or null`2419524196          Specify which of the MCP server's tools require approval.2419724198          - `McpToolApprovalFilter object { always, never }`2419924200            Specify which of the MCP server's tools require approval. Can be24201            `always`, `never`, or a filter object associated with tools24202            that require approval.2420324204            - `always: optional object { read_only, tool_names }`2420524206              A filter object to specify which tools are allowed.2420724208              - `read_only: optional boolean`2420924210                Indicates whether or not a tool modifies data or is read-only. If an24211                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),24212                it will match this filter.2421324214              - `tool_names: optional array of string`2421524216                List of allowed tool names.2421724218            - `never: optional object { read_only, tool_names }`2421924220              A filter object to specify which tools are allowed.2422124222              - `read_only: optional boolean`2422324224                Indicates whether or not a tool modifies data or is read-only. If an24225                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),24226                it will match this filter.2422724228              - `tool_names: optional array of string`2422924230                List of allowed tool names.2423124232          - `McpToolApprovalSetting = "always" or "never"`2423324234            Specify a single approval policy for all tools. One of `always` or24235            `never`. When set to `always`, all tools will require approval. When24236            set to `never`, all tools will not require approval.2423724238            - `"always"`2423924240            - `"never"`2424124242        - `server_description: optional string`2424324244          Optional description of the MCP server, used to provide more context.2424524246        - `server_url: optional string`2424724248          The URL for the MCP server. One of `server_url`, `connector_id`, or24249          `tunnel_id` must be provided.2425024251        - `tunnel_id: optional string`2425224253          The Secure MCP Tunnel ID to use instead of a direct server URL. One of24254          `server_url`, `connector_id`, or `tunnel_id` must be provided.2425524256    - `tracing: optional RealtimeTracingConfig or null`2425724258      Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once24259      tracing is enabled for a session, the configuration cannot be modified.2426024261      `auto` will create a trace for the session with default values for the24262      workflow name, group id, and metadata.2426324264      - `Auto = "auto"`2426524266        Enables tracing and sets default values for tracing configuration options. Always `auto`.2426724268        - `"auto"`2426924270      - `TracingConfiguration object { group_id, metadata, workflow_name }`2427124272        Granular configuration for tracing.2427324274        - `group_id: optional string`2427524276          The group id to attach to this trace to enable filtering and24277          grouping in the Traces Dashboard.2427824279        - `metadata: optional unknown`2428024281          The arbitrary metadata to attach to this trace to enable24282          filtering in the Traces Dashboard.2428324284        - `workflow_name: optional string`2428524286          The name of the workflow to attach to this trace. This is used to24287          name the trace in the Traces Dashboard.2428824289    - `truncation: optional RealtimeTruncation`2429024291      When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2429224293      Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2429424295      Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2429624297      Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2429824299      - `"auto" or "disabled"`2430024301        The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2430224303        - `"auto"`2430424305        - `"disabled"`2430624307      - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2430824309        Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2431024311        - `retention_ratio: number`2431224313          Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2431424315        - `type: "retention_ratio"`2431624317          Use retention ratio truncation.2431824319          - `"retention_ratio"`2432024321        - `token_limits: optional object { post_instructions }`2432224323          Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2432424325          - `post_instructions: optional number`2432624327            Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2432824329  - `RealtimeTranscriptionSessionCreateRequest object { type, audio, include }`2433024331    Realtime transcription session object configuration.2433224333    - `type: "transcription"`2433424335      The type of session to create. Always `transcription` for transcription sessions.2433624337      - `"transcription"`2433824339    - `audio: optional RealtimeTranscriptionSessionAudio`2434024341      Configuration for input and output audio.2434224343      - `input: optional RealtimeTranscriptionSessionAudioInput`2434424345        - `format: optional RealtimeAudioFormats`2434624347          The PCM audio format. Only a 24kHz sample rate is supported.2434824349        - `noise_reduction: optional object { type }`2435024351          Configuration for input audio noise reduction. This can be set to `null` to turn off.24352          Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.24353          Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2435424355          - `type: optional NoiseReductionType`2435624357            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2435824359        - `transcription: optional AudioTranscription`2436024361          Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2436224363        - `turn_detection: optional RealtimeTranscriptionSessionAudioInputTurnDetection or null`2436424365          Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2436624367          Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2436824369          Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2437024371          For `gpt-realtime-whisper` transcription sessions, turn detection must be24372          set to `null`; VAD is not supported.2437324374          - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2437524376            Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2437724378            - `type: "server_vad"`2437924380              Type of turn detection, `server_vad` to turn on simple Server VAD.2438124382              - `"server_vad"`2438324384            - `create_response: optional boolean`2438524386              Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2438724388              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2438924390            - `idle_timeout_ms: optional number or null`2439124392              Optional timeout after which a model response will be triggered automatically. This is24393              useful for situations in which a long pause from the user is unexpected, such as a phone24394              call. The model will effectively prompt the user to continue the conversation based24395              on the current context.2439624397              The timeout value will be applied after the last model response's audio has finished playing,24398              i.e. it's set to the `response.done` time plus audio playback duration.2439924400              An `input_audio_buffer.timeout_triggered` event (plus events24401              associated with the Response) will be emitted when the timeout is reached.24402              Idle timeout is currently only supported for `server_vad` mode.2440324404            - `interrupt_response: optional boolean`2440524406              Whether or not to automatically interrupt (cancel) any ongoing response with output to the default24407              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2440824409              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2441024411            - `prefix_padding_ms: optional number`2441224413              Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in24414              milliseconds). Defaults to 300ms.2441524416            - `silence_duration_ms: optional number`2441724418              Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults24419              to 500ms. With shorter values the model will respond more quickly,24420              but may jump in on short pauses from the user.2442124422            - `threshold: optional number`2442324424              Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A24425              higher threshold will require louder audio to activate the model, and24426              thus might perform better in noisy environments.2442724428          - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2442924430            Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2443124432            - `type: "semantic_vad"`2443324434              Type of turn detection, `semantic_vad` to turn on Semantic VAD.2443524436              - `"semantic_vad"`2443724438            - `create_response: optional boolean`2443924440              Whether or not to automatically generate a response when a VAD stop event occurs.2444124442            - `eagerness: optional "low" or "medium" or "high" or "auto"`2444324444              Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2444524446              - `"low"`2444724448              - `"medium"`2444924450              - `"high"`2445124452              - `"auto"`2445324454            - `interrupt_response: optional boolean`2445524456              Whether or not to automatically interrupt any ongoing response with output to the default24457              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2445824459    - `include: optional array of "item.input_audio_transcription.logprobs"`2446024461      Additional fields to include in server outputs.2446224463      `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2446424465      - `"item.input_audio_transcription.logprobs"`2446624467### Returns2446824469- `expires_at: number`2447024471  Expiration timestamp for the client secret, in seconds since epoch.2447224473- `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`2447424475  The session configuration for either a realtime or transcription session.2447624477  - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`2447824479    A Realtime session configuration object.2448024481    - `id: string`2448224483      Unique identifier for the session that looks like `sess_1234567890abcdef`.2448424485    - `object: "realtime.session"`2448624487      The object type. Always `realtime.session`.2448824489      - `"realtime.session"`2449024491    - `type: "realtime"`2449224493      The type of session to create. Always `realtime` for the Realtime API.2449424495      - `"realtime"`2449624497    - `audio: optional object { input, output }`2449824499      Configuration for input and output audio.2450024501      - `input: optional object { format, noise_reduction, transcription, turn_detection }`2450224503        - `format: optional RealtimeAudioFormats`2450424505          The format of the input audio.2450624507          - `PCMAudio object { rate, type }`2450824509            The PCM audio format. Only a 24kHz sample rate is supported.2451024511            - `rate: optional 24000`2451224513              The sample rate of the audio. Always `24000`.2451424515              - `24000`2451624517            - `type: optional "audio/pcm"`2451824519              The audio format. Always `audio/pcm`.2452024521              - `"audio/pcm"`2452224523          - `PCMUAudio object { type }`2452424525            The G.711 μ-law format.2452624527            - `type: optional "audio/pcmu"`2452824529              The audio format. Always `audio/pcmu`.2453024531              - `"audio/pcmu"`2453224533          - `PCMAAudio object { type }`2453424535            The G.711 A-law format.2453624537            - `type: optional "audio/pcma"`2453824539              The audio format. Always `audio/pcma`.2454024541              - `"audio/pcma"`2454224543        - `noise_reduction: optional object { type }`2454424545          Configuration for input audio noise reduction. This can be set to `null` to turn off.24546          Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.24547          Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2454824549          - `type: optional NoiseReductionType`2455024551            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2455224553            - `"near_field"`2455424555            - `"far_field"`2455624557        - `transcription: optional object { language, languages, model, prompt }`2455824559          Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2456024561          - `language: optional string`2456224563            The language of the input audio.2456424565          - `languages: optional array of string`2456624567            The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2456824569          - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2457024571            The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2457224573            - `string`2457424575            - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2457624577              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2457824579              - `"whisper-1"`2458024581              - `"gpt-transcribe"`2458224583              - `"gpt-live-transcribe"`2458424585              - `"gpt-4o-mini-transcribe"`2458624587              - `"gpt-4o-mini-transcribe-2025-12-15"`2458824589              - `"gpt-4o-transcribe"`2459024591              - `"gpt-4o-transcribe-diarize"`2459224593              - `"gpt-realtime-whisper"`2459424595          - `prompt: optional string`2459624597            The prompt configured for input audio transcription, when present.2459824599        - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`2460024601          Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2460224603          Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2460424605          Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2460624607          For `gpt-realtime-whisper` transcription sessions, turn detection must be24608          set to `null`; VAD is not supported.2460924610          - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2461124612            Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2461324614            - `type: "server_vad"`2461524616              Type of turn detection, `server_vad` to turn on simple Server VAD.2461724618              - `"server_vad"`2461924620            - `create_response: optional boolean`2462124622              Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2462324624              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2462524626            - `idle_timeout_ms: optional number or null`2462724628              Optional timeout after which a model response will be triggered automatically. This is24629              useful for situations in which a long pause from the user is unexpected, such as a phone24630              call. The model will effectively prompt the user to continue the conversation based24631              on the current context.2463224633              The timeout value will be applied after the last model response's audio has finished playing,24634              i.e. it's set to the `response.done` time plus audio playback duration.2463524636              An `input_audio_buffer.timeout_triggered` event (plus events24637              associated with the Response) will be emitted when the timeout is reached.24638              Idle timeout is currently only supported for `server_vad` mode.2463924640            - `interrupt_response: optional boolean`2464124642              Whether or not to automatically interrupt (cancel) any ongoing response with output to the default24643              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2464424645              If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2464624647            - `prefix_padding_ms: optional number`2464824649              Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in24650              milliseconds). Defaults to 300ms.2465124652            - `silence_duration_ms: optional number`2465324654              Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults24655              to 500ms. With shorter values the model will respond more quickly,24656              but may jump in on short pauses from the user.2465724658            - `threshold: optional number`2465924660              Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A24661              higher threshold will require louder audio to activate the model, and24662              thus might perform better in noisy environments.2466324664          - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2466524666            Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2466724668            - `type: "semantic_vad"`2466924670              Type of turn detection, `semantic_vad` to turn on Semantic VAD.2467124672              - `"semantic_vad"`2467324674            - `create_response: optional boolean`2467524676              Whether or not to automatically generate a response when a VAD stop event occurs.2467724678            - `eagerness: optional "low" or "medium" or "high" or "auto"`2467924680              Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2468124682              - `"low"`2468324684              - `"medium"`2468524686              - `"high"`2468724688              - `"auto"`2468924690            - `interrupt_response: optional boolean`2469124692              Whether or not to automatically interrupt any ongoing response with output to the default24693              conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2469424695      - `output: optional object { format, speed, voice }`2469624697        - `format: optional RealtimeAudioFormats`2469824699          The format of the output audio.2470024701        - `speed: optional number`2470224703          The speed of the model's spoken response as a multiple of the original speed.24704          1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2470524706          This parameter is a post-processing adjustment to the audio after it is generated, it's24707          also possible to prompt the model to speak faster or slower.2470824709        - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2471024711          The voice the model uses to respond. Voice cannot be changed during the24712          session once the model has responded with audio at least once. Current24713          voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,24714          `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for24715          best quality.2471624717          - `string`2471824719          - `"alloy" or "ash" or "ballad" or 7 more`2472024721            The voice the model uses to respond. Voice cannot be changed during the24722            session once the model has responded with audio at least once. Current24723            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,24724            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for24725            best quality.2472624727            - `"alloy"`2472824729            - `"ash"`2473024731            - `"ballad"`2473224733            - `"coral"`2473424735            - `"echo"`2473624737            - `"sage"`2473824739            - `"shimmer"`2474024741            - `"verse"`2474224743            - `"marin"`2474424745            - `"cedar"`2474624747    - `expires_at: optional number`2474824749      Expiration timestamp for the session, in seconds since epoch.2475024751    - `include: optional array of "item.input_audio_transcription.logprobs"`2475224753      Additional fields to include in server outputs.2475424755      `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2475624757      - `"item.input_audio_transcription.logprobs"`2475824759    - `instructions: optional string`2476024761      The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2476224763      Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2476424765    - `max_output_tokens: optional number or "inf"`2476624767      Maximum number of output tokens for a single assistant response,24768      inclusive of tool calls. Provide an integer between 1 and 4096 to24769      limit output tokens, or `inf` for the maximum available tokens for a24770      given model. Defaults to `inf`.2477124772      - `number`2477324774      - `"inf"`2477524776        - `"inf"`2477724778    - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2477924780      The Realtime model used for this session.2478124782      - `string`2478324784      - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2478524786        The Realtime model used for this session.2478724788        - `"gpt-realtime"`2478924790        - `"gpt-realtime-1.5"`2479124792        - `"gpt-realtime-2"`2479324794        - `"gpt-realtime-2.1"`2479524796        - `"gpt-realtime-2.1-mini"`2479724798        - `"gpt-realtime-2025-08-28"`2479924800        - `"gpt-4o-realtime-preview"`2480124802        - `"gpt-4o-realtime-preview-2024-10-01"`2480324804        - `"gpt-4o-realtime-preview-2024-12-17"`2480524806        - `"gpt-4o-realtime-preview-2025-06-03"`2480724808        - `"gpt-4o-mini-realtime-preview"`2480924810        - `"gpt-4o-mini-realtime-preview-2024-12-17"`2481124812        - `"gpt-realtime-mini"`2481324814        - `"gpt-realtime-mini-2025-10-06"`2481524816        - `"gpt-realtime-mini-2025-12-15"`2481724818        - `"gpt-audio-1.5"`2481924820        - `"gpt-audio-mini"`2482124822        - `"gpt-audio-mini-2025-10-06"`2482324824        - `"gpt-audio-mini-2025-12-15"`2482524826    - `output_modalities: optional array of "text" or "audio"`2482724828      The set of modalities the model can respond with. It defaults to `["audio"]`, indicating24829      that the model will respond with audio plus a transcript. `["text"]` can be used to make24830      the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2483124832      - `"text"`2483324834      - `"audio"`2483524836    - `prompt: optional ResponsePrompt or null`2483724838      Reference to a prompt template and its variables.24839      [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2484024841      - `id: string`2484224843        The unique identifier of the prompt template to use.2484424845      - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2484624847        Optional map of values to substitute in for variables in your24848        prompt. The substitution values can either be strings, or other24849        Response input types like images or files.2485024851        - `string`2485224853        - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2485424855          A text input to the model.2485624857          - `text: string`2485824859            The text input to the model.2486024861          - `type: "input_text"`2486224863            The type of the input item. Always `input_text`.2486424865            - `"input_text"`2486624867          - `prompt_cache_breakpoint: optional object { mode }`2486824869            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.2487024871            - `mode: "explicit"`2487224873              The breakpoint mode. Always `explicit`.2487424875              - `"explicit"`2487624877        - `ResponseInputImage object { detail, type, file_id, 2 more }`2487824879          An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2488024881          - `detail: ImageDetail`2488224883            The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2488424885            - `"low"`2488624887            - `"high"`2488824889            - `"auto"`2489024891            - `"original"`2489224893          - `type: "input_image"`2489424895            The type of the input item. Always `input_image`.2489624897            - `"input_image"`2489824899          - `file_id: optional string or null`2490024901            The ID of the file to be sent to the model.2490224903          - `image_url: optional string or null`2490424905            The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2490624907          - `prompt_cache_breakpoint: optional object { mode }`2490824909            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.2491024911            - `mode: "explicit"`2491224913              The breakpoint mode. Always `explicit`.2491424915              - `"explicit"`2491624917        - `ResponseInputFile object { type, detail, file_data, 4 more }`2491824919          A file input to the model.2492024921          - `type: "input_file"`2492224923            The type of the input item. Always `input_file`.2492424925            - `"input_file"`2492624927          - `detail: optional "auto" or "low" or "high"`2492824929            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`.2493024931            - `"auto"`2493224933            - `"low"`2493424935            - `"high"`2493624937          - `file_data: optional string`2493824939            The content of the file to be sent to the model.2494024941          - `file_id: optional string or null`2494224943            The ID of the file to be sent to the model.2494424945          - `file_url: optional string`2494624947            The URL of the file to be sent to the model.2494824949          - `filename: optional string`2495024951            The name of the file to be sent to the model.2495224953          - `prompt_cache_breakpoint: optional object { mode }`2495424955            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.2495624957            - `mode: "explicit"`2495824959              The breakpoint mode. Always `explicit`.2496024961              - `"explicit"`2496224963      - `version: optional string or null`2496424965        Optional version of the prompt template.2496624967    - `reasoning: optional RealtimeReasoning`2496824969      Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2497024971      - `effort: optional RealtimeReasoningEffort`2497224973        Constrains effort on reasoning for reasoning-capable Realtime models such as24974        `gpt-realtime-2`.2497524976        - `"minimal"`2497724978        - `"low"`2497924980        - `"medium"`2498124982        - `"high"`2498324984        - `"xhigh"`2498524986    - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`2498724988      How the model chooses tools. Provide one of the string modes or force a specific24989      function/MCP tool.2499024991      - `ToolChoiceOptions = "none" or "auto" or "required"`2499224993        Controls which (if any) tool is called by the model.2499424995        `none` means the model will not call any tool and instead generates a message.2499624997        `auto` means the model can pick between generating a message or calling one or24998        more tools.2499925000        `required` means the model must call one or more tools.2500125002        - `"none"`2500325004        - `"auto"`2500525006        - `"required"`2500725008      - `ToolChoiceFunction object { name, type }`2500925010        Use this option to force the model to call a specific function.2501125012        - `name: string`2501325014          The name of the function to call.2501525016        - `type: "function"`2501725018          For function calling, the type is always `function`.2501925020          - `"function"`2502125022      - `ToolChoiceMcp object { server_label, type, name }`2502325024        Use this option to force the model to call a specific tool on a remote MCP server.2502525026        - `server_label: string`2502725028          The label of the MCP server to use.2502925030        - `type: "mcp"`2503125032          For MCP tools, the type is always `mcp`.2503325034          - `"mcp"`2503525036        - `name: optional string or null`2503725038          The name of the tool to call on the server.2503925040    - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`2504125042      Tools available to the model.2504325044      - `RealtimeFunctionTool object { description, name, parameters, type }`2504525046        - `description: optional string`2504725048          The description of the function, including guidance on when and how25049          to call it, and guidance about what to tell the user when calling25050          (if anything).2505125052        - `name: optional string`2505325054          The name of the function.2505525056        - `parameters: optional unknown`2505725058          Parameters of the function in JSON Schema.2505925060        - `type: optional "function"`2506125062          The type of the tool, i.e. `function`.2506325064          - `"function"`2506525066      - `McpTool object { server_label, type, allowed_callers, 9 more }`2506725068        Give the model access to additional tools via remote Model Context Protocol25069        (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2507025071        - `server_label: string`2507225073          A label for this MCP server, used to identify it in tool calls.2507425075        - `type: "mcp"`2507625077          The type of the MCP tool. Always `mcp`.2507825079          - `"mcp"`2508025081        - `allowed_callers: optional array of "direct" or "programmatic" or null`2508225083          The tool invocation context(s).2508425085          - `"direct"`2508625087          - `"programmatic"`2508825089        - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2509025091          List of allowed tool names or a filter object.2509225093          - `McpAllowedTools = array of string`2509425095            A string array of allowed tool names2509625097          - `McpToolFilter object { read_only, tool_names }`2509825099            A filter object to specify which tools are allowed.2510025101            - `read_only: optional boolean`2510225103              Indicates whether or not a tool modifies data or is read-only. If an25104              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),25105              it will match this filter.2510625107            - `tool_names: optional array of string`2510825109              List of allowed tool names.2511025111        - `authorization: optional string`2511225113          An OAuth access token that can be used with a remote MCP server, either25114          with a custom MCP server URL or a service connector. Your application25115          must handle the OAuth authorization flow and provide the token here.2511625117        - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2511825119          Identifier for service connectors, like those available in ChatGPT. One of25120          `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more25121          about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2512225123          This field is deprecated for models released after September 1, 2026.25124          Use `server_url` to connect to a remote MCP server, or `tunnel_id` to25125          connect through a Secure MCP Tunnel.2512625127          Currently supported `connector_id` values are:2512825129          - Dropbox: `connector_dropbox`25130          - Gmail: `connector_gmail`25131          - Google Calendar: `connector_googlecalendar`25132          - Google Drive: `connector_googledrive`25133          - Microsoft Teams: `connector_microsoftteams`25134          - Outlook Calendar: `connector_outlookcalendar`25135          - Outlook Email: `connector_outlookemail`25136          - SharePoint: `connector_sharepoint`2513725138          - `"connector_dropbox"`2513925140          - `"connector_gmail"`2514125142          - `"connector_googlecalendar"`2514325144          - `"connector_googledrive"`2514525146          - `"connector_microsoftteams"`2514725148          - `"connector_outlookcalendar"`2514925150          - `"connector_outlookemail"`2515125152          - `"connector_sharepoint"`2515325154        - `defer_loading: optional boolean`2515525156          Whether this MCP tool is deferred and discovered via tool search.2515725158        - `headers: optional map[string] or null`2515925160          Optional HTTP headers to send to the MCP server. Use for authentication25161          or other purposes.2516225163        - `require_approval: optional object { always, never }  or "always" or "never" or null`2516425165          Specify which of the MCP server's tools require approval.2516625167          - `McpToolApprovalFilter object { always, never }`2516825169            Specify which of the MCP server's tools require approval. Can be25170            `always`, `never`, or a filter object associated with tools25171            that require approval.2517225173            - `always: optional object { read_only, tool_names }`2517425175              A filter object to specify which tools are allowed.2517625177              - `read_only: optional boolean`2517825179                Indicates whether or not a tool modifies data or is read-only. If an25180                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),25181                it will match this filter.2518225183              - `tool_names: optional array of string`2518425185                List of allowed tool names.2518625187            - `never: optional object { read_only, tool_names }`2518825189              A filter object to specify which tools are allowed.2519025191              - `read_only: optional boolean`2519225193                Indicates whether or not a tool modifies data or is read-only. If an25194                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),25195                it will match this filter.2519625197              - `tool_names: optional array of string`2519825199                List of allowed tool names.2520025201          - `McpToolApprovalSetting = "always" or "never"`2520225203            Specify a single approval policy for all tools. One of `always` or25204            `never`. When set to `always`, all tools will require approval. When25205            set to `never`, all tools will not require approval.2520625207            - `"always"`2520825209            - `"never"`2521025211        - `server_description: optional string`2521225213          Optional description of the MCP server, used to provide more context.2521425215        - `server_url: optional string`2521625217          The URL for the MCP server. One of `server_url`, `connector_id`, or25218          `tunnel_id` must be provided.2521925220        - `tunnel_id: optional string`2522125222          The Secure MCP Tunnel ID to use instead of a direct server URL. One of25223          `server_url`, `connector_id`, or `tunnel_id` must be provided.2522425225    - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`2522625227      Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once25228      tracing is enabled for a session, the configuration cannot be modified.2522925230      `auto` will create a trace for the session with default values for the25231      workflow name, group id, and metadata.2523225233      - `Auto = "auto"`2523425235        Enables tracing and sets default values for tracing configuration options. Always `auto`.2523625237        - `"auto"`2523825239      - `TracingConfiguration object { group_id, metadata, workflow_name }`2524025241        Granular configuration for tracing.2524225243        - `group_id: optional string`2524425245          The group id to attach to this trace to enable filtering and25246          grouping in the Traces Dashboard.2524725248        - `metadata: optional unknown`2524925250          The arbitrary metadata to attach to this trace to enable25251          filtering in the Traces Dashboard.2525225253        - `workflow_name: optional string`2525425255          The name of the workflow to attach to this trace. This is used to25256          name the trace in the Traces Dashboard.2525725258    - `truncation: optional RealtimeTruncation`2525925260      When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2526125262      Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2526325264      Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2526525266      Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2526725268      - `"auto" or "disabled"`2526925270        The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2527125272        - `"auto"`2527325274        - `"disabled"`2527525276      - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2527725278        Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2527925280        - `retention_ratio: number`2528125282          Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2528325284        - `type: "retention_ratio"`2528525286          Use retention ratio truncation.2528725288          - `"retention_ratio"`2528925290        - `token_limits: optional object { post_instructions }`2529125292          Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2529325294          - `post_instructions: optional number`2529525296            Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2529725298  - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`2529925300    A Realtime transcription session configuration object.2530125302    - `id: string`2530325304      Unique identifier for the session that looks like `sess_1234567890abcdef`.2530525306    - `object: string`2530725308      The object type. Always `realtime.transcription_session`.2530925310    - `type: "transcription"`2531125312      The type of session. Always `transcription` for transcription sessions.2531325314      - `"transcription"`2531525316    - `audio: optional object { input }`2531725318      Configuration for input audio for the session.2531925320      - `input: optional object { format, noise_reduction, transcription, turn_detection }`2532125322        - `format: optional RealtimeAudioFormats`2532325324          The PCM audio format. Only a 24kHz sample rate is supported.2532525326        - `noise_reduction: optional object { type }`2532725328          Configuration for input audio noise reduction.2532925330          - `type: optional NoiseReductionType`2533125332            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2533325334        - `transcription: optional object { language, languages, model, prompt }`2533525336          Configuration of the transcription model.2533725338          - `language: optional string`2533925340            The language of the input audio.2534125342          - `languages: optional array of string`2534325344            The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2534525346          - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2534725348            The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2534925350            - `string`2535125352            - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2535325354              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2535525356              - `"whisper-1"`2535725358              - `"gpt-transcribe"`2535925360              - `"gpt-live-transcribe"`2536125362              - `"gpt-4o-mini-transcribe"`2536325364              - `"gpt-4o-mini-transcribe-2025-12-15"`2536525366              - `"gpt-4o-transcribe"`2536725368              - `"gpt-4o-transcribe-diarize"`2536925370              - `"gpt-realtime-whisper"`2537125372          - `prompt: optional string`2537325374            The prompt configured for input audio transcription, when present.2537525376        - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`2537725378          Configuration for turn detection. Can be set to `null` to turn off. Server25379          VAD means that the model will detect the start and end of speech based on25380          audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2538125382          - `prefix_padding_ms: optional number`2538325384            Amount of audio to include before the VAD detected speech (in25385            milliseconds). Defaults to 300ms.2538625387          - `silence_duration_ms: optional number`2538825389            Duration of silence to detect speech stop (in milliseconds). Defaults25390            to 500ms. With shorter values the model will respond more quickly,25391            but may jump in on short pauses from the user.2539225393          - `threshold: optional number`2539425395            Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A25396            higher threshold will require louder audio to activate the model, and25397            thus might perform better in noisy environments.2539825399          - `type: optional string`2540025401            Type of turn detection, only `server_vad` is currently supported.2540225403    - `expires_at: optional number`2540425405      Expiration timestamp for the session, in seconds since epoch.2540625407    - `include: optional array of "item.input_audio_transcription.logprobs"`2540825409      Additional fields to include in server outputs.2541025411      - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2541225413      - `"item.input_audio_transcription.logprobs"`2541425415- `value: string`2541625417  The generated client secret value.2541825419### Example2542025421```http25422curl https://api.openai.com/v1/realtime/client_secrets \25423    -H 'Content-Type: application/json' \25424    -H "Authorization: Bearer $OPENAI_API_KEY" \25425    -d '{}'25426```2542725428#### Response2542925430```json25431{25432  "expires_at": 0,25433  "session": {25434    "id": "id",25435    "object": "realtime.session",25436    "type": "realtime",25437    "audio": {25438      "input": {25439        "format": {25440          "rate": 24000,25441          "type": "audio/pcm"25442        },25443        "noise_reduction": {25444          "type": "near_field"25445        },25446        "transcription": {25447          "language": "language",25448          "languages": [25449            "string"25450          ],25451          "model": "whisper-1",25452          "prompt": "prompt"25453        },25454        "turn_detection": {25455          "type": "server_vad",25456          "create_response": true,25457          "idle_timeout_ms": 5000,25458          "interrupt_response": true,25459          "prefix_padding_ms": 0,25460          "silence_duration_ms": 0,25461          "threshold": 025462        }25463      },25464      "output": {25465        "format": {25466          "rate": 24000,25467          "type": "audio/pcm"25468        },25469        "speed": 0.25,25470        "voice": "ash"25471      }25472    },25473    "expires_at": 0,25474    "include": [25475      "item.input_audio_transcription.logprobs"25476    ],25477    "instructions": "instructions",25478    "max_output_tokens": "inf",25479    "model": "gpt-realtime",25480    "output_modalities": [25481      "text"25482    ],25483    "prompt": {25484      "id": "id",25485      "variables": {25486        "foo": "string"25487      },25488      "version": "version"25489    },25490    "reasoning": {25491      "effort": "minimal"25492    },25493    "tool_choice": "none",25494    "tools": [25495      {25496        "description": "description",25497        "name": "name",25498        "parameters": {},25499        "type": "function"25500      }25501    ],25502    "tracing": "auto",25503    "truncation": "auto"25504  },25505  "value": "value"25506}25507```2550825509### Example2551025511```http25512curl -X POST https://api.openai.com/v1/realtime/client_secrets \25513  -H "Authorization: Bearer $OPENAI_API_KEY" \25514  -H "Content-Type: application/json" \25515  -d '{25516    "expires_after": {25517      "anchor": "created_at",25518      "seconds": 60025519    },25520    "session": {25521      "type": "realtime",25522      "model": "gpt-realtime",25523      "instructions": "You are a friendly assistant."25524    }25525  }'25526```2552725528#### Response2552925530```json25531{25532  "value": "ek_68af296e8e408191a1120ab6383263c2",25533  "expires_at": 1756310470,25534  "session": {25535    "type": "realtime",25536    "object": "realtime.session",25537    "id": "sess_C9CiUVUzUzYIssh3ELY1d",25538    "model": "gpt-realtime",25539    "output_modalities": [25540      "audio"25541    ],25542    "instructions": "You are a friendly assistant.",25543    "tools": [],25544    "tool_choice": "auto",25545    "max_output_tokens": "inf",25546    "tracing": null,25547    "truncation": "auto",25548    "prompt": null,25549    "expires_at": 0,25550    "audio": {25551      "input": {25552        "format": {25553          "type": "audio/pcm",25554          "rate": 2400025555        },25556        "transcription": null,25557        "noise_reduction": null,25558        "turn_detection": {25559          "type": "server_vad",25560        }25561      },25562      "output": {25563        "format": {25564          "type": "audio/pcm",25565          "rate": 2400025566        },25567        "voice": "alloy",25568        "speed": 1.025569      }25570    },25571    "include": null25572  }25573}25574```2557525576## Domain Types2557725578### Client Secret Create Response2557925580- `ClientSecretCreateResponse object { expires_at, session, value }`2558125582  Response from creating a session and client secret for the Realtime API.2558325584  - `expires_at: number`2558525586    Expiration timestamp for the client secret, in seconds since epoch.2558725588  - `session: RealtimeSessionCreateResponse or RealtimeTranscriptionSessionCreateResponse`2558925590    The session configuration for either a realtime or transcription session.2559125592    - `RealtimeSessionCreateResponse object { id, object, type, 13 more }`2559325594      A Realtime session configuration object.2559525596      - `id: string`2559725598        Unique identifier for the session that looks like `sess_1234567890abcdef`.2559925600      - `object: "realtime.session"`2560125602        The object type. Always `realtime.session`.2560325604        - `"realtime.session"`2560525606      - `type: "realtime"`2560725608        The type of session to create. Always `realtime` for the Realtime API.2560925610        - `"realtime"`2561125612      - `audio: optional object { input, output }`2561325614        Configuration for input and output audio.2561525616        - `input: optional object { format, noise_reduction, transcription, turn_detection }`2561725618          - `format: optional RealtimeAudioFormats`2561925620            The format of the input audio.2562125622            - `PCMAudio object { rate, type }`2562325624              The PCM audio format. Only a 24kHz sample rate is supported.2562525626              - `rate: optional 24000`2562725628                The sample rate of the audio. Always `24000`.2562925630                - `24000`2563125632              - `type: optional "audio/pcm"`2563325634                The audio format. Always `audio/pcm`.2563525636                - `"audio/pcm"`2563725638            - `PCMUAudio object { type }`2563925640              The G.711 μ-law format.2564125642              - `type: optional "audio/pcmu"`2564325644                The audio format. Always `audio/pcmu`.2564525646                - `"audio/pcmu"`2564725648            - `PCMAAudio object { type }`2564925650              The G.711 A-law format.2565125652              - `type: optional "audio/pcma"`2565325654                The audio format. Always `audio/pcma`.2565525656                - `"audio/pcma"`2565725658          - `noise_reduction: optional object { type }`2565925660            Configuration for input audio noise reduction. This can be set to `null` to turn off.25661            Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.25662            Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2566325664            - `type: optional NoiseReductionType`2566525666              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2566725668              - `"near_field"`2566925670              - `"far_field"`2567125672          - `transcription: optional object { language, languages, model, prompt }`2567325674            Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2567525676            - `language: optional string`2567725678              The language of the input audio.2567925680            - `languages: optional array of string`2568125682              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2568325684            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2568525686              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2568725688              - `string`2568925690              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2569125692                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2569325694                - `"whisper-1"`2569525696                - `"gpt-transcribe"`2569725698                - `"gpt-live-transcribe"`2569925700                - `"gpt-4o-mini-transcribe"`2570125702                - `"gpt-4o-mini-transcribe-2025-12-15"`2570325704                - `"gpt-4o-transcribe"`2570525706                - `"gpt-4o-transcribe-diarize"`2570725708                - `"gpt-realtime-whisper"`2570925710            - `prompt: optional string`2571125712              The prompt configured for input audio transcription, when present.2571325714          - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`2571525716            Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2571725718            Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2571925720            Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2572125722            For `gpt-realtime-whisper` transcription sessions, turn detection must be25723            set to `null`; VAD is not supported.2572425725            - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2572625727              Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2572825729              - `type: "server_vad"`2573025731                Type of turn detection, `server_vad` to turn on simple Server VAD.2573225733                - `"server_vad"`2573425735              - `create_response: optional boolean`2573625737                Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2573825739                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2574025741              - `idle_timeout_ms: optional number or null`2574225743                Optional timeout after which a model response will be triggered automatically. This is25744                useful for situations in which a long pause from the user is unexpected, such as a phone25745                call. The model will effectively prompt the user to continue the conversation based25746                on the current context.2574725748                The timeout value will be applied after the last model response's audio has finished playing,25749                i.e. it's set to the `response.done` time plus audio playback duration.2575025751                An `input_audio_buffer.timeout_triggered` event (plus events25752                associated with the Response) will be emitted when the timeout is reached.25753                Idle timeout is currently only supported for `server_vad` mode.2575425755              - `interrupt_response: optional boolean`2575625757                Whether or not to automatically interrupt (cancel) any ongoing response with output to the default25758                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2575925760                If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2576125762              - `prefix_padding_ms: optional number`2576325764                Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in25765                milliseconds). Defaults to 300ms.2576625767              - `silence_duration_ms: optional number`2576825769                Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults25770                to 500ms. With shorter values the model will respond more quickly,25771                but may jump in on short pauses from the user.2577225773              - `threshold: optional number`2577425775                Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A25776                higher threshold will require louder audio to activate the model, and25777                thus might perform better in noisy environments.2577825779            - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2578025781              Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2578225783              - `type: "semantic_vad"`2578425785                Type of turn detection, `semantic_vad` to turn on Semantic VAD.2578625787                - `"semantic_vad"`2578825789              - `create_response: optional boolean`2579025791                Whether or not to automatically generate a response when a VAD stop event occurs.2579225793              - `eagerness: optional "low" or "medium" or "high" or "auto"`2579425795                Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2579625797                - `"low"`2579825799                - `"medium"`2580025801                - `"high"`2580225803                - `"auto"`2580425805              - `interrupt_response: optional boolean`2580625807                Whether or not to automatically interrupt any ongoing response with output to the default25808                conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2580925810        - `output: optional object { format, speed, voice }`2581125812          - `format: optional RealtimeAudioFormats`2581325814            The format of the output audio.2581525816          - `speed: optional number`2581725818            The speed of the model's spoken response as a multiple of the original speed.25819            1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2582025821            This parameter is a post-processing adjustment to the audio after it is generated, it's25822            also possible to prompt the model to speak faster or slower.2582325824          - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2582525826            The voice the model uses to respond. Voice cannot be changed during the25827            session once the model has responded with audio at least once. Current25828            voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,25829            `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for25830            best quality.2583125832            - `string`2583325834            - `"alloy" or "ash" or "ballad" or 7 more`2583525836              The voice the model uses to respond. Voice cannot be changed during the25837              session once the model has responded with audio at least once. Current25838              voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,25839              `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for25840              best quality.2584125842              - `"alloy"`2584325844              - `"ash"`2584525846              - `"ballad"`2584725848              - `"coral"`2584925850              - `"echo"`2585125852              - `"sage"`2585325854              - `"shimmer"`2585525856              - `"verse"`2585725858              - `"marin"`2585925860              - `"cedar"`2586125862      - `expires_at: optional number`2586325864        Expiration timestamp for the session, in seconds since epoch.2586525866      - `include: optional array of "item.input_audio_transcription.logprobs"`2586725868        Additional fields to include in server outputs.2586925870        `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2587125872        - `"item.input_audio_transcription.logprobs"`2587325874      - `instructions: optional string`2587525876        The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2587725878        Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2587925880      - `max_output_tokens: optional number or "inf"`2588125882        Maximum number of output tokens for a single assistant response,25883        inclusive of tool calls. Provide an integer between 1 and 4096 to25884        limit output tokens, or `inf` for the maximum available tokens for a25885        given model. Defaults to `inf`.2588625887        - `number`2588825889        - `"inf"`2589025891          - `"inf"`2589225893      - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2589425895        The Realtime model used for this session.2589625897        - `string`2589825899        - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2590025901          The Realtime model used for this session.2590225903          - `"gpt-realtime"`2590425905          - `"gpt-realtime-1.5"`2590625907          - `"gpt-realtime-2"`2590825909          - `"gpt-realtime-2.1"`2591025911          - `"gpt-realtime-2.1-mini"`2591225913          - `"gpt-realtime-2025-08-28"`2591425915          - `"gpt-4o-realtime-preview"`2591625917          - `"gpt-4o-realtime-preview-2024-10-01"`2591825919          - `"gpt-4o-realtime-preview-2024-12-17"`2592025921          - `"gpt-4o-realtime-preview-2025-06-03"`2592225923          - `"gpt-4o-mini-realtime-preview"`2592425925          - `"gpt-4o-mini-realtime-preview-2024-12-17"`2592625927          - `"gpt-realtime-mini"`2592825929          - `"gpt-realtime-mini-2025-10-06"`2593025931          - `"gpt-realtime-mini-2025-12-15"`2593225933          - `"gpt-audio-1.5"`2593425935          - `"gpt-audio-mini"`2593625937          - `"gpt-audio-mini-2025-10-06"`2593825939          - `"gpt-audio-mini-2025-12-15"`2594025941      - `output_modalities: optional array of "text" or "audio"`2594225943        The set of modalities the model can respond with. It defaults to `["audio"]`, indicating25944        that the model will respond with audio plus a transcript. `["text"]` can be used to make25945        the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2594625947        - `"text"`2594825949        - `"audio"`2595025951      - `prompt: optional ResponsePrompt or null`2595225953        Reference to a prompt template and its variables.25954        [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2595525956        - `id: string`2595725958          The unique identifier of the prompt template to use.2595925960        - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2596125962          Optional map of values to substitute in for variables in your25963          prompt. The substitution values can either be strings, or other25964          Response input types like images or files.2596525966          - `string`2596725968          - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2596925970            A text input to the model.2597125972            - `text: string`2597325974              The text input to the model.2597525976            - `type: "input_text"`2597725978              The type of the input item. Always `input_text`.2597925980              - `"input_text"`2598125982            - `prompt_cache_breakpoint: optional object { mode }`2598325984              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.2598525986              - `mode: "explicit"`2598725988                The breakpoint mode. Always `explicit`.2598925990                - `"explicit"`2599125992          - `ResponseInputImage object { detail, type, file_id, 2 more }`2599325994            An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2599525996            - `detail: ImageDetail`2599725998              The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2599926000              - `"low"`2600126002              - `"high"`2600326004              - `"auto"`2600526006              - `"original"`2600726008            - `type: "input_image"`2600926010              The type of the input item. Always `input_image`.2601126012              - `"input_image"`2601326014            - `file_id: optional string or null`2601526016              The ID of the file to be sent to the model.2601726018            - `image_url: optional string or null`2601926020              The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2602126022            - `prompt_cache_breakpoint: optional object { mode }`2602326024              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.2602526026              - `mode: "explicit"`2602726028                The breakpoint mode. Always `explicit`.2602926030                - `"explicit"`2603126032          - `ResponseInputFile object { type, detail, file_data, 4 more }`2603326034            A file input to the model.2603526036            - `type: "input_file"`2603726038              The type of the input item. Always `input_file`.2603926040              - `"input_file"`2604126042            - `detail: optional "auto" or "low" or "high"`2604326044              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`.2604526046              - `"auto"`2604726048              - `"low"`2604926050              - `"high"`2605126052            - `file_data: optional string`2605326054              The content of the file to be sent to the model.2605526056            - `file_id: optional string or null`2605726058              The ID of the file to be sent to the model.2605926060            - `file_url: optional string`2606126062              The URL of the file to be sent to the model.2606326064            - `filename: optional string`2606526066              The name of the file to be sent to the model.2606726068            - `prompt_cache_breakpoint: optional object { mode }`2606926070              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.2607126072              - `mode: "explicit"`2607326074                The breakpoint mode. Always `explicit`.2607526076                - `"explicit"`2607726078        - `version: optional string or null`2607926080          Optional version of the prompt template.2608126082      - `reasoning: optional RealtimeReasoning`2608326084        Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2608526086        - `effort: optional RealtimeReasoningEffort`2608726088          Constrains effort on reasoning for reasoning-capable Realtime models such as26089          `gpt-realtime-2`.2609026091          - `"minimal"`2609226093          - `"low"`2609426095          - `"medium"`2609626097          - `"high"`2609826099          - `"xhigh"`2610026101      - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`2610226103        How the model chooses tools. Provide one of the string modes or force a specific26104        function/MCP tool.2610526106        - `ToolChoiceOptions = "none" or "auto" or "required"`2610726108          Controls which (if any) tool is called by the model.2610926110          `none` means the model will not call any tool and instead generates a message.2611126112          `auto` means the model can pick between generating a message or calling one or26113          more tools.2611426115          `required` means the model must call one or more tools.2611626117          - `"none"`2611826119          - `"auto"`2612026121          - `"required"`2612226123        - `ToolChoiceFunction object { name, type }`2612426125          Use this option to force the model to call a specific function.2612626127          - `name: string`2612826129            The name of the function to call.2613026131          - `type: "function"`2613226133            For function calling, the type is always `function`.2613426135            - `"function"`2613626137        - `ToolChoiceMcp object { server_label, type, name }`2613826139          Use this option to force the model to call a specific tool on a remote MCP server.2614026141          - `server_label: string`2614226143            The label of the MCP server to use.2614426145          - `type: "mcp"`2614626147            For MCP tools, the type is always `mcp`.2614826149            - `"mcp"`2615026151          - `name: optional string or null`2615226153            The name of the tool to call on the server.2615426155      - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`2615626157        Tools available to the model.2615826159        - `RealtimeFunctionTool object { description, name, parameters, type }`2616026161          - `description: optional string`2616226163            The description of the function, including guidance on when and how26164            to call it, and guidance about what to tell the user when calling26165            (if anything).2616626167          - `name: optional string`2616826169            The name of the function.2617026171          - `parameters: optional unknown`2617226173            Parameters of the function in JSON Schema.2617426175          - `type: optional "function"`2617626177            The type of the tool, i.e. `function`.2617826179            - `"function"`2618026181        - `McpTool object { server_label, type, allowed_callers, 9 more }`2618226183          Give the model access to additional tools via remote Model Context Protocol26184          (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2618526186          - `server_label: string`2618726188            A label for this MCP server, used to identify it in tool calls.2618926190          - `type: "mcp"`2619126192            The type of the MCP tool. Always `mcp`.2619326194            - `"mcp"`2619526196          - `allowed_callers: optional array of "direct" or "programmatic" or null`2619726198            The tool invocation context(s).2619926200            - `"direct"`2620126202            - `"programmatic"`2620326204          - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2620526206            List of allowed tool names or a filter object.2620726208            - `McpAllowedTools = array of string`2620926210              A string array of allowed tool names2621126212            - `McpToolFilter object { read_only, tool_names }`2621326214              A filter object to specify which tools are allowed.2621526216              - `read_only: optional boolean`2621726218                Indicates whether or not a tool modifies data or is read-only. If an26219                MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),26220                it will match this filter.2622126222              - `tool_names: optional array of string`2622326224                List of allowed tool names.2622526226          - `authorization: optional string`2622726228            An OAuth access token that can be used with a remote MCP server, either26229            with a custom MCP server URL or a service connector. Your application26230            must handle the OAuth authorization flow and provide the token here.2623126232          - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2623326234            Identifier for service connectors, like those available in ChatGPT. One of26235            `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more26236            about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2623726238            This field is deprecated for models released after September 1, 2026.26239            Use `server_url` to connect to a remote MCP server, or `tunnel_id` to26240            connect through a Secure MCP Tunnel.2624126242            Currently supported `connector_id` values are:2624326244            - Dropbox: `connector_dropbox`26245            - Gmail: `connector_gmail`26246            - Google Calendar: `connector_googlecalendar`26247            - Google Drive: `connector_googledrive`26248            - Microsoft Teams: `connector_microsoftteams`26249            - Outlook Calendar: `connector_outlookcalendar`26250            - Outlook Email: `connector_outlookemail`26251            - SharePoint: `connector_sharepoint`2625226253            - `"connector_dropbox"`2625426255            - `"connector_gmail"`2625626257            - `"connector_googlecalendar"`2625826259            - `"connector_googledrive"`2626026261            - `"connector_microsoftteams"`2626226263            - `"connector_outlookcalendar"`2626426265            - `"connector_outlookemail"`2626626267            - `"connector_sharepoint"`2626826269          - `defer_loading: optional boolean`2627026271            Whether this MCP tool is deferred and discovered via tool search.2627226273          - `headers: optional map[string] or null`2627426275            Optional HTTP headers to send to the MCP server. Use for authentication26276            or other purposes.2627726278          - `require_approval: optional object { always, never }  or "always" or "never" or null`2627926280            Specify which of the MCP server's tools require approval.2628126282            - `McpToolApprovalFilter object { always, never }`2628326284              Specify which of the MCP server's tools require approval. Can be26285              `always`, `never`, or a filter object associated with tools26286              that require approval.2628726288              - `always: optional object { read_only, tool_names }`2628926290                A filter object to specify which tools are allowed.2629126292                - `read_only: optional boolean`2629326294                  Indicates whether or not a tool modifies data or is read-only. If an26295                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),26296                  it will match this filter.2629726298                - `tool_names: optional array of string`2629926300                  List of allowed tool names.2630126302              - `never: optional object { read_only, tool_names }`2630326304                A filter object to specify which tools are allowed.2630526306                - `read_only: optional boolean`2630726308                  Indicates whether or not a tool modifies data or is read-only. If an26309                  MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),26310                  it will match this filter.2631126312                - `tool_names: optional array of string`2631326314                  List of allowed tool names.2631526316            - `McpToolApprovalSetting = "always" or "never"`2631726318              Specify a single approval policy for all tools. One of `always` or26319              `never`. When set to `always`, all tools will require approval. When26320              set to `never`, all tools will not require approval.2632126322              - `"always"`2632326324              - `"never"`2632526326          - `server_description: optional string`2632726328            Optional description of the MCP server, used to provide more context.2632926330          - `server_url: optional string`2633126332            The URL for the MCP server. One of `server_url`, `connector_id`, or26333            `tunnel_id` must be provided.2633426335          - `tunnel_id: optional string`2633626337            The Secure MCP Tunnel ID to use instead of a direct server URL. One of26338            `server_url`, `connector_id`, or `tunnel_id` must be provided.2633926340      - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`2634126342        Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once26343        tracing is enabled for a session, the configuration cannot be modified.2634426345        `auto` will create a trace for the session with default values for the26346        workflow name, group id, and metadata.2634726348        - `Auto = "auto"`2634926350          Enables tracing and sets default values for tracing configuration options. Always `auto`.2635126352          - `"auto"`2635326354        - `TracingConfiguration object { group_id, metadata, workflow_name }`2635526356          Granular configuration for tracing.2635726358          - `group_id: optional string`2635926360            The group id to attach to this trace to enable filtering and26361            grouping in the Traces Dashboard.2636226363          - `metadata: optional unknown`2636426365            The arbitrary metadata to attach to this trace to enable26366            filtering in the Traces Dashboard.2636726368          - `workflow_name: optional string`2636926370            The name of the workflow to attach to this trace. This is used to26371            name the trace in the Traces Dashboard.2637226373      - `truncation: optional RealtimeTruncation`2637426375        When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2637626377        Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2637826379        Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2638026381        Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2638226383        - `"auto" or "disabled"`2638426385          The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2638626387          - `"auto"`2638826389          - `"disabled"`2639026391        - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2639226393          Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2639426395          - `retention_ratio: number`2639626397            Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2639826399          - `type: "retention_ratio"`2640026401            Use retention ratio truncation.2640226403            - `"retention_ratio"`2640426405          - `token_limits: optional object { post_instructions }`2640626407            Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2640826409            - `post_instructions: optional number`2641026411              Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2641226413    - `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`2641426415      A Realtime transcription session configuration object.2641626417      - `id: string`2641826419        Unique identifier for the session that looks like `sess_1234567890abcdef`.2642026421      - `object: string`2642226423        The object type. Always `realtime.transcription_session`.2642426425      - `type: "transcription"`2642626427        The type of session. Always `transcription` for transcription sessions.2642826429        - `"transcription"`2643026431      - `audio: optional object { input }`2643226433        Configuration for input audio for the session.2643426435        - `input: optional object { format, noise_reduction, transcription, turn_detection }`2643626437          - `format: optional RealtimeAudioFormats`2643826439            The PCM audio format. Only a 24kHz sample rate is supported.2644026441          - `noise_reduction: optional object { type }`2644226443            Configuration for input audio noise reduction.2644426445            - `type: optional NoiseReductionType`2644626447              Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2644826449          - `transcription: optional object { language, languages, model, prompt }`2645026451            Configuration of the transcription model.2645226453            - `language: optional string`2645426455              The language of the input audio.2645626457            - `languages: optional array of string`2645826459              The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2646026461            - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2646226463              The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2646426465              - `string`2646626467              - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2646826469                The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2647026471                - `"whisper-1"`2647226473                - `"gpt-transcribe"`2647426475                - `"gpt-live-transcribe"`2647626477                - `"gpt-4o-mini-transcribe"`2647826479                - `"gpt-4o-mini-transcribe-2025-12-15"`2648026481                - `"gpt-4o-transcribe"`2648226483                - `"gpt-4o-transcribe-diarize"`2648426485                - `"gpt-realtime-whisper"`2648626487            - `prompt: optional string`2648826489              The prompt configured for input audio transcription, when present.2649026491          - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`2649226493            Configuration for turn detection. Can be set to `null` to turn off. Server26494            VAD means that the model will detect the start and end of speech based on26495            audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2649626497            - `prefix_padding_ms: optional number`2649826499              Amount of audio to include before the VAD detected speech (in26500              milliseconds). Defaults to 300ms.2650126502            - `silence_duration_ms: optional number`2650326504              Duration of silence to detect speech stop (in milliseconds). Defaults26505              to 500ms. With shorter values the model will respond more quickly,26506              but may jump in on short pauses from the user.2650726508            - `threshold: optional number`2650926510              Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A26511              higher threshold will require louder audio to activate the model, and26512              thus might perform better in noisy environments.2651326514            - `type: optional string`2651526516              Type of turn detection, only `server_vad` is currently supported.2651726518      - `expires_at: optional number`2651926520        Expiration timestamp for the session, in seconds since epoch.2652126522      - `include: optional array of "item.input_audio_transcription.logprobs"`2652326524        Additional fields to include in server outputs.2652526526        - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2652726528        - `"item.input_audio_transcription.logprobs"`2652926530  - `value: string`2653126532    The generated client secret value.2653326534### Realtime Session Create Response2653526536- `RealtimeSessionCreateResponse object { id, object, type, 13 more }`2653726538  A Realtime session configuration object.2653926540  - `id: string`2654126542    Unique identifier for the session that looks like `sess_1234567890abcdef`.2654326544  - `object: "realtime.session"`2654526546    The object type. Always `realtime.session`.2654726548    - `"realtime.session"`2654926550  - `type: "realtime"`2655126552    The type of session to create. Always `realtime` for the Realtime API.2655326554    - `"realtime"`2655526556  - `audio: optional object { input, output }`2655726558    Configuration for input and output audio.2655926560    - `input: optional object { format, noise_reduction, transcription, turn_detection }`2656126562      - `format: optional RealtimeAudioFormats`2656326564        The format of the input audio.2656526566        - `PCMAudio object { rate, type }`2656726568          The PCM audio format. Only a 24kHz sample rate is supported.2656926570          - `rate: optional 24000`2657126572            The sample rate of the audio. Always `24000`.2657326574            - `24000`2657526576          - `type: optional "audio/pcm"`2657726578            The audio format. Always `audio/pcm`.2657926580            - `"audio/pcm"`2658126582        - `PCMUAudio object { type }`2658326584          The G.711 μ-law format.2658526586          - `type: optional "audio/pcmu"`2658726588            The audio format. Always `audio/pcmu`.2658926590            - `"audio/pcmu"`2659126592        - `PCMAAudio object { type }`2659326594          The G.711 A-law format.2659526596          - `type: optional "audio/pcma"`2659726598            The audio format. Always `audio/pcma`.2659926600            - `"audio/pcma"`2660126602      - `noise_reduction: optional object { type }`2660326604        Configuration for input audio noise reduction. This can be set to `null` to turn off.26605        Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.26606        Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2660726608        - `type: optional NoiseReductionType`2660926610          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2661126612          - `"near_field"`2661326614          - `"far_field"`2661526616      - `transcription: optional object { language, languages, model, prompt }`2661726618        Configuration for input audio transcription, defaults to off and can be set to `null` to turn off once on. Input audio transcription is not native to the model, since the model consumes audio directly. Transcription runs asynchronously through [the /audio/transcriptions endpoint](/api/reference/resources/audio/subresources/transcriptions/methods/create) and should be treated as guidance of input audio content rather than precisely what the model heard. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2661926620        - `language: optional string`2662126622          The language of the input audio.2662326624        - `languages: optional array of string`2662526626          The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2662726628        - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2662926630          The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2663126632          - `string`2663326634          - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2663526636            The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2663726638            - `"whisper-1"`2663926640            - `"gpt-transcribe"`2664126642            - `"gpt-live-transcribe"`2664326644            - `"gpt-4o-mini-transcribe"`2664526646            - `"gpt-4o-mini-transcribe-2025-12-15"`2664726648            - `"gpt-4o-transcribe"`2664926650            - `"gpt-4o-transcribe-diarize"`2665126652            - `"gpt-realtime-whisper"`2665326654        - `prompt: optional string`2665526656          The prompt configured for input audio transcription, when present.2665726658      - `turn_detection: optional object { type, create_response, idle_timeout_ms, 4 more }  or object { type, create_response, eagerness, interrupt_response }  or null`2665926660        Configuration for turn detection, ether Server VAD or Semantic VAD. This can be set to `null` to turn off, in which case the client must manually trigger model response.2666126662        Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2666326664        Semantic VAD is more advanced and uses a turn detection model (in conjunction with VAD) to semantically estimate whether the user has finished speaking, then dynamically sets a timeout based on this probability. For example, if user audio trails off with "uhhm", the model will score a low probability of turn end and wait longer for the user to continue speaking. This can be useful for more natural conversations, but may have a higher latency.2666526666        For `gpt-realtime-whisper` transcription sessions, turn detection must be26667        set to `null`; VAD is not supported.2666826669        - `ServerVad object { type, create_response, idle_timeout_ms, 4 more }`2667026671          Server-side voice activity detection (VAD) which flips on when user speech is detected and off after a period of silence.2667226673          - `type: "server_vad"`2667426675            Type of turn detection, `server_vad` to turn on simple Server VAD.2667626677            - `"server_vad"`2667826679          - `create_response: optional boolean`2668026681            Whether or not to automatically generate a response when a VAD stop event occurs. If `interrupt_response` is set to `false` this may fail to create a response if the model is already responding.2668226683            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2668426685          - `idle_timeout_ms: optional number or null`2668626687            Optional timeout after which a model response will be triggered automatically. This is26688            useful for situations in which a long pause from the user is unexpected, such as a phone26689            call. The model will effectively prompt the user to continue the conversation based26690            on the current context.2669126692            The timeout value will be applied after the last model response's audio has finished playing,26693            i.e. it's set to the `response.done` time plus audio playback duration.2669426695            An `input_audio_buffer.timeout_triggered` event (plus events26696            associated with the Response) will be emitted when the timeout is reached.26697            Idle timeout is currently only supported for `server_vad` mode.2669826699          - `interrupt_response: optional boolean`2670026701            Whether or not to automatically interrupt (cancel) any ongoing response with output to the default26702            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs. If `true` then the response will be cancelled, otherwise it will continue until complete.2670326704            If both `create_response` and `interrupt_response` are set to `false`, the model will never respond automatically but VAD events will still be emitted.2670526706          - `prefix_padding_ms: optional number`2670726708            Used only for `server_vad` mode. Amount of audio to include before the VAD detected speech (in26709            milliseconds). Defaults to 300ms.2671026711          - `silence_duration_ms: optional number`2671226713            Used only for `server_vad` mode. Duration of silence to detect speech stop (in milliseconds). Defaults26714            to 500ms. With shorter values the model will respond more quickly,26715            but may jump in on short pauses from the user.2671626717          - `threshold: optional number`2671826719            Used only for `server_vad` mode. Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A26720            higher threshold will require louder audio to activate the model, and26721            thus might perform better in noisy environments.2672226723        - `SemanticVad object { type, create_response, eagerness, interrupt_response }`2672426725          Server-side semantic turn detection which uses a model to determine when the user has finished speaking.2672626727          - `type: "semantic_vad"`2672826729            Type of turn detection, `semantic_vad` to turn on Semantic VAD.2673026731            - `"semantic_vad"`2673226733          - `create_response: optional boolean`2673426735            Whether or not to automatically generate a response when a VAD stop event occurs.2673626737          - `eagerness: optional "low" or "medium" or "high" or "auto"`2673826739            Used only for `semantic_vad` mode. The eagerness of the model to respond. `low` will wait longer for the user to continue speaking, `high` will respond more quickly. `auto` is the default and is equivalent to `medium`. `low`, `medium`, and `high` have max timeouts of 8s, 4s, and 2s respectively.2674026741            - `"low"`2674226743            - `"medium"`2674426745            - `"high"`2674626747            - `"auto"`2674826749          - `interrupt_response: optional boolean`2675026751            Whether or not to automatically interrupt any ongoing response with output to the default26752            conversation (i.e. `conversation` of `auto`) when a VAD start event occurs.2675326754    - `output: optional object { format, speed, voice }`2675526756      - `format: optional RealtimeAudioFormats`2675726758        The format of the output audio.2675926760      - `speed: optional number`2676126762        The speed of the model's spoken response as a multiple of the original speed.26763        1.0 is the default speed. 0.25 is the minimum speed. 1.5 is the maximum speed. This value can only be changed in between model turns, not while a response is in progress.2676426765        This parameter is a post-processing adjustment to the audio after it is generated, it's26766        also possible to prompt the model to speak faster or slower.2676726768      - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2676926770        The voice the model uses to respond. Voice cannot be changed during the26771        session once the model has responded with audio at least once. Current26772        voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,26773        `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for26774        best quality.2677526776        - `string`2677726778        - `"alloy" or "ash" or "ballad" or 7 more`2677926780          The voice the model uses to respond. Voice cannot be changed during the26781          session once the model has responded with audio at least once. Current26782          voice options are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`,26783          `shimmer`, `verse`, `marin`, and `cedar`. We recommend `marin` and `cedar` for26784          best quality.2678526786          - `"alloy"`2678726788          - `"ash"`2678926790          - `"ballad"`2679126792          - `"coral"`2679326794          - `"echo"`2679526796          - `"sage"`2679726798          - `"shimmer"`2679926800          - `"verse"`2680126802          - `"marin"`2680326804          - `"cedar"`2680526806  - `expires_at: optional number`2680726808    Expiration timestamp for the session, in seconds since epoch.2680926810  - `include: optional array of "item.input_audio_transcription.logprobs"`2681126812    Additional fields to include in server outputs.2681326814    `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2681526816    - `"item.input_audio_transcription.logprobs"`2681726818  - `instructions: optional string`2681926820    The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.2682126822    Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2682326824  - `max_output_tokens: optional number or "inf"`2682526826    Maximum number of output tokens for a single assistant response,26827    inclusive of tool calls. Provide an integer between 1 and 4096 to26828    limit output tokens, or `inf` for the maximum available tokens for a26829    given model. Defaults to `inf`.2683026831    - `number`2683226833    - `"inf"`2683426835      - `"inf"`2683626837  - `model: optional string or "gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2683826839    The Realtime model used for this session.2684026841    - `string`2684226843    - `"gpt-realtime" or "gpt-realtime-1.5" or "gpt-realtime-2" or 16 more`2684426845      The Realtime model used for this session.2684626847      - `"gpt-realtime"`2684826849      - `"gpt-realtime-1.5"`2685026851      - `"gpt-realtime-2"`2685226853      - `"gpt-realtime-2.1"`2685426855      - `"gpt-realtime-2.1-mini"`2685626857      - `"gpt-realtime-2025-08-28"`2685826859      - `"gpt-4o-realtime-preview"`2686026861      - `"gpt-4o-realtime-preview-2024-10-01"`2686226863      - `"gpt-4o-realtime-preview-2024-12-17"`2686426865      - `"gpt-4o-realtime-preview-2025-06-03"`2686626867      - `"gpt-4o-mini-realtime-preview"`2686826869      - `"gpt-4o-mini-realtime-preview-2024-12-17"`2687026871      - `"gpt-realtime-mini"`2687226873      - `"gpt-realtime-mini-2025-10-06"`2687426875      - `"gpt-realtime-mini-2025-12-15"`2687626877      - `"gpt-audio-1.5"`2687826879      - `"gpt-audio-mini"`2688026881      - `"gpt-audio-mini-2025-10-06"`2688226883      - `"gpt-audio-mini-2025-12-15"`2688426885  - `output_modalities: optional array of "text" or "audio"`2688626887    The set of modalities the model can respond with. It defaults to `["audio"]`, indicating26888    that the model will respond with audio plus a transcript. `["text"]` can be used to make26889    the model respond with text only. It is not possible to request both `text` and `audio` at the same time.2689026891    - `"text"`2689226893    - `"audio"`2689426895  - `prompt: optional ResponsePrompt or null`2689626897    Reference to a prompt template and its variables.26898    [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2689926900    - `id: string`2690126902      The unique identifier of the prompt template to use.2690326904    - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2690526906      Optional map of values to substitute in for variables in your26907      prompt. The substitution values can either be strings, or other26908      Response input types like images or files.2690926910      - `string`2691126912      - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2691326914        A text input to the model.2691526916        - `text: string`2691726918          The text input to the model.2691926920        - `type: "input_text"`2692126922          The type of the input item. Always `input_text`.2692326924          - `"input_text"`2692526926        - `prompt_cache_breakpoint: optional object { mode }`2692726928          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.2692926930          - `mode: "explicit"`2693126932            The breakpoint mode. Always `explicit`.2693326934            - `"explicit"`2693526936      - `ResponseInputImage object { detail, type, file_id, 2 more }`2693726938        An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2693926940        - `detail: ImageDetail`2694126942          The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2694326944          - `"low"`2694526946          - `"high"`2694726948          - `"auto"`2694926950          - `"original"`2695126952        - `type: "input_image"`2695326954          The type of the input item. Always `input_image`.2695526956          - `"input_image"`2695726958        - `file_id: optional string or null`2695926960          The ID of the file to be sent to the model.2696126962        - `image_url: optional string or null`2696326964          The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2696526966        - `prompt_cache_breakpoint: optional object { mode }`2696726968          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.2696926970          - `mode: "explicit"`2697126972            The breakpoint mode. Always `explicit`.2697326974            - `"explicit"`2697526976      - `ResponseInputFile object { type, detail, file_data, 4 more }`2697726978        A file input to the model.2697926980        - `type: "input_file"`2698126982          The type of the input item. Always `input_file`.2698326984          - `"input_file"`2698526986        - `detail: optional "auto" or "low" or "high"`2698726988          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`.2698926990          - `"auto"`2699126992          - `"low"`2699326994          - `"high"`2699526996        - `file_data: optional string`2699726998          The content of the file to be sent to the model.2699927000        - `file_id: optional string or null`2700127002          The ID of the file to be sent to the model.2700327004        - `file_url: optional string`2700527006          The URL of the file to be sent to the model.2700727008        - `filename: optional string`2700927010          The name of the file to be sent to the model.2701127012        - `prompt_cache_breakpoint: optional object { mode }`2701327014          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.2701527016          - `mode: "explicit"`2701727018            The breakpoint mode. Always `explicit`.2701927020            - `"explicit"`2702127022    - `version: optional string or null`2702327024      Optional version of the prompt template.2702527026  - `reasoning: optional RealtimeReasoning`2702727028    Configuration for reasoning-capable Realtime models such as `gpt-realtime-2`.2702927030    - `effort: optional RealtimeReasoningEffort`2703127032      Constrains effort on reasoning for reasoning-capable Realtime models such as27033      `gpt-realtime-2`.2703427035      - `"minimal"`2703627037      - `"low"`2703827039      - `"medium"`2704027041      - `"high"`2704227043      - `"xhigh"`2704427045  - `tool_choice: optional ToolChoiceOptions or ToolChoiceFunction or ToolChoiceMcp`2704627047    How the model chooses tools. Provide one of the string modes or force a specific27048    function/MCP tool.2704927050    - `ToolChoiceOptions = "none" or "auto" or "required"`2705127052      Controls which (if any) tool is called by the model.2705327054      `none` means the model will not call any tool and instead generates a message.2705527056      `auto` means the model can pick between generating a message or calling one or27057      more tools.2705827059      `required` means the model must call one or more tools.2706027061      - `"none"`2706227063      - `"auto"`2706427065      - `"required"`2706627067    - `ToolChoiceFunction object { name, type }`2706827069      Use this option to force the model to call a specific function.2707027071      - `name: string`2707227073        The name of the function to call.2707427075      - `type: "function"`2707627077        For function calling, the type is always `function`.2707827079        - `"function"`2708027081    - `ToolChoiceMcp object { server_label, type, name }`2708227083      Use this option to force the model to call a specific tool on a remote MCP server.2708427085      - `server_label: string`2708627087        The label of the MCP server to use.2708827089      - `type: "mcp"`2709027091        For MCP tools, the type is always `mcp`.2709227093        - `"mcp"`2709427095      - `name: optional string or null`2709627097        The name of the tool to call on the server.2709827099  - `tools: optional array of RealtimeFunctionTool or object { server_label, type, allowed_callers, 9 more }`2710027101    Tools available to the model.2710227103    - `RealtimeFunctionTool object { description, name, parameters, type }`2710427105      - `description: optional string`2710627107        The description of the function, including guidance on when and how27108        to call it, and guidance about what to tell the user when calling27109        (if anything).2711027111      - `name: optional string`2711227113        The name of the function.2711427115      - `parameters: optional unknown`2711627117        Parameters of the function in JSON Schema.2711827119      - `type: optional "function"`2712027121        The type of the tool, i.e. `function`.2712227123        - `"function"`2712427125    - `McpTool object { server_label, type, allowed_callers, 9 more }`2712627127      Give the model access to additional tools via remote Model Context Protocol27128      (MCP) servers. [Learn more about MCP](/api/docs/guides/tools-connectors-mcp).2712927130      - `server_label: string`2713127132        A label for this MCP server, used to identify it in tool calls.2713327134      - `type: "mcp"`2713527136        The type of the MCP tool. Always `mcp`.2713727138        - `"mcp"`2713927140      - `allowed_callers: optional array of "direct" or "programmatic" or null`2714127142        The tool invocation context(s).2714327144        - `"direct"`2714527146        - `"programmatic"`2714727148      - `allowed_tools: optional array of string or object { read_only, tool_names }  or null`2714927150        List of allowed tool names or a filter object.2715127152        - `McpAllowedTools = array of string`2715327154          A string array of allowed tool names2715527156        - `McpToolFilter object { read_only, tool_names }`2715727158          A filter object to specify which tools are allowed.2715927160          - `read_only: optional boolean`2716127162            Indicates whether or not a tool modifies data or is read-only. If an27163            MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),27164            it will match this filter.2716527166          - `tool_names: optional array of string`2716727168            List of allowed tool names.2716927170      - `authorization: optional string`2717127172        An OAuth access token that can be used with a remote MCP server, either27173        with a custom MCP server URL or a service connector. Your application27174        must handle the OAuth authorization flow and provide the token here.2717527176      - `connector_id: optional "connector_dropbox" or "connector_gmail" or "connector_googlecalendar" or 5 more`2717727178        Identifier for service connectors, like those available in ChatGPT. One of27179        `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more27180        about service connectors [here](/api/docs/guides/tools-connectors-mcp#connectors).2718127182        This field is deprecated for models released after September 1, 2026.27183        Use `server_url` to connect to a remote MCP server, or `tunnel_id` to27184        connect through a Secure MCP Tunnel.2718527186        Currently supported `connector_id` values are:2718727188        - Dropbox: `connector_dropbox`27189        - Gmail: `connector_gmail`27190        - Google Calendar: `connector_googlecalendar`27191        - Google Drive: `connector_googledrive`27192        - Microsoft Teams: `connector_microsoftteams`27193        - Outlook Calendar: `connector_outlookcalendar`27194        - Outlook Email: `connector_outlookemail`27195        - SharePoint: `connector_sharepoint`2719627197        - `"connector_dropbox"`2719827199        - `"connector_gmail"`2720027201        - `"connector_googlecalendar"`2720227203        - `"connector_googledrive"`2720427205        - `"connector_microsoftteams"`2720627207        - `"connector_outlookcalendar"`2720827209        - `"connector_outlookemail"`2721027211        - `"connector_sharepoint"`2721227213      - `defer_loading: optional boolean`2721427215        Whether this MCP tool is deferred and discovered via tool search.2721627217      - `headers: optional map[string] or null`2721827219        Optional HTTP headers to send to the MCP server. Use for authentication27220        or other purposes.2722127222      - `require_approval: optional object { always, never }  or "always" or "never" or null`2722327224        Specify which of the MCP server's tools require approval.2722527226        - `McpToolApprovalFilter object { always, never }`2722727228          Specify which of the MCP server's tools require approval. Can be27229          `always`, `never`, or a filter object associated with tools27230          that require approval.2723127232          - `always: optional object { read_only, tool_names }`2723327234            A filter object to specify which tools are allowed.2723527236            - `read_only: optional boolean`2723727238              Indicates whether or not a tool modifies data or is read-only. If an27239              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),27240              it will match this filter.2724127242            - `tool_names: optional array of string`2724327244              List of allowed tool names.2724527246          - `never: optional object { read_only, tool_names }`2724727248            A filter object to specify which tools are allowed.2724927250            - `read_only: optional boolean`2725127252              Indicates whether or not a tool modifies data or is read-only. If an27253              MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations-readonlyhint),27254              it will match this filter.2725527256            - `tool_names: optional array of string`2725727258              List of allowed tool names.2725927260        - `McpToolApprovalSetting = "always" or "never"`2726127262          Specify a single approval policy for all tools. One of `always` or27263          `never`. When set to `always`, all tools will require approval. When27264          set to `never`, all tools will not require approval.2726527266          - `"always"`2726727268          - `"never"`2726927270      - `server_description: optional string`2727127272        Optional description of the MCP server, used to provide more context.2727327274      - `server_url: optional string`2727527276        The URL for the MCP server. One of `server_url`, `connector_id`, or27277        `tunnel_id` must be provided.2727827279      - `tunnel_id: optional string`2728027281        The Secure MCP Tunnel ID to use instead of a direct server URL. One of27282        `server_url`, `connector_id`, or `tunnel_id` must be provided.2728327284  - `tracing: optional "auto" or object { group_id, metadata, workflow_name }  or null`2728527286    Realtime API can write session traces to the [Traces Dashboard](https://platform.openai.com/logs?api=traces). Set to null to disable tracing. Once27287    tracing is enabled for a session, the configuration cannot be modified.2728827289    `auto` will create a trace for the session with default values for the27290    workflow name, group id, and metadata.2729127292    - `Auto = "auto"`2729327294      Enables tracing and sets default values for tracing configuration options. Always `auto`.2729527296      - `"auto"`2729727298    - `TracingConfiguration object { group_id, metadata, workflow_name }`2729927300      Granular configuration for tracing.2730127302      - `group_id: optional string`2730327304        The group id to attach to this trace to enable filtering and27305        grouping in the Traces Dashboard.2730627307      - `metadata: optional unknown`2730827309        The arbitrary metadata to attach to this trace to enable27310        filtering in the Traces Dashboard.2731127312      - `workflow_name: optional string`2731327314        The name of the workflow to attach to this trace. This is used to27315        name the trace in the Traces Dashboard.2731627317  - `truncation: optional RealtimeTruncation`2731827319    When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2732027321    Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2732227323    Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2732427325    Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2732627327    - `"auto" or "disabled"`2732827329      The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2733027331      - `"auto"`2733227333      - `"disabled"`2733427335    - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2733627337      Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2733827339      - `retention_ratio: number`2734027341        Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2734227343      - `type: "retention_ratio"`2734427345        Use retention ratio truncation.2734627347        - `"retention_ratio"`2734827349      - `token_limits: optional object { post_instructions }`2735027351        Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2735227353        - `post_instructions: optional number`2735427355          Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2735627357### Realtime Transcription Session Create Response2735827359- `RealtimeTranscriptionSessionCreateResponse object { id, object, type, 3 more }`2736027361  A Realtime transcription session configuration object.2736227363  - `id: string`2736427365    Unique identifier for the session that looks like `sess_1234567890abcdef`.2736627367  - `object: string`2736827369    The object type. Always `realtime.transcription_session`.2737027371  - `type: "transcription"`2737227373    The type of session. Always `transcription` for transcription sessions.2737427375    - `"transcription"`2737627377  - `audio: optional object { input }`2737827379    Configuration for input audio for the session.2738027381    - `input: optional object { format, noise_reduction, transcription, turn_detection }`2738227383      - `format: optional RealtimeAudioFormats`2738427385        The PCM audio format. Only a 24kHz sample rate is supported.2738627387        - `PCMAudio object { rate, type }`2738827389          The PCM audio format. Only a 24kHz sample rate is supported.2739027391          - `rate: optional 24000`2739227393            The sample rate of the audio. Always `24000`.2739427395            - `24000`2739627397          - `type: optional "audio/pcm"`2739827399            The audio format. Always `audio/pcm`.2740027401            - `"audio/pcm"`2740227403        - `PCMUAudio object { type }`2740427405          The G.711 μ-law format.2740627407          - `type: optional "audio/pcmu"`2740827409            The audio format. Always `audio/pcmu`.2741027411            - `"audio/pcmu"`2741227413        - `PCMAAudio object { type }`2741427415          The G.711 A-law format.2741627417          - `type: optional "audio/pcma"`2741827419            The audio format. Always `audio/pcma`.2742027421            - `"audio/pcma"`2742227423      - `noise_reduction: optional object { type }`2742427425        Configuration for input audio noise reduction.2742627427        - `type: optional NoiseReductionType`2742827429          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2743027431          - `"near_field"`2743227433          - `"far_field"`2743427435      - `transcription: optional object { language, languages, model, prompt }`2743627437        Configuration of the transcription model.2743827439        - `language: optional string`2744027441          The language of the input audio.2744227443        - `languages: optional array of string`2744427445          The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2744627447        - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2744827449          The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2745027451          - `string`2745227453          - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2745427455            The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2745627457            - `"whisper-1"`2745827459            - `"gpt-transcribe"`2746027461            - `"gpt-live-transcribe"`2746227463            - `"gpt-4o-mini-transcribe"`2746427465            - `"gpt-4o-mini-transcribe-2025-12-15"`2746627467            - `"gpt-4o-transcribe"`2746827469            - `"gpt-4o-transcribe-diarize"`2747027471            - `"gpt-realtime-whisper"`2747227473        - `prompt: optional string`2747427475          The prompt configured for input audio transcription, when present.2747627477      - `turn_detection: optional RealtimeTranscriptionSessionTurnDetection or null`2747827479        Configuration for turn detection. Can be set to `null` to turn off. Server27480        VAD means that the model will detect the start and end of speech based on27481        audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2748227483        - `prefix_padding_ms: optional number`2748427485          Amount of audio to include before the VAD detected speech (in27486          milliseconds). Defaults to 300ms.2748727488        - `silence_duration_ms: optional number`2748927490          Duration of silence to detect speech stop (in milliseconds). Defaults27491          to 500ms. With shorter values the model will respond more quickly,27492          but may jump in on short pauses from the user.2749327494        - `threshold: optional number`2749527496          Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A27497          higher threshold will require louder audio to activate the model, and27498          thus might perform better in noisy environments.2749927500        - `type: optional string`2750127502          Type of turn detection, only `server_vad` is currently supported.2750327504  - `expires_at: optional number`2750527506    Expiration timestamp for the session, in seconds since epoch.2750727508  - `include: optional array of "item.input_audio_transcription.logprobs"`2750927510    Additional fields to include in server outputs.2751127512    - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2751327514    - `"item.input_audio_transcription.logprobs"`2751527516### Realtime Transcription Session Turn Detection2751727518- `RealtimeTranscriptionSessionTurnDetection object { prefix_padding_ms, silence_duration_ms, threshold, type }`2751927520  Configuration for turn detection. Can be set to `null` to turn off. Server27521  VAD means that the model will detect the start and end of speech based on27522  audio volume and respond at the end of user speech. For `gpt-realtime-whisper`, this must be `null`; VAD is not supported.2752327524  - `prefix_padding_ms: optional number`2752527526    Amount of audio to include before the VAD detected speech (in27527    milliseconds). Defaults to 300ms.2752827529  - `silence_duration_ms: optional number`2753027531    Duration of silence to detect speech stop (in milliseconds). Defaults27532    to 500ms. With shorter values the model will respond more quickly,27533    but may jump in on short pauses from the user.2753427535  - `threshold: optional number`2753627537    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A27538    higher threshold will require louder audio to activate the model, and27539    thus might perform better in noisy environments.2754027541  - `type: optional string`2754227543    Type of turn detection, only `server_vad` is currently supported.2754427545# Sessions2754627547## Create session2754827549**post** `/realtime/sessions`2755027551Create an ephemeral API token for use in client-side applications with the27552Realtime API. Can be configured with the same session parameters as the27553`session.update` client event.2755427555It responds with a session object, plus a `client_secret` key which contains27556a usable ephemeral API token that can be used to authenticate browser clients27557for the Realtime API.2755827559Returns the created Realtime session object, plus an ephemeral key.2756027561### Body Parameters2756227563- `client_secret: object { expires_at, value }`2756427565  Ephemeral key returned by the API.2756627567  - `expires_at: number`2756827569    Timestamp for when the token expires. Currently, all tokens expire27570    after one minute.2757127572  - `value: string`2757327574    Ephemeral key usable in client environments to authenticate connections27575    to the Realtime API. Use this in client-side environments rather than27576    a standard API token, which should only be used server-side.2757727578- `input_audio_format: optional string`2757927580  The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.2758127582- `input_audio_transcription: optional object { model }`2758327584  Configuration for input audio transcription, defaults to off and can be27585  set to `null` to turn off once on. Input audio transcription is not native27586  to the model, since the model consumes audio directly. Transcription runs27587  asynchronously and should be treated as rough guidance27588  rather than the representation understood by the model.2758927590  - `model: optional string`2759127592    The model to use for transcription.2759327594- `instructions: optional string`2759527596  The default system instructions (i.e. system message) prepended to model calls. This field allows the client to guide the model on desired responses. The model can be instructed on response content and format, (e.g. "be extremely succinct", "act friendly", "here are examples of good responses") and on audio behavior (e.g. "talk quickly", "inject emotion into your voice", "laugh frequently"). The instructions are not guaranteed to be followed by the model, but they provide guidance to the model on the desired behavior.27597  Note that the server sets default instructions which will be used if this field is not set and are visible in the `session.created` event at the start of the session.2759827599- `max_response_output_tokens: optional number or "inf"`2760027601  Maximum number of output tokens for a single assistant response,27602  inclusive of tool calls. Provide an integer between 1 and 4096 to27603  limit output tokens, or `inf` for the maximum available tokens for a27604  given model. Defaults to `inf`.2760527606  - `number`2760727608  - `"inf"`2760927610    - `"inf"`2761127612- `modalities: optional array of "text" or "audio"`2761327614  The set of modalities the model can respond with. To disable audio,27615  set this to ["text"].2761627617  - `"text"`2761827619  - `"audio"`2762027621- `output_audio_format: optional string`2762227623  The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.2762427625- `prompt: optional ResponsePrompt or null`2762627627  Reference to a prompt template and its variables.27628  [Learn more](/api/docs/guides/text?api-mode=responses#version-prompts-in-code).2762927630  - `id: string`2763127632    The unique identifier of the prompt template to use.2763327634  - `variables: optional map[string or ResponseInputText or ResponseInputImage or ResponseInputFile] or null`2763527636    Optional map of values to substitute in for variables in your27637    prompt. The substitution values can either be strings, or other27638    Response input types like images or files.2763927640    - `string`2764127642    - `ResponseInputText object { text, type, prompt_cache_breakpoint }`2764327644      A text input to the model.2764527646      - `text: string`2764727648        The text input to the model.2764927650      - `type: "input_text"`2765127652        The type of the input item. Always `input_text`.2765327654        - `"input_text"`2765527656      - `prompt_cache_breakpoint: optional object { mode }`2765727658        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.2765927660        - `mode: "explicit"`2766127662          The breakpoint mode. Always `explicit`.2766327664          - `"explicit"`2766527666    - `ResponseInputImage object { detail, type, file_id, 2 more }`2766727668      An image input to the model. Learn about [image inputs](/api/docs/guides/images-vision).2766927670      - `detail: ImageDetail`2767127672        The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`.2767327674        - `"low"`2767527676        - `"high"`2767727678        - `"auto"`2767927680        - `"original"`2768127682      - `type: "input_image"`2768327684        The type of the input item. Always `input_image`.2768527686        - `"input_image"`2768727688      - `file_id: optional string or null`2768927690        The ID of the file to be sent to the model.2769127692      - `image_url: optional string or null`2769327694        The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.2769527696      - `prompt_cache_breakpoint: optional object { mode }`2769727698        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.2769927700        - `mode: "explicit"`2770127702          The breakpoint mode. Always `explicit`.2770327704          - `"explicit"`2770527706    - `ResponseInputFile object { type, detail, file_data, 4 more }`2770727708      A file input to the model.2770927710      - `type: "input_file"`2771127712        The type of the input item. Always `input_file`.2771327714        - `"input_file"`2771527716      - `detail: optional "auto" or "low" or "high"`2771727718        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`.2771927720        - `"auto"`2772127722        - `"low"`2772327724        - `"high"`2772527726      - `file_data: optional string`2772727728        The content of the file to be sent to the model.2772927730      - `file_id: optional string or null`2773127732        The ID of the file to be sent to the model.2773327734      - `file_url: optional string`2773527736        The URL of the file to be sent to the model.2773727738      - `filename: optional string`2773927740        The name of the file to be sent to the model.2774127742      - `prompt_cache_breakpoint: optional object { mode }`2774327744        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.2774527746        - `mode: "explicit"`2774727748          The breakpoint mode. Always `explicit`.2774927750          - `"explicit"`2775127752  - `version: optional string or null`2775327754    Optional version of the prompt template.2775527756- `speed: optional number`2775727758  The speed of the model's spoken response. 1.0 is the default speed. 0.25 is27759  the minimum speed. 1.5 is the maximum speed. This value can only be changed27760  in between model turns, not while a response is in progress.2776127762- `temperature: optional number`2776327764  Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8.2776527766- `tool_choice: optional string`2776727768  How the model chooses tools. Options are `auto`, `none`, `required`, or27769  specify a function.2777027771- `tools: optional array of object { description, name, parameters, type }`2777227773  Tools (functions) available to the model.2777427775  - `description: optional string`2777627777    The description of the function, including guidance on when and how27778    to call it, and guidance about what to tell the user when calling27779    (if anything).2778027781  - `name: optional string`2778227783    The name of the function.2778427785  - `parameters: optional unknown`2778627787    Parameters of the function in JSON Schema.2778827789  - `type: optional "function"`2779027791    The type of the tool, i.e. `function`.2779227793    - `"function"`2779427795- `tracing: optional "auto" or object { group_id, metadata, workflow_name }`2779627797  Configuration options for tracing. Set to null to disable tracing. Once27798  tracing is enabled for a session, the configuration cannot be modified.2779927800  `auto` will create a trace for the session with default values for the27801  workflow name, group id, and metadata.2780227803  - `"auto"`2780427805    Default tracing mode for the session.2780627807    - `"auto"`2780827809  - `TracingConfiguration object { group_id, metadata, workflow_name }`2781027811    Granular configuration for tracing.2781227813    - `group_id: optional string`2781427815      The group id to attach to this trace to enable filtering and27816      grouping in the traces dashboard.2781727818    - `metadata: optional unknown`2781927820      The arbitrary metadata to attach to this trace to enable27821      filtering in the traces dashboard.2782227823    - `workflow_name: optional string`2782427825      The name of the workflow to attach to this trace. This is used to27826      name the trace in the traces dashboard.2782727828- `truncation: optional RealtimeTruncation`2782927830  When the number of tokens in a conversation exceeds the model's input token limit, the conversation be truncated, meaning messages (starting from the oldest) will not be included in the model's context. A 32k context model with 4,096 max output tokens can only include 28,224 tokens in the context before truncation occurs.2783127832  Clients can configure truncation behavior to truncate with a lower max token limit, which is an effective way to control token usage and cost.2783327834  Truncation will reduce the number of cached tokens on the next turn (busting the cache), since messages are dropped from the beginning of the context. However, clients can also configure truncation to retain messages up to a fraction of the maximum context size, which will reduce the need for future truncations and thus improve the cache rate.2783527836  Truncation can be disabled entirely, which means the server will never truncate but would instead return an error if the conversation exceeds the model's input token limit.2783727838  - `"auto" or "disabled"`2783927840    The truncation strategy to use for the session. `auto` is the default truncation strategy. `disabled` will disable truncation and emit errors when the conversation exceeds the input token limit.2784127842    - `"auto"`2784327844    - `"disabled"`2784527846  - `RetentionRatioTruncation object { retention_ratio, type, token_limits }`2784727848    Retain a fraction of the conversation tokens when the conversation exceeds the input token limit. This allows you to amortize truncations across multiple turns, which can help improve cached token usage.2784927850    - `retention_ratio: number`2785127852      Fraction of post-instruction conversation tokens to retain (`0.0` - `1.0`) when the conversation exceeds the input token limit. Setting this to `0.8` means that messages will be dropped until 80% of the maximum allowed tokens are used. This helps reduce the frequency of truncations and improve cache rates.2785327854    - `type: "retention_ratio"`2785527856      Use retention ratio truncation.2785727858      - `"retention_ratio"`2785927860    - `token_limits: optional object { post_instructions }`2786127862      Optional custom token limits for this truncation strategy. If not provided, the model's default token limits will be used.2786327864      - `post_instructions: optional number`2786527866        Maximum tokens allowed in the conversation after instructions (which including tool definitions). For example, setting this to 5,000 would mean that truncation would occur when the conversation exceeds 5,000 tokens after instructions. This cannot be higher than the model's context window size minus the maximum output tokens.2786727868- `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2786927870  Configuration for turn detection. Can be set to `null` to turn off. Server27871  VAD means that the model will detect the start and end of speech based on27872  audio volume and respond at the end of user speech.2787327874  - `prefix_padding_ms: optional number`2787527876    Amount of audio to include before the VAD detected speech (in27877    milliseconds). Defaults to 300ms.2787827879  - `silence_duration_ms: optional number`2788027881    Duration of silence to detect speech stop (in milliseconds). Defaults27882    to 500ms. With shorter values the model will respond more quickly,27883    but may jump in on short pauses from the user.2788427885  - `threshold: optional number`2788627887    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A27888    higher threshold will require louder audio to activate the model, and27889    thus might perform better in noisy environments.2789027891  - `type: optional string`2789227893    Type of turn detection, only `server_vad` is currently supported.2789427895- `voice: optional string or "alloy" or "ash" or "ballad" or 7 more or object { id }`2789627897  The voice the model uses to respond. Supported built-in voices are27898  `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`,27899  `marin`, and `cedar`. You may also provide a custom voice object with an27900  `id`, for example `{ "id": "voice_1234" }`. Voice cannot be changed during27901  the session once the model has responded with audio at least once.2790227903  - `string`2790427905  - `"alloy" or "ash" or "ballad" or 7 more`2790627907    - `"alloy"`2790827909    - `"ash"`2791027911    - `"ballad"`2791227913    - `"coral"`2791427915    - `"echo"`2791627917    - `"sage"`2791827919    - `"shimmer"`2792027921    - `"verse"`2792227923    - `"marin"`2792427925    - `"cedar"`2792627927  - `ID object { id }`2792827929    Custom voice reference.2793027931    - `id: string`2793227933      The custom voice ID, e.g. `voice_1234`.2793427935### Returns2793627937- `id: optional string`2793827939  Unique identifier for the session that looks like `sess_1234567890abcdef`.2794027941- `audio: optional object { input, output }`2794227943  Configuration for input and output audio for the session.2794427945  - `input: optional object { format, noise_reduction, transcription, turn_detection }`2794627947    - `format: optional RealtimeAudioFormats`2794827949      The PCM audio format. Only a 24kHz sample rate is supported.2795027951      - `PCMAudio object { rate, type }`2795227953        The PCM audio format. Only a 24kHz sample rate is supported.2795427955        - `rate: optional 24000`2795627957          The sample rate of the audio. Always `24000`.2795827959          - `24000`2796027961        - `type: optional "audio/pcm"`2796227963          The audio format. Always `audio/pcm`.2796427965          - `"audio/pcm"`2796627967      - `PCMUAudio object { type }`2796827969        The G.711 μ-law format.2797027971        - `type: optional "audio/pcmu"`2797227973          The audio format. Always `audio/pcmu`.2797427975          - `"audio/pcmu"`2797627977      - `PCMAAudio object { type }`2797827979        The G.711 A-law format.2798027981        - `type: optional "audio/pcma"`2798227983          The audio format. Always `audio/pcma`.2798427985          - `"audio/pcma"`2798627987    - `noise_reduction: optional object { type }`2798827989      Configuration for input audio noise reduction.2799027991      - `type: optional NoiseReductionType`2799227993        Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2799427995        - `"near_field"`2799627997        - `"far_field"`2799827999    - `transcription: optional object { language, languages, model, prompt }`2800028001      Configuration for input audio transcription.2800228003      - `language: optional string`2800428005        The language of the input audio.2800628007      - `languages: optional array of string`2800828009        The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2801028011      - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2801228013        The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2801428015        - `string`2801628017        - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2801828019          The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2802028021          - `"whisper-1"`2802228023          - `"gpt-transcribe"`2802428025          - `"gpt-live-transcribe"`2802628027          - `"gpt-4o-mini-transcribe"`2802828029          - `"gpt-4o-mini-transcribe-2025-12-15"`2803028031          - `"gpt-4o-transcribe"`2803228033          - `"gpt-4o-transcribe-diarize"`2803428035          - `"gpt-realtime-whisper"`2803628037      - `prompt: optional string`2803828039        The prompt configured for input audio transcription, when present.2804028041    - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2804228043      Configuration for turn detection.2804428045      - `prefix_padding_ms: optional number`2804628047      - `silence_duration_ms: optional number`2804828049      - `threshold: optional number`2805028051      - `type: optional string`2805228053        Type of turn detection, only `server_vad` is currently supported.2805428055  - `output: optional object { format, speed, voice }`2805628057    - `format: optional RealtimeAudioFormats`2805828059      The PCM audio format. Only a 24kHz sample rate is supported.2806028061    - `speed: optional number`2806228063    - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2806428065      - `string`2806628067      - `"alloy" or "ash" or "ballad" or 7 more`2806828069        - `"alloy"`2807028071        - `"ash"`2807228073        - `"ballad"`2807428075        - `"coral"`2807628077        - `"echo"`2807828079        - `"sage"`2808028081        - `"shimmer"`2808228083        - `"verse"`2808428085        - `"marin"`2808628087        - `"cedar"`2808828089- `expires_at: optional number`2809028091  Expiration timestamp for the session, in seconds since epoch.2809228093- `include: optional array of "item.input_audio_transcription.logprobs"`2809428095  Additional fields to include in server outputs.2809628097  - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2809828099  - `"item.input_audio_transcription.logprobs"`2810028101- `instructions: optional string`2810228103  The default system instructions (i.e. system message) prepended to model28104  calls. This field allows the client to guide the model on desired28105  responses. The model can be instructed on response content and format,28106  (e.g. "be extremely succinct", "act friendly", "here are examples of good28107  responses") and on audio behavior (e.g. "talk quickly", "inject emotion28108  into your voice", "laugh frequently"). The instructions are not guaranteed28109  to be followed by the model, but they provide guidance to the model on the28110  desired behavior.2811128112  Note that the server sets default instructions which will be used if this28113  field is not set and are visible in the `session.created` event at the28114  start of the session.2811528116- `max_output_tokens: optional number or "inf"`2811728118  Maximum number of output tokens for a single assistant response,28119  inclusive of tool calls. Provide an integer between 1 and 4096 to28120  limit output tokens, or `inf` for the maximum available tokens for a28121  given model. Defaults to `inf`.2812228123  - `number`2812428125  - `"inf"`2812628127    - `"inf"`2812828129- `model: optional string`2813028131  The Realtime model used for this session.2813228133- `object: optional string`2813428135  The object type. Always `realtime.session`.2813628137- `output_modalities: optional array of "text" or "audio"`2813828139  The set of modalities the model can respond with. To disable audio,28140  set this to ["text"].2814128142  - `"text"`2814328144  - `"audio"`2814528146- `tool_choice: optional string`2814728148  How the model chooses tools. Options are `auto`, `none`, `required`, or28149  specify a function.2815028151- `tools: optional array of RealtimeFunctionTool`2815228153  Tools (functions) available to the model.2815428155  - `description: optional string`2815628157    The description of the function, including guidance on when and how28158    to call it, and guidance about what to tell the user when calling28159    (if anything).2816028161  - `name: optional string`2816228163    The name of the function.2816428165  - `parameters: optional unknown`2816628167    Parameters of the function in JSON Schema.2816828169  - `type: optional "function"`2817028171    The type of the tool, i.e. `function`.2817228173    - `"function"`2817428175- `tracing: optional "auto" or object { group_id, metadata, workflow_name }`2817628177  Configuration options for tracing. Set to null to disable tracing. Once28178  tracing is enabled for a session, the configuration cannot be modified.2817928180  `auto` will create a trace for the session with default values for the28181  workflow name, group id, and metadata.2818228183  - `"auto"`2818428185    Default tracing mode for the session.2818628187    - `"auto"`2818828189  - `TracingConfiguration object { group_id, metadata, workflow_name }`2819028191    Granular configuration for tracing.2819228193    - `group_id: optional string`2819428195      The group id to attach to this trace to enable filtering and28196      grouping in the traces dashboard.2819728198    - `metadata: optional unknown`2819928200      The arbitrary metadata to attach to this trace to enable28201      filtering in the traces dashboard.2820228203    - `workflow_name: optional string`2820428205      The name of the workflow to attach to this trace. This is used to28206      name the trace in the traces dashboard.2820728208- `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2820928210  Configuration for turn detection. Can be set to `null` to turn off. Server28211  VAD means that the model will detect the start and end of speech based on28212  audio volume and respond at the end of user speech.2821328214  - `prefix_padding_ms: optional number`2821528216    Amount of audio to include before the VAD detected speech (in28217    milliseconds). Defaults to 300ms.2821828219  - `silence_duration_ms: optional number`2822028221    Duration of silence to detect speech stop (in milliseconds). Defaults28222    to 500ms. With shorter values the model will respond more quickly,28223    but may jump in on short pauses from the user.2822428225  - `threshold: optional number`2822628227    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A28228    higher threshold will require louder audio to activate the model, and28229    thus might perform better in noisy environments.2823028231  - `type: optional string`2823228233    Type of turn detection, only `server_vad` is currently supported.2823428235### Example2823628237```http28238curl https://api.openai.com/v1/realtime/sessions \28239    -H 'Content-Type: application/json' \28240    -H "Authorization: Bearer $OPENAI_API_KEY" \28241    -d '{28242          "client_secret": {28243            "expires_at": 0,28244            "value": "value"28245          }28246        }'28247```2824828249#### Response2825028251```json28252{28253  "id": "id",28254  "audio": {28255    "input": {28256      "format": {28257        "rate": 24000,28258        "type": "audio/pcm"28259      },28260      "noise_reduction": {28261        "type": "near_field"28262      },28263      "transcription": {28264        "language": "language",28265        "languages": [28266          "string"28267        ],28268        "model": "whisper-1",28269        "prompt": "prompt"28270      },28271      "turn_detection": {28272        "prefix_padding_ms": 0,28273        "silence_duration_ms": 0,28274        "threshold": 0,28275        "type": "type"28276      }28277    },28278    "output": {28279      "format": {28280        "rate": 24000,28281        "type": "audio/pcm"28282      },28283      "speed": 0,28284      "voice": "ash"28285    }28286  },28287  "expires_at": 0,28288  "include": [28289    "item.input_audio_transcription.logprobs"28290  ],28291  "instructions": "instructions",28292  "max_output_tokens": "inf",28293  "model": "model",28294  "object": "object",28295  "output_modalities": [28296    "text"28297  ],28298  "tool_choice": "tool_choice",28299  "tools": [28300    {28301      "description": "description",28302      "name": "name",28303      "parameters": {},28304      "type": "function"28305    }28306  ],28307  "tracing": "auto",28308  "turn_detection": {28309    "prefix_padding_ms": 0,28310    "silence_duration_ms": 0,28311    "threshold": 0,28312    "type": "type"28313  }28314}28315```2831628317### Example2831828319```http28320curl -X POST https://api.openai.com/v1/realtime/sessions \28321  -H "Authorization: Bearer $OPENAI_API_KEY" \28322  -H "Content-Type: application/json" \28323  -d '{28324    "model": "gpt-realtime",28325    "modalities": ["audio", "text"],28326    "instructions": "You are a friendly assistant."28327  }'28328```2832928330#### Response2833128332```json28333{28334  "id": "sess_001",28335  "object": "realtime.session",28336  "model": "gpt-realtime-2025-08-25",28337  "modalities": ["audio", "text"],28338  "instructions": "You are a friendly assistant.",28339  "voice": "alloy",28340  "input_audio_format": "pcm16",28341  "output_audio_format": "pcm16",28342  "input_audio_transcription": {28343      "model": "whisper-1"28344  },28345  "turn_detection": null,28346  "tools": [],28347  "tool_choice": "none",28348  "temperature": 0.7,28349  "max_response_output_tokens": 200,28350  "speed": 1.1,28351  "tracing": "auto",28352  "client_secret": {28353    "value": "ek_abc123", 28354    "expires_at": 123456789028355  }28356}28357```2835828359## Domain Types2836028361### Session Create Response2836228363- `SessionCreateResponse object { id, audio, expires_at, 10 more }`2836428365  A Realtime session configuration object.2836628367  - `id: optional string`2836828369    Unique identifier for the session that looks like `sess_1234567890abcdef`.2837028371  - `audio: optional object { input, output }`2837228373    Configuration for input and output audio for the session.2837428375    - `input: optional object { format, noise_reduction, transcription, turn_detection }`2837628377      - `format: optional RealtimeAudioFormats`2837828379        The PCM audio format. Only a 24kHz sample rate is supported.2838028381        - `PCMAudio object { rate, type }`2838228383          The PCM audio format. Only a 24kHz sample rate is supported.2838428385          - `rate: optional 24000`2838628387            The sample rate of the audio. Always `24000`.2838828389            - `24000`2839028391          - `type: optional "audio/pcm"`2839228393            The audio format. Always `audio/pcm`.2839428395            - `"audio/pcm"`2839628397        - `PCMUAudio object { type }`2839828399          The G.711 μ-law format.2840028401          - `type: optional "audio/pcmu"`2840228403            The audio format. Always `audio/pcmu`.2840428405            - `"audio/pcmu"`2840628407        - `PCMAAudio object { type }`2840828409          The G.711 A-law format.2841028411          - `type: optional "audio/pcma"`2841228413            The audio format. Always `audio/pcma`.2841428415            - `"audio/pcma"`2841628417      - `noise_reduction: optional object { type }`2841828419        Configuration for input audio noise reduction.2842028421        - `type: optional NoiseReductionType`2842228423          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2842428425          - `"near_field"`2842628427          - `"far_field"`2842828429      - `transcription: optional object { language, languages, model, prompt }`2843028431        Configuration for input audio transcription.2843228433        - `language: optional string`2843428435          The language of the input audio.2843628437        - `languages: optional array of string`2843828439          The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2844028441        - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2844228443          The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2844428445          - `string`2844628447          - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2844828449            The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2845028451            - `"whisper-1"`2845228453            - `"gpt-transcribe"`2845428455            - `"gpt-live-transcribe"`2845628457            - `"gpt-4o-mini-transcribe"`2845828459            - `"gpt-4o-mini-transcribe-2025-12-15"`2846028461            - `"gpt-4o-transcribe"`2846228463            - `"gpt-4o-transcribe-diarize"`2846428465            - `"gpt-realtime-whisper"`2846628467        - `prompt: optional string`2846828469          The prompt configured for input audio transcription, when present.2847028471      - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2847228473        Configuration for turn detection.2847428475        - `prefix_padding_ms: optional number`2847628477        - `silence_duration_ms: optional number`2847828479        - `threshold: optional number`2848028481        - `type: optional string`2848228483          Type of turn detection, only `server_vad` is currently supported.2848428485    - `output: optional object { format, speed, voice }`2848628487      - `format: optional RealtimeAudioFormats`2848828489        The PCM audio format. Only a 24kHz sample rate is supported.2849028491      - `speed: optional number`2849228493      - `voice: optional string or "alloy" or "ash" or "ballad" or 7 more`2849428495        - `string`2849628497        - `"alloy" or "ash" or "ballad" or 7 more`2849828499          - `"alloy"`2850028501          - `"ash"`2850228503          - `"ballad"`2850428505          - `"coral"`2850628507          - `"echo"`2850828509          - `"sage"`2851028511          - `"shimmer"`2851228513          - `"verse"`2851428515          - `"marin"`2851628517          - `"cedar"`2851828519  - `expires_at: optional number`2852028521    Expiration timestamp for the session, in seconds since epoch.2852228523  - `include: optional array of "item.input_audio_transcription.logprobs"`2852428525    Additional fields to include in server outputs.2852628527    - `item.input_audio_transcription.logprobs`: Include logprobs for input audio transcription.2852828529    - `"item.input_audio_transcription.logprobs"`2853028531  - `instructions: optional string`2853228533    The default system instructions (i.e. system message) prepended to model28534    calls. This field allows the client to guide the model on desired28535    responses. The model can be instructed on response content and format,28536    (e.g. "be extremely succinct", "act friendly", "here are examples of good28537    responses") and on audio behavior (e.g. "talk quickly", "inject emotion28538    into your voice", "laugh frequently"). The instructions are not guaranteed28539    to be followed by the model, but they provide guidance to the model on the28540    desired behavior.2854128542    Note that the server sets default instructions which will be used if this28543    field is not set and are visible in the `session.created` event at the28544    start of the session.2854528546  - `max_output_tokens: optional number or "inf"`2854728548    Maximum number of output tokens for a single assistant response,28549    inclusive of tool calls. Provide an integer between 1 and 4096 to28550    limit output tokens, or `inf` for the maximum available tokens for a28551    given model. Defaults to `inf`.2855228553    - `number`2855428555    - `"inf"`2855628557      - `"inf"`2855828559  - `model: optional string`2856028561    The Realtime model used for this session.2856228563  - `object: optional string`2856428565    The object type. Always `realtime.session`.2856628567  - `output_modalities: optional array of "text" or "audio"`2856828569    The set of modalities the model can respond with. To disable audio,28570    set this to ["text"].2857128572    - `"text"`2857328574    - `"audio"`2857528576  - `tool_choice: optional string`2857728578    How the model chooses tools. Options are `auto`, `none`, `required`, or28579    specify a function.2858028581  - `tools: optional array of RealtimeFunctionTool`2858228583    Tools (functions) available to the model.2858428585    - `description: optional string`2858628587      The description of the function, including guidance on when and how28588      to call it, and guidance about what to tell the user when calling28589      (if anything).2859028591    - `name: optional string`2859228593      The name of the function.2859428595    - `parameters: optional unknown`2859628597      Parameters of the function in JSON Schema.2859828599    - `type: optional "function"`2860028601      The type of the tool, i.e. `function`.2860228603      - `"function"`2860428605  - `tracing: optional "auto" or object { group_id, metadata, workflow_name }`2860628607    Configuration options for tracing. Set to null to disable tracing. Once28608    tracing is enabled for a session, the configuration cannot be modified.2860928610    `auto` will create a trace for the session with default values for the28611    workflow name, group id, and metadata.2861228613    - `"auto"`2861428615      Default tracing mode for the session.2861628617      - `"auto"`2861828619    - `TracingConfiguration object { group_id, metadata, workflow_name }`2862028621      Granular configuration for tracing.2862228623      - `group_id: optional string`2862428625        The group id to attach to this trace to enable filtering and28626        grouping in the traces dashboard.2862728628      - `metadata: optional unknown`2862928630        The arbitrary metadata to attach to this trace to enable28631        filtering in the traces dashboard.2863228633      - `workflow_name: optional string`2863428635        The name of the workflow to attach to this trace. This is used to28636        name the trace in the traces dashboard.2863728638  - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2863928640    Configuration for turn detection. Can be set to `null` to turn off. Server28641    VAD means that the model will detect the start and end of speech based on28642    audio volume and respond at the end of user speech.2864328644    - `prefix_padding_ms: optional number`2864528646      Amount of audio to include before the VAD detected speech (in28647      milliseconds). Defaults to 300ms.2864828649    - `silence_duration_ms: optional number`2865028651      Duration of silence to detect speech stop (in milliseconds). Defaults28652      to 500ms. With shorter values the model will respond more quickly,28653      but may jump in on short pauses from the user.2865428655    - `threshold: optional number`2865628657      Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A28658      higher threshold will require louder audio to activate the model, and28659      thus might perform better in noisy environments.2866028661    - `type: optional string`2866228663      Type of turn detection, only `server_vad` is currently supported.2866428665# Transcription Sessions2866628667## Create transcription session2866828669**post** `/realtime/transcription_sessions`2867028671Create an ephemeral API token for use in client-side applications with the28672Realtime API specifically for realtime transcriptions.28673Can be configured with the same session parameters as the `transcription_session.update` client event.2867428675It responds with a session object, plus a `client_secret` key which contains28676a usable ephemeral API token that can be used to authenticate browser clients28677for the Realtime API.2867828679Returns the created Realtime transcription session object, plus an ephemeral key.2868028681### Body Parameters2868228683- `include: optional array of "item.input_audio_transcription.logprobs"`2868428685  The set of items to include in the transcription. Current available items are:28686  `item.input_audio_transcription.logprobs`2868728688  - `"item.input_audio_transcription.logprobs"`2868928690- `input_audio_format: optional "pcm16" or "g711_ulaw" or "g711_alaw"`2869128692  The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.28693  For `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,28694  single channel (mono), and little-endian byte order.2869528696  - `"pcm16"`2869728698  - `"g711_ulaw"`2869928700  - `"g711_alaw"`2870128702- `input_audio_noise_reduction: optional object { type }`2870328704  Configuration for input audio noise reduction. This can be set to `null` to turn off.28705  Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.28706  Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.2870728708  - `type: optional NoiseReductionType`2870928710    Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2871128712    - `"near_field"`2871328714    - `"far_field"`2871528716- `input_audio_transcription: optional AudioTranscription`2871728718  Configuration for input audio transcription. The client can optionally set the language and prompt for transcription, these offer additional guidance to the transcription service.2871928720  - `delay: optional "minimal" or "low" or "medium" or 2 more`2872128722    Controls how long the model waits before emitting transcription text.28723    Higher values can improve transcription accuracy at the cost of latency.28724    Only supported with `gpt-realtime-whisper` in GA Realtime sessions.2872528726    - `"minimal"`2872728728    - `"low"`2872928730    - `"medium"`2873128732    - `"high"`2873328734    - `"xhigh"`2873528736  - `keywords: optional array of string`2873728738    Words or phrases to guide transcription of the input audio. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2873928740  - `language: optional string`2874128742    The language of the input audio. Supplying the input language in28743    [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format28744    will improve accuracy and latency.2874528746  - `languages: optional array of string`2874728748    Possible languages of the input audio, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. Supported by `gpt-transcribe` and `gpt-live-transcribe`.2874928750  - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2875128752    The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2875328754    - `string`2875528756    - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2875728758      The model to use for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.2875928760      - `"whisper-1"`2876128762      - `"gpt-transcribe"`2876328764      - `"gpt-live-transcribe"`2876528766      - `"gpt-4o-mini-transcribe"`2876728768      - `"gpt-4o-mini-transcribe-2025-12-15"`2876928770      - `"gpt-4o-transcribe"`2877128772      - `"gpt-4o-transcribe-diarize"`2877328774      - `"gpt-realtime-whisper"`2877528776  - `prompt: optional string`2877728778    An optional text to guide the model's style or continue a previous audio28779    segment.28780    For `whisper-1`, the [prompt is a list of keywords](/api/docs/guides/speech-to-text#prompting).28781    For `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example "expect words related to technology".28782    Prompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.2878328784- `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2878528786  Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.2878728788  - `prefix_padding_ms: optional number`2878928790    Amount of audio to include before the VAD detected speech (in28791    milliseconds). Defaults to 300ms.2879228793  - `silence_duration_ms: optional number`2879428795    Duration of silence to detect speech stop (in milliseconds). Defaults28796    to 500ms. With shorter values the model will respond more quickly,28797    but may jump in on short pauses from the user.2879828799  - `threshold: optional number`2880028801    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A28802    higher threshold will require louder audio to activate the model, and28803    thus might perform better in noisy environments.2880428805  - `type: optional "server_vad"`2880628807    Type of turn detection. Only `server_vad` is currently supported for transcription sessions.2880828809    - `"server_vad"`2881028811### Returns2881228813- `client_secret: object { expires_at, value }`2881428815  Ephemeral key returned by the API. Only present when the session is28816  created on the server via REST API.2881728818  - `expires_at: number`2881928820    Timestamp for when the token expires. Currently, all tokens expire28821    after one minute.2882228823  - `value: string`2882428825    Ephemeral key usable in client environments to authenticate connections28826    to the Realtime API. Use this in client-side environments rather than28827    a standard API token, which should only be used server-side.2882828829- `input_audio_format: optional string`2883028831  The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.2883228833- `input_audio_transcription: optional object { language, languages, model, prompt }`2883428835  Configuration of the transcription model.2883628837  - `language: optional string`2883828839    The language of the input audio.2884028841  - `languages: optional array of string`2884228843    The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2884428845  - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2884628847    The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2884828849    - `string`2885028851    - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2885228853      The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2885428855      - `"whisper-1"`2885628857      - `"gpt-transcribe"`2885828859      - `"gpt-live-transcribe"`2886028861      - `"gpt-4o-mini-transcribe"`2886228863      - `"gpt-4o-mini-transcribe-2025-12-15"`2886428865      - `"gpt-4o-transcribe"`2886628867      - `"gpt-4o-transcribe-diarize"`2886828869      - `"gpt-realtime-whisper"`2887028871  - `prompt: optional string`2887228873    The prompt configured for input audio transcription, when present.2887428875- `modalities: optional array of "text" or "audio"`2887628877  The set of modalities the model can respond with. To disable audio,28878  set this to ["text"].2887928880  - `"text"`2888128882  - `"audio"`2888328884- `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2888528886  Configuration for turn detection. Can be set to `null` to turn off. Server28887  VAD means that the model will detect the start and end of speech based on28888  audio volume and respond at the end of user speech.2888928890  - `prefix_padding_ms: optional number`2889128892    Amount of audio to include before the VAD detected speech (in28893    milliseconds). Defaults to 300ms.2889428895  - `silence_duration_ms: optional number`2889628897    Duration of silence to detect speech stop (in milliseconds). Defaults28898    to 500ms. With shorter values the model will respond more quickly,28899    but may jump in on short pauses from the user.2890028901  - `threshold: optional number`2890228903    Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A28904    higher threshold will require louder audio to activate the model, and28905    thus might perform better in noisy environments.2890628907  - `type: optional string`2890828909    Type of turn detection, only `server_vad` is currently supported.2891028911### Example2891228913```http28914curl https://api.openai.com/v1/realtime/transcription_sessions \28915    -H 'Content-Type: application/json' \28916    -H "Authorization: Bearer $OPENAI_API_KEY" \28917    -d '{}'28918```2891928920#### Response2892128922```json28923{28924  "client_secret": {28925    "expires_at": 0,28926    "value": "value"28927  },28928  "input_audio_format": "input_audio_format",28929  "input_audio_transcription": {28930    "language": "language",28931    "languages": [28932      "string"28933    ],28934    "model": "whisper-1",28935    "prompt": "prompt"28936  },28937  "modalities": [28938    "text"28939  ],28940  "turn_detection": {28941    "prefix_padding_ms": 0,28942    "silence_duration_ms": 0,28943    "threshold": 0,28944    "type": "type"28945  }28946}28947```2894828949### Example2895028951```http28952curl -X POST https://api.openai.com/v1/realtime/transcription_sessions \28953  -H "Authorization: Bearer $OPENAI_API_KEY" \28954  -H "Content-Type: application/json" \28955  -d '{}'28956```2895728958#### Response2895928960```json28961{28962  "id": "sess_BBwZc7cFV3XizEyKGDCGL",28963  "object": "realtime.transcription_session",28964  "modalities": ["audio", "text"],28965  "turn_detection": {28966    "type": "server_vad",28967    "threshold": 0.5,28968    "prefix_padding_ms": 300,28969    "silence_duration_ms": 20028970  },28971  "input_audio_format": "pcm16",28972  "input_audio_transcription": {28973    "model": "gpt-4o-transcribe",28974    "language": null,28975    "prompt": ""28976  },28977  "client_secret": null28978}28979```2898028981## Domain Types2898228983### Transcription Session Create Response2898428985- `TranscriptionSessionCreateResponse object { client_secret, input_audio_format, input_audio_transcription, 2 more }`2898628987  A new Realtime transcription session configuration.2898828989  When a session is created on the server via REST API, the session object28990  also contains an ephemeral key. Default TTL for keys is 10 minutes. This28991  property is not present when a session is updated via the WebSocket API.2899228993  - `client_secret: object { expires_at, value }`2899428995    Ephemeral key returned by the API. Only present when the session is28996    created on the server via REST API.2899728998    - `expires_at: number`2899929000      Timestamp for when the token expires. Currently, all tokens expire29001      after one minute.2900229003    - `value: string`2900429005      Ephemeral key usable in client environments to authenticate connections29006      to the Realtime API. Use this in client-side environments rather than29007      a standard API token, which should only be used server-side.2900829009  - `input_audio_format: optional string`2901029011    The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.2901229013  - `input_audio_transcription: optional object { language, languages, model, prompt }`2901429015    Configuration of the transcription model.2901629017    - `language: optional string`2901829019      The language of the input audio.2902029021    - `languages: optional array of string`2902229023      The possible input audio languages configured for transcription, in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.2902429025    - `model: optional string or "whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2902629027      The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2902829029      - `string`2903029031      - `"whisper-1" or "gpt-transcribe" or "gpt-live-transcribe" or 5 more`2903229033        The model used for transcription. Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.2903429035        - `"whisper-1"`2903629037        - `"gpt-transcribe"`2903829039        - `"gpt-live-transcribe"`2904029041        - `"gpt-4o-mini-transcribe"`2904229043        - `"gpt-4o-mini-transcribe-2025-12-15"`2904429045        - `"gpt-4o-transcribe"`2904629047        - `"gpt-4o-transcribe-diarize"`2904829049        - `"gpt-realtime-whisper"`2905029051    - `prompt: optional string`2905229053      The prompt configured for input audio transcription, when present.2905429055  - `modalities: optional array of "text" or "audio"`2905629057    The set of modalities the model can respond with. To disable audio,29058    set this to ["text"].2905929060    - `"text"`2906129062    - `"audio"`2906329064  - `turn_detection: optional object { prefix_padding_ms, silence_duration_ms, threshold, type }`2906529066    Configuration for turn detection. Can be set to `null` to turn off. Server29067    VAD means that the model will detect the start and end of speech based on29068    audio volume and respond at the end of user speech.2906929070    - `prefix_padding_ms: optional number`2907129072      Amount of audio to include before the VAD detected speech (in29073      milliseconds). Defaults to 300ms.2907429075    - `silence_duration_ms: optional number`2907629077      Duration of silence to detect speech stop (in milliseconds). Defaults29078      to 500ms. With shorter values the model will respond more quickly,29079      but may jump in on short pauses from the user.2908029081    - `threshold: optional number`2908229083      Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A29084      higher threshold will require louder audio to activate the model, and29085      thus might perform better in noisy environments.2908629087    - `type: optional string`2908829089      Type of turn detection, only `server_vad` is currently supported.2909029091# Translations2909229093# Client Secrets2909429095## Create translation client secret2909629097**post** `/realtime/translations/client_secrets`2909829099Create a Realtime translation client secret with an associated translation session configuration.2910029101Client secrets are short-lived tokens that can be passed to a client app,29102such as a web frontend or mobile client, which grants access to the Realtime29103Translation API without leaking your main API key. You can configure a custom29104TTL for each client secret.2910529106Returns the created client secret and the effective translation session object.29107The client secret is a string that looks like `ek_1234`.2910829109### Body Parameters2911029111- `session: RealtimeTranslationSessionCreateRequest`2911229113  Realtime translation session configuration. Translation sessions stream source29114  audio in and translated audio plus transcript deltas out continuously.2911529116  - `model: string`2911729118    The Realtime translation model used for this session.2911929120  - `audio: optional object { input, output }`2912129122    Configuration for translation input and output audio.2912329124    - `input: optional object { noise_reduction, transcription }`2912529126      - `noise_reduction: optional object { type }  or null`2912729128        Optional input noise reduction. Set to `null` to disable it.2912929130        - `type: NoiseReductionType`2913129132          Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2913329134          - `"near_field"`2913529136          - `"far_field"`2913729138      - `transcription: optional object { model }  or null`2913929140        Optional source-language transcription. When configured, the server emits29141        `session.input_transcript.delta` events. Translation itself still runs from29142        the input audio stream.2914329144        - `model: string`2914529146          The transcription model to use for source transcript deltas.2914729148    - `output: optional object { language }`2914929150      - `language: optional string`2915129152        Target language for translated output audio and transcript deltas.2915329154- `expires_after: optional object { anchor, seconds }`2915529156  Configuration for the client secret expiration. Expiration refers to the time after which29157  a client secret will no longer be valid for creating sessions. The session itself may29158  continue after that time once started. A secret can be used to create multiple sessions29159  until it expires.2916029161  - `anchor: optional "created_at"`2916229163    The anchor point for the client secret expiration, meaning that `seconds` will be added to the `created_at` time of the client secret to produce an expiration timestamp. Only `created_at` is currently supported.2916429165    - `"created_at"`2916629167  - `seconds: optional number`2916829169    The number of seconds from the anchor point to the expiration. Select a value between `10` and `7200` (2 hours). This default to 600 seconds (10 minutes) if not specified.2917029171### Returns2917229173- `RealtimeTranslationClientSecretCreateResponse object { expires_at, session, value }`2917429175  Response from creating a translation session and client secret for the Realtime API.2917629177  - `expires_at: number`2917829179    Expiration timestamp for the client secret, in seconds since epoch.2918029181  - `session: RealtimeTranslationSession`2918229183    A Realtime translation session. Translation sessions continuously translate input29184    audio into the configured output language.2918529186    - `id: string`2918729188      Unique identifier for the session that looks like `sess_1234567890abcdef`.2918929190    - `audio: object { input, output }`2919129192      Configuration for translation input and output audio.2919329194      - `input: optional object { noise_reduction, transcription }`2919529196        - `noise_reduction: optional object { type }  or null`2919729198          Optional input noise reduction.2919929200          - `type: NoiseReductionType`2920129202            Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.2920329204            - `"near_field"`2920529206            - `"far_field"`2920729208        - `transcription: optional object { model }  or null`2920929210          Optional source-language transcription. When configured, the server emits29211          `session.input_transcript.delta` events. Translation itself still runs from29212          the input audio stream.2921329214          - `model: string`2921529216            The transcription model used for source transcript deltas.2921729218      - `output: optional object { language }`2921929220        - `language: optional string`2922129222          Target language for translated output audio and transcript deltas.2922329224    - `expires_at: number`2922529226      Expiration timestamp for the session, in seconds since epoch.2922729228    - `model: string`2922929230      The Realtime translation model used for this session. This field is set at29231      session creation and cannot be changed with `session.update`.2923229233    - `type: "translation"`2923429235      The session type. Always `translation` for Realtime translation sessions.2923629237      - `"translation"`2923829239  - `value: string`2924029241    The generated client secret value.2924229243### Example2924429245```http29246curl https://api.openai.com/v1/realtime/translations/client_secrets \29247    -H 'Content-Type: application/json' \29248    -H "Authorization: Bearer $OPENAI_API_KEY" \29249    -d '{29250          "session": {29251            "model": "model"29252          }29253        }'29254```2925529256#### Response2925729258```json29259{29260  "expires_at": 0,29261  "session": {29262    "id": "id",29263    "audio": {29264      "input": {29265        "noise_reduction": {29266          "type": "near_field"29267        },29268        "transcription": {29269          "model": "model"29270        }29271      },29272      "output": {29273        "language": "language"29274      }29275    },29276    "expires_at": 0,29277    "model": "model",29278    "type": "translation"29279  },29280  "value": "value"29281}29282```2928329284### Example2928529286```http29287curl -X POST https://api.openai.com/v1/realtime/translations/client_secrets \29288  -H "Authorization: Bearer $OPENAI_API_KEY" \29289  -H "Content-Type: application/json" \29290  -d '{29291    "expires_after": {29292      "anchor": "created_at",29293      "seconds": 60029294    },29295    "session": {29296      "model": "gpt-realtime-translate",29297      "audio": {29298        "input": {29299          "transcription": {29300            "model": "gpt-realtime-whisper"29301          },29302          "noise_reduction": null29303        },29304        "output": {29305          "language": "es"29306        }29307      }29308    }29309  }'29310```2931129312#### Response2931329314```json29315{29316  "value": "ek_68af296e8e408191a1120ab6383263c2",29317  "expires_at": 1756310470,29318  "session": {29319    "id": "sess_C9CiUVUzUzYIssh3ELY1d",29320    "type": "translation",29321    "expires_at": 1756310470,29322    "model": "gpt-realtime-translate",29323    "audio": {29324      "input": {29325        "transcription": {29326          "model": "gpt-realtime-whisper"29327        },29328        "noise_reduction": null29329      },29330      "output": {29331        "language": "es"29332      }29333    }29334  }29335}29336```29337
Files main
Menu

Theme