Skip to main content
This guide opens a Realtime session, sends one text message, and receives a spoken reply. Use the OpenAI SDK you already have, or a raw WebSocket.
1

Create an API key

Go to Settings → Developer → API Keys in app.60db.ai and create a key. Keep it on your server. The examples read it from SIXTYDB_API_KEY.
Never ship sk_ keys to a browser. For web pages, use browser ephemeral keys.
2

Open a session and send a text turn

Replace YOUR_VOICE_ID with a voice ID from List voices.
3

Send a voice turn

For voice, stream PCM16 audio into input_audio_buffer.append. With the default server_vad turn detection, the server commits the utterance after silence and starts the reply on its own.
Listen for these server events:See Audio and turn detection for formats and manual turn control.
4

Check the result

The final response.done event carries usage. Each session is billed at $0.02 per connected minute plus LLM tokens. See Realtime overview.

Troubleshooting

Next steps