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

# OpenAI Realtime

> Test a voice agent built on OpenAI Realtime.

Connect a voice agent that runs on OpenAI Realtime, on Azure OpenAI, or on your own server that speaks the same protocol.

![The OpenAI Realtime connection fields with an API key, a model, and a prompt ID, and the Realtime URL left empty](https://mintcdn.com/bluejay/EeUk0hD_moG9tWmI/images/connect-openai-realtime.png?fit=max\&auto=format\&n=EeUk0hD_moG9tWmI\&q=85\&s=6a7ad0ca6053aad7d2d7010061ce5df3)

## Connect

OpenAI has no agent list that Bluejay can sync, so you connect each agent by hand.

**1. Create the agent**

Create an **Inbound** voice agent with the **OpenAI Realtime** connection type. Bluejay always opens the session to your agent, so your agent never places the call.

**2. Point Bluejay at your endpoint**

* **Realtime URL** (optional): leave it empty to use OpenAI's own endpoint, . Set it for Azure OpenAI or your own server. Bluejay adds `?model=` to the URL unless the URL already has a `model` parameter.
* **API key**: Bluejay sends it as `Authorization: Bearer`. Bluejay stores it encrypted, and you cannot read it back.
* **Model** (optional): Bluejay uses `gpt-realtime` when you leave it empty.

**3. Choose where the agent's setup comes from**

* If you built the agent in the OpenAI Realtime playground, enter its stored prompt (pmpt\_...) in **Prompt ID** and leave **Session overrides** empty. Bluejay then tests the prompt itself, so your later edits in OpenAI show up in the next test. Add a version to pin one, or leave it empty to use the prompt's current version.
* If the agent lives in your own code, put its session in **Session overrides** as a JSON object, such as `instructions`, the voice, turn detection, and tools. Name the agent's language in the instructions, because without one the model can pick a different language on each opening turn.

The **Model** and **Prompt ID** fields win over a `model` or `prompt` key in the session overrides. Bluejay always sets the audio format to 24 kHz PCM in both directions, and you cannot change it.

Through the API, set `connection_type` to `OPENAI_REALTIME` on [add agent](/api-reference/endpoint/add-agent.md), and set these fields:

* `openai_realtime_url`
* `openai_api_key`
* `openai_model`
* `openai_prompt_id`
* `openai_prompt_version`
* `openai_realtime_session`

## Test

[Run a simulation](/test/simulations/create.md) on the agent as you would for any voice agent. Bluejay asks your agent for an opening response, so your agent speaks first. When the Digital Human interrupts, Bluejay drops the agent audio that has not played yet.

The transcript comes from Bluejay's own speech-to-text, not from OpenAI's transcript. Bluejay saves the OpenAI session ID with the result. If OpenAI sends an error during the call, Bluejay records it in the result metadata under customer\_session\_errors.

## Monitor

Bluejay does not receive your production Realtime sessions. To score them, send each conversation to [`POST /v1/evaluate`](/api-reference/endpoint/evaluate) after it ends. See [Logs](/monitor/logs.md).

## Limits

Bluejay does not run the tools in your session. When the model calls a function, Bluejay sends no result back, so the agent continues without one and no tool calls appear on the result. Bluejay also does not send the result ID to your agent.

## Troubleshooting

| What you see | What to do |
| - | - |
| **No Connection** with WEBSOCKET\_AUTH\_FAILED | OpenAI rejected the API key, and Bluejay does not retry. Check the **API key** on the agent. |
| **No Connection** with CUSTOMER\_CONCURRENCY\_LIMIT | The server returned HTTP 429, and Bluejay does not retry. Lower the simulation concurrency. |
| **No Connection** with BRIDGE\_PRE\_START\_FAILED | The call did not start. The error message says why: the agent has no API key, OpenAI refused the session (for example an unknown prompt ID or model), OpenAI did not open the session within 15 seconds, or the connection failed 3 times, 2 seconds apart. |
| **Call Dropped** with BRIDGE\_DISCONNECTED | The connection stopped during the call. Run the call again. |

## Related

* [Agents API](/api-reference/endpoint/add-agent.md)
* [Agents MCP tools](/mcp/testing-tools.md#agents)
* [WebSocket](/integrations/websockets.md)
* [Create a Simulation](/test/simulations/create.md)


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