View Source ExOpenAI.Components.RealtimeCallCreateRequest (ex_openai.ex v2.0.0-beta2)
Parameters required to initiate a realtime call and receive the SDP answer needed to complete a WebRTC peer connection. Provide an SDP offer generated by your client and optionally configure the session that will answer the call.
Fields
:sdp- required -String.t()
WebRTC Session Description Protocol (SDP) offer generated by the caller.:session- optional -{:%{}, [], [{{:optional, [], [:audio]}, {:%{}, [], [{{:optional, [], [:input]}, {:%{}, [], [{{:optional, [], [:format]}, {{:., [], [ExOpenAI.Components.RealtimeAudioFormats, :t]}, [], []}}, {{:optional, [], [:noise_reduction]}, {:%{}, [], [{{:optional, [], [:type]}, {{:., [], [ExOpenAI.Components.NoiseReductionType, :t]}, [], []}}]}}, {{:optional, [], [:transcription]}, {{:., [], [ExOpenAI.Components.AudioTranscription, :t]}, [], []}}, {{:optional, [], [:turn_detection]}, {{:., [], [ExOpenAI.Components.RealtimeTurnDetection, :t]}, [], []}}]}}, {{:optional, [], [:output]}, {:%{}, [], [{{:optional, [], [:format]}, {{:., [], [ExOpenAI.Components.RealtimeAudioFormats, :t]}, [], []}}, {{:optional, [], [:speed]}, {:number, [], []}}, {{:optional, [], [:voice]}, {{:., [], [ExOpenAI.Components.VoiceIdsOrCustomVoice, :t]}, [], []}}]}}]}}, {{:optional, [], [:include]}, {:list, [], [:"item.input_audio_transcription.logprobs"]}}, {{:optional, [], [:instructions]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:max_output_tokens]}, {:|, [], [{:integer, [], []}, :inf]}}, {{:optional, [], [:model]}, {:|, [], [{{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}, {:|, [], [{:|, [], [{:|, [], [{:|, [], [{:|, [], [{:|, [], [{:|, [], [{:|, [], [{:|, [], [...]}, :"gpt-4o-mini-realtime-preview-2024-12-17"]}, :"gpt-realtime-mini"]}, :"gpt-realtime-mini-2025-10-06"]}, :"gpt-realtime-mini-2025-12-15"]}, :"gpt-audio-1.5"]}, :"gpt-audio-mini"]}, :"gpt-audio-mini-2025-10-06"]}, :"gpt-audio-mini-2025-12-15"]}]}}, {{:optional, [], [:output_modalities]}, {:list, [], [{:|, [], [:text, :audio]}]}}, {{:optional, [], [:prompt]}, {{:., [], [ExOpenAI.Components.Prompt, :t]}, [], []}}, {{:optional, [], [:tool_choice]}, {:|, [], [{:|, [], [{{:., [], [ExOpenAI.Components.ToolChoiceOptions, :t]}, [], []}, {{:., [], [ExOpenAI.Components.ToolChoiceFunction, :t]}, [], []}]}, {{:., [], [ExOpenAI.Components.ToolChoiceMCP, :t]}, [], []}]}}, {{:optional, [], [:tools]}, {:list, [], [{:|, [], [{{:., [], [ExOpenAI.Components.RealtimeFunctionTool, :t]}, [], []}, {{:., [], [ExOpenAI.Components.MCPTool, :t]}, [], []}]}]}}, {{:optional, [], [:tracing]}, {:|, [], [{:|, [], [:auto, {:%{}, [], [{{:optional, [], [:group_id]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}, {{:optional, [], [:metadata]}, {:map, [], []}}, {{:optional, [], [:workflow_name]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}]}, nil]}}, {{:optional, [], [:truncation]}, {{:., [], [ExOpenAI.Components.RealtimeTruncation, :t]}, [], []}}, {{:required, [], [:type]}, :realtime}]}
Optional session configuration to apply before the realtime session is created. Use the same parameters you would send in acreate client secretrequest.
Summary
Types
@type t() :: %ExOpenAI.Components.RealtimeCallCreateRequest{ sdp: String.t(), session: %{ optional(:audio) => %{ optional(:input) => %{ optional(:format) => ExOpenAI.Components.RealtimeAudioFormats.t(), optional(:noise_reduction) => %{ optional(:type) => ExOpenAI.Components.NoiseReductionType.t() }, optional(:transcription) => ExOpenAI.Components.AudioTranscription.t(), optional(:turn_detection) => ExOpenAI.Components.RealtimeTurnDetection.t() }, optional(:output) => %{ optional(:format) => ExOpenAI.Components.RealtimeAudioFormats.t(), optional(:speed) => number(), optional(:voice) => ExOpenAI.Components.VoiceIdsOrCustomVoice.t() } }, optional(:include) => [:"item.input_audio_transcription.logprobs"], optional(:instructions) => String.t(), optional(:max_output_tokens) => integer() | :inf, optional(:model) => String.t() | ((((((((((((((:"gpt-realtime" | :"gpt-realtime-1.5") | :"gpt-realtime-2025-08-28") | :"gpt-4o-realtime-preview") | :"gpt-4o-realtime-preview-2024-10-01") | :"gpt-4o-realtime-preview-2024-12-17") | :"gpt-4o-realtime-preview-2025-06-03") | :"gpt-4o-mini-realtime-preview") | :"gpt-4o-mini-realtime-preview-2024-12-17") | :"gpt-realtime-mini") | :"gpt-realtime-mini-2025-10-06") | :"gpt-realtime-mini-2025-12-15") | :"gpt-audio-1.5") | :"gpt-audio-mini") | :"gpt-audio-mini-2025-10-06") | :"gpt-audio-mini-2025-12-15", optional(:output_modalities) => [:text | :audio], optional(:prompt) => ExOpenAI.Components.Prompt.t(), optional(:tool_choice) => (ExOpenAI.Components.ToolChoiceOptions.t() | ExOpenAI.Components.ToolChoiceFunction.t()) | ExOpenAI.Components.ToolChoiceMCP.t(), optional(:tools) => [ ExOpenAI.Components.RealtimeFunctionTool.t() | ExOpenAI.Components.MCPTool.t() ], optional(:tracing) => (:auto | %{ optional(:group_id) => String.t(), optional(:metadata) => map(), optional(:workflow_name) => String.t() }) | nil, optional(:truncation) => ExOpenAI.Components.RealtimeTruncation.t(), type: :realtime } | nil }