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

# Realtime Connection

> <ul><li>Establish a WebSocket connection for realtime conversations.</li><li>**Note**: This is a WebSocket endpoint and must be connected to with the WebSocket protocol.</li><li>Connection URL example: `wss://api.elkapi.com/v1/realtime?model=gpt-5.5`</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request GET \
    --url 'https://api.elkapi.com/v1/realtime?model=gpt-5.5' \
    --header 'Authorization: Bearer <token>'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://api.elkapi.com/v1/realtime?model=gpt-5.5"
  headers = {
      "Authorization": "Bearer <token>"
  }

  response = requests.request("GET", url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const url = "https://api.elkapi.com/v1/realtime?model=gpt-5.5";

  const headers = {
    "Authorization": "Bearer <token>"
  };

  const response = await fetch(url, { method: "GET", headers });
  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 400 theme={null} theme={null}
  {
    "error": {
      "message": "message",
      "type": "type",
      "param": "param",
      "code": "code"
    }
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  All endpoints require Bearer Token authentication.

  Add it to the request headers:

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Query Parameters

<ParamField query="model" type="string" default="gpt-5.5">
  Model to use

  Example: `gpt-5.5`
</ParamField>
