> ## Documentation Index
> Fetch the complete documentation index at: https://docs.budecosystem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Realtime Session

> Create a WebSocket-based realtime session.

<RequestExample>
  ```bash cURL theme={null}
  curl https://gateway.bud.studio/v1/realtime/sessions \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "gpt-4-realtime",
      "modalities": ["text", "audio"]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "session_abc123",
    "object": "realtime.session",
    "created_at": 1699000000,
    "model": "gpt-4-realtime",
    "modalities": ["text", "audio"],
    "ws_url": "wss://gateway.bud.studio/v1/realtime/sessions/session_abc123",
    "expires_at": 1699003600
  }
  ```
</ResponseExample>

## Headers

| Parameter     | Type   | Required | Description                  |
| ------------- | ------ | -------- | ---------------------------- |
| Authorization | string | Yes      | Bearer authentication header |

## Body

| Parameter    | Type   | Required | Description                                                      |
| ------------ | ------ | -------- | ---------------------------------------------------------------- |
| model        | string | Yes      | Realtime model identifier                                        |
| modalities   | array  | No       | Supported modalities: text, audio. Default: \["text"]            |
| voice        | string | No       | Voice for audio output (alloy, echo, fable, onyx, nova, shimmer) |
| instructions | string | No       | System instructions for the session                              |
| temperature  | float  | No       | Sampling temperature (0.0 to 2.0). Default: 1.0                  |

## Supported Providers

<CardGroup cols={2}>
  <Card title="OpenAI" icon="openai">
    Real-time audio streaming with GPT-4o
  </Card>

  <Card title="Azure OpenAI" icon="microsoft">
    Enterprise real-time API with low latency
  </Card>
</CardGroup>
