Skip to content
KugelAudioDocs

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.

On this page

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 or Not available works as OpenAI documents it, so for any question, start with OpenAI's Live documentation.

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

TopicOpenAI guideOn KugelAudio
Connect and authenticate, session.start, session.closeWebSocketsThe same events.
Audio formatsWebSocketsPCM16 at 16 or 24 kHz, and G.711 at 8 kHz.
Audio and transcript eventsManaging sessionsThe same events. Transcript times are estimates, not word-aligned timestamps.
Mute and unmuteManaging sessionsThe same events.
Earlier conversation in inputManaging sessionsThe same field, with the limits listed here.
session.closed reasonsManaging sessionsThe same reasons.
Client delegationDelegation and toolsThe same events. See Answer from your backend.
Commentary, thinking and instructionsDelegation and toolsThe same events. expects_reply is an addition.
Responses delegation with function toolsDelegation and toolsThe same events. See Let KugelAudio run the back office.

What differs

TopicOn KugelAudio
Voicesaudio.output.voice takes a numeric KugelAudio voice id. An OpenAI voice name selects the default voice and sends an info event.
Choosing the modelOnly fluid-1 and gpt-live-1. Any other id fails with unsupported_model.
Changing a sessionsession.update accepts only {} or {"delegation": {"type": "client"}}. Model, instructions, audio and input are fixed at the start.
Tools in client delegationThere 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 delegationNot available. Only function tools work.
responses.modelOptional, and limited to the models on the back office page.
Audio pacingThe 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 on kugel.response.cancelled.
ExtrasSend session.kugel to receive the 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