Overview
Create realtime sessions for audio and video streaming with OpenAI’s Realtime API.Python Usage
Create Session
Session Configuration
Async Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
model | str | ”gpt-4o-realtime-preview” | Realtime model |
modalities | List[str] | [“text”, “audio”] | Supported modalities |
instructions | str | None | System instructions |
voice | str | ”alloy” | Voice for audio output |
api_key | str | None | API key override |
Available Voices
alloy- Neutralecho- Malefable- Britishonyx- Deep malenova- Femaleshimmer- Soft female
Result Object
TheRealtimeSession object contains:
id: Session IDstatus: Session statusmodel: Model being usedurl: WebSocket URL to connect tometadata: Session configuration

