RealtimeSessionConfig

@Serializable
data class RealtimeSessionConfig(val type: String = "realtime", val model: ModelId? = null, val instructions: String? = null, val audio: RealtimeAudioConfig? = null, val outputModalities: List<String>? = null, val maxOutputTokens: JsonElement? = null, val tools: List<JsonObject>? = null, val toolChoice: JsonElement? = null, val parallelToolCalls: Boolean? = null, val include: List<String>? = null, val reasoning: JsonObject? = null, val tracing: JsonElement? = null, val prompt: JsonObject? = null, val truncation: JsonElement? = null)

GA Realtime or transcription session configuration. Model-dependent controls remain optional.

Constructors

Link copied to clipboard
constructor(type: String = "realtime", model: ModelId? = null, instructions: String? = null, audio: RealtimeAudioConfig? = null, outputModalities: List<String>? = null, maxOutputTokens: JsonElement? = null, tools: List<JsonObject>? = null, toolChoice: JsonElement? = null, parallelToolCalls: Boolean? = null, include: List<String>? = null, reasoning: JsonObject? = null, tracing: JsonElement? = null, prompt: JsonObject? = null, truncation: JsonElement? = null)

Properties

Link copied to clipboard

Input and output audio configuration.

Link copied to clipboard
val include: List<String>? = null

Additional response fields to include.

Link copied to clipboard
val instructions: String? = null

System instructions.

Link copied to clipboard
@SerialName(value = "max_output_tokens")
val maxOutputTokens: JsonElement? = null

Maximum response tokens, or the JSON string inf.

Link copied to clipboard
val model: ModelId? = null

Model used for a conversation session.

Link copied to clipboard
@SerialName(value = "output_modalities")
val outputModalities: List<String>? = null

Output modalities, typically audio or text.

Link copied to clipboard
@SerialName(value = "parallel_tool_calls")
val parallelToolCalls: Boolean? = null

Whether parallel tool calls are allowed.

Link copied to clipboard
val prompt: JsonObject? = null

Reusable prompt configuration, where still supported.

Link copied to clipboard
val reasoning: JsonObject? = null

Reasoning controls for supporting models.

Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: JsonElement? = null

Tool selection mode or named-tool object.

Link copied to clipboard
val tools: List<JsonObject>? = null

Functions/MCP tools. Raw tool objects retain model-specific variants.

Link copied to clipboard
val tracing: JsonElement? = null

Trace configuration or the string auto.

Link copied to clipboard
val truncation: JsonElement? = null

Context truncation controls.

Link copied to clipboard
@EncodeDefault
val type: String

realtime or transcription.