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

# Coming from OpenAI Live

> Move a client built on the OpenAI Live API to KugelAudio by changing its key, base URL and model, and see what differs.

The endpoint follows the primary WebSocket and delegation parts of the OpenAI Live API. It is not
all of OpenAI's API, and it is not the older OpenAI Realtime API.

Everything this page does not list under [What differs](#what-differs) or
[Not available](#not-available) works as OpenAI documents it, so for any question, start with
[OpenAI's Live documentation](https://developers.openai.com/api/docs/guides/live).

## Move a client

Three values change. The events and the SDK calls stay the same.

```python
import os

from openai import AsyncOpenAI

client = AsyncOpenAI(
    api_key=os.environ["KUGELAUDIO_API_KEY"],  # was your OpenAI key
    base_url="https://api.kugelaudio.com/v1",  # was OpenAI's default
)

async with client.live.connect() as connection:
    await connection.session.start(
        session={
            "model": "fluid-1",  # was gpt-live-1
            "instructions": "You answer the phone for a parcel service. Keep replies short.",
            "delegation": {"type": "client"},
        }
    )
```

`gpt-live-1` also works and selects the same model. Behaviour, voices and refusals are
KugelAudio's, not those of an OpenAI model. The official OpenAI Python SDK is the tested client.
Other clients are untested, so check the calls you depend on.

## What carries over

| Topic | OpenAI guide | On KugelAudio |
|---|---|---|
| Connect and authenticate, `session.start`, `session.close` | [WebSockets](https://developers.openai.com/api/docs/guides/voice-websockets?api=live) | The same events. |
| Audio formats | [WebSockets](https://developers.openai.com/api/docs/guides/voice-websockets?api=live) | PCM16 at 16 or 24 kHz, and G.711 at 8 kHz. |
| Audio and transcript events | [Managing sessions](https://developers.openai.com/api/docs/guides/live-conversations) | The same events. Transcript times are estimates, not word-aligned timestamps. |
| Mute and unmute | [Managing sessions](https://developers.openai.com/api/docs/guides/live-conversations) | The same events. |
| Earlier conversation in `input` | [Managing sessions](https://developers.openai.com/api/docs/guides/live-conversations) | The same field, with the [limits](/speech-to-speech/limits#limits) listed here. |
| `session.closed` reasons | [Managing sessions](https://developers.openai.com/api/docs/guides/live-conversations) | The same reasons. |
| Client delegation | [Delegation and tools](https://developers.openai.com/api/docs/guides/live-delegation) | The same events. See [Answer from your backend](/speech-to-speech/your-backend). |
| Commentary, thinking and instructions | [Delegation and tools](https://developers.openai.com/api/docs/guides/live-delegation) | The same events. `expects_reply` is an addition. |
| Responses delegation with function tools | [Delegation and tools](https://developers.openai.com/api/docs/guides/live-delegation) | The same events. See [Let KugelAudio run the back office](/speech-to-speech/back-office). |

## What differs

| Topic | On KugelAudio |
|---|---|
| Voices | `audio.output.voice` takes a numeric KugelAudio [voice](/features/voices) id. An OpenAI voice name selects the default voice and sends an `info` event. |
| Choosing the model | Only `fluid-1` and `gpt-live-1`. Any other id fails with `unsupported_model`. |
| Changing a session | `session.update` accepts only `{}` or `{"delegation": {"type": "client"}}`. Model, instructions, audio and input are fixed at the start. |
| Tools in client delegation | There is no tool registration. Tool schemas, permissions and retries stay in your backend. `session.kugel.tools` tells the agent what to delegate. |
| Hosted tools and MCP in Responses delegation | Not available. Only function tools work. |
| `responses.model` | Optional, and limited to the models on the [back office page](/speech-to-speech/back-office#choose-the-model). |
| Audio pacing | The service sends `session.output_audio.delta` at the pace of speech, silence between replies included, and needs no playback acknowledgement. An interrupted reply stops in the stream. With `session.kugel` the audio arrives ahead of playback instead, and you [drop your queue](/speech-to-speech/during-a-call#stop-playback-when-the-caller-interrupts) on `kugel.response.cancelled`. |
| Extras | Send `session.kugel` to receive the [`kugel.*` events](/speech-to-speech/api-reference#kugel-events). |

## Not available

Stored sessions, forks, recording downloads, typed and image input, WebRTC, SIP and sideband
connections. Asking for them fails with an error.

## Next steps

<CardGroup cols={2}>
  <Card title="Talk to the agent" icon="microphone" href="/speech-to-speech/quickstart">
    Talk to it from your microphone in a few minutes
  </Card>
  <Card title="Read the API reference" icon="code" href="/speech-to-speech/api-reference">
    Look up every event, field, error and close code
  </Card>
</CardGroup>
