RealtimeCallCreateRequest class
Request for creating a WebRTC call.
This endpoint initiates a WebRTC call with the Realtime API using an SDP (Session Description Protocol) offer.
Example
final sdpAnswer = await client.realtimeSessions.calls.create(
RealtimeCallCreateRequest(
sdp: sdpOffer,
session: RealtimeSessionCreateRequest(
model: 'gpt-realtime-1.5',
voice: RealtimeVoice.alloy,
),
),
);
// Use sdpAnswer to complete WebRTC handshake
- Annotations
-
- @immutable
Constructors
- RealtimeCallCreateRequest({required String sdp, RealtimeSessionCreateRequest? session})
-
Creates a RealtimeCallCreateRequest.
const
-
RealtimeCallCreateRequest.fromJson(Map<
String, dynamic> json) -
Creates a RealtimeCallCreateRequest from JSON.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sdp → String
-
The SDP offer string.
final
- session → RealtimeSessionCreateRequest?
-
Optional session configuration.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts to JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override