> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# OpenAI

Voice conversations with your desk's agent over OpenAI Realtime (`gpt-realtime-2.1-mini`), streaming 24 kHz PCM audio both ways from the kernel. While voice is on, everything the microphone hears goes to OpenAI as audio, and the replies it speaks come back from it, billed to your key. Your agent's replies, order cards, approval notices and recaps that Taji reads aloud go to OpenAI as text, so what they say of your accounts, positions and orders reaches it. The voice never places or approves an order and has no tool that reads an account.

## Before you link

An OpenAI API key with billing, from OpenAI's [API keys](https://platform.openai.com/api-keys) page. The API credits of an eligible ChatGPT subscription cover Realtime; the model's page lists its prices.

## Link

Link `openai` in Connections › Voice, or run `taji-link openai`; headless, `POST /verb/voice/link` (`provider: "openai"`, field `key`). Taji verifies the key with one models read and seals it in your vault.

## Use

1. Press the composer's Voice button, or `⌘⇧V` from anywhere in the window (except an open dialog such as the order ticket), and speak. OpenAI decides when you have finished (`semantic_vad`), and Taji then asks it for an answer, spoken in audio; the button moves with your voice and with its own. Press it again to turn voice off; after a minute with nothing heard, nothing played and no agent working on the desk, voice turns itself off.
2. Echo cancellation lets an answer play to its end, and speaking over it stops it; what you say is answered next. A request that needs market data or desk work goes to your desk's agent through the six dispatch tools (`send`, `read`, `stop`, `open_desk`, `set_progress_updates`, `hang_up`), and its reply is spoken when the agent answers.

## Open

No exchange with OpenAI's endpoint is recorded here, so none of this is measured:

- Whether a cough or speech meant for someone else starts no answer. `a_cough_and_a_remark_to_someone_else_are_not_answered` in `plugins/openai/tests/live.rs` asserts it; when voice landed (2026-11-23) a remark to someone else was answered, 4 runs of 4; on 2026-12-02 the voice answered it, 1 run of 1.
- How OpenAI ends a session at its 60-minute maximum: which `error` event, if any, comes before the socket closes.
- Which billing code a Realtime session or the models read returns at a billing stop.

## Unlink

Unlink OpenAI from its row under Connections › Voice (or `POST /verb/voice/unlink` with `{"provider": "openai"}`) while your vault is open. Taji deletes the sealed API key from the vault and removes the link from its state.

Taji does not revoke the key at OpenAI. Delete or revoke it on OpenAI's [API keys](https://platform.openai.com/api-keys) page if you no longer need it.

## If it fails

| Symptom | Cause | Fix |
|---|---|---|
| Link refuses with `invalid_key` | OpenAI returned 401 for the API key | Check or create an API key in your OpenAI account and link again |
| Link or session refuses with `no_credit` | OpenAI answered a billing stop: no credit left, or a spend or usage limit reached | Add credit or raise the billing limit on your OpenAI account |
| Session ends on its own | OpenAI stayed unreachable through six reconnect attempts over about 15 seconds | Check your network, then turn voice on again |

## References

- [Realtime conversations](https://developers.openai.com/api/docs/guides/realtime-conversations.md), the 60-minute maximum (fetched 2026-12-02)
- [Error codes](https://developers.openai.com/api/docs/guides/error-codes.md), the billing codes (fetched 2026-12-02)
- [Voice activity detection](https://developers.openai.com/api/docs/guides/realtime-vad.md) (fetched 2026-11-23)
- [Realtime client events](https://developers.openai.com/api/reference/resources/realtime/client-events.md), `session.audio.input.noise_reduction` (fetched 2026-11-23)
- [Realtime server events](https://developers.openai.com/api/reference/resources/realtime/server-events.md) (fetched 2026-11-23)
- [GPT-Realtime-2.1 mini](https://developers.openai.com/api/docs/models/gpt-realtime-2.1-mini.md), its tools and prices (fetched 2026-11-22)
- [API credits for eligible ChatGPT subscriptions](https://help.openai.com/en/articles/20001626-api-credits-benefit-for-eligible-chatgpt-subscriptions) (fetched 2026-11-22)
- `plugins/openai/taji-plugin.toml`, `plugins/openai/src/lib.rs`
- How the plugin works and why: [OpenAI: how it works](https://docs.taji.is/catalog/openai/architecture.md)
