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

# OpenAI migration

> Migrate from the OpenAI Realtime API to Inworld's Realtime API.

If you're already using the [OpenAI Realtime API](https://developers.openai.com/api/docs/guides/realtime), you can switch to Inworld with minimal code changes. The event schema, session structure, and client/server events are compatible.

## What stays the same

* Event types: `session.update`, `conversation.item.create`, `response.create`, streaming deltas, etc.
* Session config: `instructions`, `audio.input`, `audio.output`, `tools`, etc.
* Client and server event shapes
* Stream audio in and receive streaming audio out with interruption-handling enabled out-of-the-box

## What changes

### Router

With the Inworld Realtime API you can leverage your [routers](/router/introduction) to have a single voice agent dynamically handle many different user cohorts.

### Custom Voices

Cloned or designed voices are usable by your realtime agents and are configurable with a `session.update` event.

### Endpoints

| Transport  | OpenAI                                       | Inworld                                                                           |
| ---------- | -------------------------------------------- | --------------------------------------------------------------------------------- |
| WebSocket  | `wss://api.openai.com/v1/realtime?model=...` | `wss://api.inworld.ai/api/v1/realtime/session?key=<session-id>&protocol=realtime` |
| WebRTC SDP | `https://api.openai.com/v1/realtime/calls`   | `https://api.inworld.ai/v1/realtime/calls`                                        |

### Session setup

You need a session ID from your Inworld app before connecting. Pass it as the `key` query parameter for WebSocket.

## Full reference

For event schemas and exhaustive details, see the [WebSocket API reference](/api-reference/realtimeAPI/realtime/realtime-websocket).
