/v1/schemas/openai/chat/realtime/sessions
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source tracedb4af1c8a982d4043347843cffd0a0fa125e731baf03583a39823de2ccf5b10b{
"fetchedAt": 1793077806,
"extractorVersion": "1",
"verifiedAt": null
} |
Request body
16 properties · 1 required · 11 $defs| property | type | description | constraints |
|---|---|---|---|
| client_secret* | object | Ephemeral key returned by the API. | |
| modalities | enum[] | The set of modalities the model can respond with. To disable audio, set this to ["text"]. | |
| instructions | string | 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", "he… | |
| voice | string | enum | object | The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. You may also provide a custom voice object with an `id`, for example `{ "id": "voice_1234" }`. Voice… | |
| input_audio_format | string | The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. | |
| output_audio_format | string | The format of output audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`. | |
| input_audio_transcription | object | 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 and should be treated as… | |
| speed | number | The speed of the model's spoken response. 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. | 0.25 ≤ n ≤ 1.5 · default: 1 |
| tracing | enum | Tracing Configuration | Configuration options for tracing. Set to null to disable tracing. Once tracing is enabled for a session, the configuration cannot be modified. | |
| turn_detection | object | 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. | |
| tools | object[] | Tools (functions) available to the model. | |
| tool_choice | string | How the model chooses tools. Options are `auto`, `none`, `required`, or specify a function. | |
| temperature | number | Sampling temperature for the model, limited to [0.6, 1.2]. Defaults to 0.8. | |
| max_response_output_tokens | integer | enum | Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or `inf` for the maximum available tokens for a given model. Defaults to `inf`. | |
| truncation | enum | Retention ratio truncation | 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… | |
| prompt | object | Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code). | nullable |
Types
11 $defsFileInputDetailenum
auto | low | high
ImageDetailenum
low | high | auto | original
InputFileContentobject
A file input to the model.
| type* | enum | The type of the input item. Always `input_file`. | input_file · default: "input_file" |
| file_id | string | The ID of the file to be sent to the model. | nullable |
| filename | string | The name of the file to be sent to the model. | |
| file_data | string | The content of the file to be sent to the model. | |
| prompt_cache_breakpoint | PromptCacheBreakpointConfig | Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. | |
| file_url | string | The URL of the file to be sent to the model. | format: uri |
| detail | enum | 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… | auto | low | high |
InputImageContentobject
An image input to the model. Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
| type* | enum | The type of the input item. Always `input_image`. | input_image · default: "input_image" |
| image_url | string | The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. | format: uri · nullable |
| file_id | string | The ID of the file to be sent to the model. | nullable |
| detail* | enum | The detail level of the image to be sent to the model. One of `high`, `low`, `auto`, or `original`. Defaults to `auto`. | low | high | auto | original |
| prompt_cache_breakpoint | PromptCacheBreakpointConfig | Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. |
InputTextContentobject
A text input to the model.
| type* | enum | The type of the input item. Always `input_text`. | input_text · default: "input_text" |
| text* | string | The text input to the model. | |
| prompt_cache_breakpoint | PromptCacheBreakpointConfig | Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block. |
Promptobject
Reference to a prompt template and its variables. [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
| id* | string | The unique identifier of the prompt template to use. | |
| version | string | Optional version of the prompt template. | nullable |
| variables | object | Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. | nullable |
PromptCacheBreakpointConfigobject
Marks the exact end of a reusable prompt prefix. When `ttl` is omitted, the breakpoint inherits the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block.
| mode* | enum | The breakpoint mode. Always `explicit`. | explicit · default: "explicit" |
| ttl | enum | The minimum lifetime of this cache breakpoint. Defaults to the request TTL. | 30m | 12h |
RealtimeTruncationenum | Retention ratio truncation
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…
ResponsePromptVariablesobject
Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files.
nullable
VoiceIdsOrCustomVoicestring | enum | object
A built-in voice name or a custom voice reference.
Validate a payload
before you spend tokens$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"openai","endpointId":"realtime/sessions","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}