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

# Migrate from the OpenAI SDK

> Point an existing OpenAI Realtime app at 60db by changing the URL, model and key

If your app already uses the OpenAI Realtime API, you change three values and keep the rest of your code. 60db accepts the OpenAI GA protocol, so the same events, session fields and client libraries work.

## What changes

| Setting | OpenAI | 60db |
| - | - | - |
| Base URL | `https://api.openai.com/v1` or `wss://api.openai.com/v1/realtime` | `https://api.60db.ai/v1` or `wss://api.60db.ai/v1/realtime` |
| Model | `gpt-realtime` | `60db-realtime-v1-mini` (`gpt-realtime` also maps to it) |
| Key | `OPENAI_API_KEY` (`sk-...`) | 60db API key (`sk_...`) |
| Voice | OpenAI voices (`alloy`, `marin`, ...) | 60db voice IDs. OpenAI voice names map to 60db stock voices |

> [!NOTE]
>
> Only the three values above change. Event names, session shape, tool definitions and `response.done` usage follow the OpenAI GA spec.

## Migrate

**1. Replace the key and base URL**

```bash theme={null}
export SIXTYDB_API_KEY=sk_your_api_key
```

Use `SIXTYDB_API_KEY` in place of `OPENAI_API_KEY`, and set the base URL below in your client.

**2. Change the model and voice**

Set the model to `60db-realtime-v1-mini`. Set `audio.output.voice` to a 60db voice ID. Use [List voices](https://docs.60db.ai/api-reference/voices/get-voices.md) to find one.

**3. Test a session**

Run one text turn and one audio turn. Check that `response.done` returns usage and that audio plays.

## Client examples

**@openai/agents-realtime**

```javascript theme={null}
import {
  RealtimeAgent,
  RealtimeSession,
  OpenAIRealtimeWebSocket,
} from '@openai/agents-realtime';

const agent = new RealtimeAgent({
  name: 'Assistant',
  instructions: 'You are a friendly voice assistant.',
});

const transport = new OpenAIRealtimeWebSocket({
  url: 'wss://api.60db.ai/v1/realtime',
});

const session = new RealtimeSession(agent, {
  transport,
  model: '60db-realtime-v1-mini',
  config: {
    outputModalities: ['audio'],
    audio: { output: { voice: 'YOUR_VOICE_ID' } },
  },
});

// Server-side: use an sk_ key. In the browser, use an ek_ key (see below).
await session.connect({ apiKey: process.env.SIXTYDB_API_KEY });
```

**openai (Node)**

```javascript theme={null}
import OpenAI from 'openai';
import { OpenAIRealtimeWS } from 'openai/realtime/ws';

const client = new OpenAI({
  apiKey: process.env.SIXTYDB_API_KEY,
  baseURL: 'https://api.60db.ai/v1',
});

const rt = await OpenAIRealtimeWS.create(client, { model: '60db-realtime-v1-mini' });
rt.send({
  type: 'session.update',
  session: {
    type: 'realtime',
    audio: { output: { voice: 'YOUR_VOICE_ID' } },
  },
});
```

**openai (Python)**

```python theme={null}
import os
from openai import AsyncOpenAI

client = AsyncOpenAI(
    api_key=os.environ["SIXTYDB_API_KEY"],
    base_url="https://api.60db.ai/v1",
)

async with client.realtime.connect(model="60db-realtime-v1-mini") as conn:
    await conn.session.update(session={
        "type": "realtime",
        "audio": {"output": {"voice": "YOUR_VOICE_ID"}},
    })
```

## Not supported yet

Code that depends on these features needs a change or must wait:

* WebRTC transport
* SIP calling (`call_id`)
* Out-of-band responses (`conversation: "none"`)
* Image input
* MCP tools inside a session

See the full list on the [Realtime overview](https://docs.60db.ai/realtime/overview.md#supported-and-not-yet-supported).

## 60db extensions

The `memory`, `knowledge` and `intent` session fields are 60db extensions. OpenAI ignores them, so they are safe to send to either service. Add them when you want Smart Memory, Collections or filler speech. See [60db extensions](https://docs.60db.ai/realtime/60db-extensions.md).

## Related

* [Browser ephemeral keys](https://docs.60db.ai/realtime/browser-ephemeral-keys.md) for web apps
* [Function tools](https://docs.60db.ai/realtime/function-tools.md) work unchanged
* [Quickstart](https://docs.60db.ai/realtime/quickstart.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.