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

# OpenAI Realtime (Speech to Speech)

> Run a Bolna Voice AI agent on the OpenAI Realtime API, where one model hears the caller and speaks back over a single connection.

## What is the OpenAI Realtime API?

The [OpenAI Realtime API](https://platform.openai.com/docs/guides/realtime) is a speech-to-speech interface: you stream caller audio to it and it streams the agent's spoken reply back, without a separate transcription or text-to-speech step. It handles turn taking itself, calls your tools, and produces a transcript of both sides for your records.

## Why choose OpenAI Realtime for voice AI

The model reasons over the audio directly, so tone and delivery survive into its answer instead of being flattened into text. Turn taking uses semantic voice activity detection, which judges whether a caller has actually finished a thought rather than waiting on a fixed silence timer, so the agent interrupts less and replies sooner.

## Which OpenAI Realtime models are supported on Bolna AI?

| Model                   | Description                                                |
| ----------------------- | ---------------------------------------------------------- |
| `gpt-realtime-2.1`      | Default. Latest realtime model with reasoning and tool use |
| `gpt-realtime-2.1-mini` | Cost efficient version of `gpt-realtime-2.1`               |
| `gpt-realtime-2`        | Previous generation with reasoning and tool use            |
| `gpt-realtime-1.5`      | Audio in, audio out, without reasoning                     |

`gpt-realtime-translate` is a speech translation model without tool calling and is not supported for agents. `gpt-realtime-mini` is deprecated by OpenAI and is not offered.

## Supported voices

`alloy`, `ash`, `ballad`, `cedar`, `coral`, `echo`, `marin`, `sage`, `shimmer`, `verse`

## Configuration

```json theme={"system"}
{
  "s2s": {
    "provider": "openai_realtime",
    "provider_config": {
      "model": "gpt-realtime-2.1",
      "voice": "marin",
      "turn_detection_type": "semantic_vad",
      "eagerness": "auto",
      "language": "en"
    }
  }
}
```

| Field                     | Type    | Default                  | Description                                                                                                                                  |
| ------------------------- | ------- | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `model`                   | string  | `gpt-realtime-2.1`       | One of the models above                                                                                                                      |
| `voice`                   | string  | `marin`                  | One of the voices above                                                                                                                      |
| `turn_detection_type`     | string  | `semantic_vad`           | `semantic_vad` judges whether the caller has finished a thought. `server_vad` uses a silence timer instead                                   |
| `eagerness`               | string  | `auto`                   | `semantic_vad` only. `low` waits longest before the agent takes its turn, `high` responds soonest, `auto` sits in between                    |
| `vad_threshold`           | float   | `0.5`                    | `server_vad` only. Speech detection sensitivity                                                                                              |
| `vad_silence_duration_ms` | integer | `500`                    | `server_vad` only. Silence before the caller's turn is considered over                                                                       |
| `vad_prefix_padding_ms`   | integer | `300`                    | `server_vad` only. Audio retained ahead of detected speech                                                                                   |
| `reasoning_effort`        | string  | unset                    | Reasoning models only. `minimal` through `xhigh`. Higher settings answer more slowly                                                         |
| `max_output_tokens`       | integer | unset                    | Cap on a single response                                                                                                                     |
| `transcription_model`     | string  | `gpt-4o-mini-transcribe` | Model used to transcribe the caller for the record. Does not affect what the agent hears                                                     |
| `language`                | string  | unset                    | ISO code for the caller's language. Without it the model detects per utterance, which can transcribe a caller into the wrong script mid-call |

## Barge-in

Barge-in is decided by the provider. With `semantic_vad`, raise `eagerness` if the agent waits too long before replying, and lower it if the agent talks over callers who are still thinking. With `server_vad`, raise `vad_silence_duration_ms` for callers who pause mid-sentence.

## Reconnection

If the connection drops mid-call, Bolna reconnects and replays the conversation so far, so the model continues rather than greeting the caller again. The caller loses the turn that was in flight.
