The OpenAI provider powers Speech-to-Speech templates through the OpenAI Realtime API — one model that hears the caller and answers in natural voice, with no separate transcription step and very low latency.
Setup is short: OpenAI issues a single API key that covers everything the connection needs, so there's just one field to fill in. You pay OpenAI's direct prices with no markup and keep full control of your usage limits.
Quick start
Prepare your OpenAI account — billing has to be active.
Create the API key on the OpenAI platform.
Add the key to your connection and save.
Test the connection with the Test API button.
How it works
The connection stores one OpenAI API key and uses it to open a Realtime session for each call. Everything the agent does during that call — listening, reasoning, speaking, calling tools — runs inside that single session on your OpenAI account.
Because one key covers the whole session, there's nothing else to configure on OpenAI's side: no separate speech or voice credentials, no service account.
The OpenAI provider serves Speech-to-Speech. You point an agent at this connection on its Locales tab, where each locale gets a connection and a voice.
If you also want cascaded agents, set up a Google connection alongside it — see Adding Google provider keys to a Connection. The two coexist, and each agent locale picks the one it needs.
What you manage where
Where |
What you do there |
Create the API key, set its project and permissions, add billing credit, and watch usage |
|
Paste the key into the connection, enable it, and run Test API |
Billing, rate limits, and spend caps all sit on your OpenAI account. Nothing is charged through BSG for these calls.
Step 1. Prepare your OpenAI account
The Realtime API is available to paid OpenAI accounts, so do this before you create the key:
Sign in at platform.openai.com.
Open Settings → Billing and add a payment method or prepaid credit.
Optionally create a dedicated project for your voice agent. Keys belong to a project, so a separate one keeps voice usage and spend easy to read — and lets you set a spend limit for it on its own.
Step 2. Create the API key
Go to platform.openai.com/api-keys.
Click Create new secret key.
Give it a name you'll recognise later, such as bsg-voice-agent.
Select the project you want it billed to.
Leave permissions at All. A Read only key cannot open a Realtime session; if your policy requires a restricted key, make sure the restriction still allows Realtime model access.
Click Create secret key and copy the value immediately.
OpenAI shows the full key only once. If you close the dialog without copying it, the key can't be recovered — create a new one and delete the old.
Step 3. Add the key to your connection
Open your connection in the Voice Agent cabinet and go to the Settings tab.
Check that Provider reads openai. This field is read-only — it's fixed when the connection is created, so if it shows a different provider you'll need a new connection.
Paste the key into Key.
Tick Enabled so agents can use the connection.
Click Save.
The field is masked. Use the eye icon to reveal what you've pasted before saving — a trailing space copied along with the key is a common cause of a rejected credential. OpenAI keys begin with sk-.
Testing the connection
Click Test API at the top of the connection. A working key returns a success result straight away.
Open the Logs tab for the detail. Latest Requests lists recent calls to the provider, newest first, with a refresh control: the Method that ran, the Status (Success on a healthy request), the Reason behind that status, and the Date. A failed request carries OpenAI's own explanation in the Reason column — BSG passes it through rather than replacing it with its own message.
The problems you're most likely to hit, in OpenAI's wording:
Incorrect API key provided (401)
The key is mistyped, truncated, or has been deleted on the OpenAI side. Reveal the field, re-paste, and save again.
You exceeded your current quota (429)
Your OpenAI account has no credit left, or the project has hit its spend limit. Top up billing or raise the limit in Settings → Limits.
Rate limit reached (429)
Too many concurrent sessions for your usage tier. Reduce parallel calls or request higher limits from OpenAI.
Model not found or no access (403 / 404)
The project can't use the Realtime model — usually a restricted key or a project without model access. Recreate the key with All permissions.
For anything beyond these, see OpenAI's error codes reference.
Keeping your key safe
Treat the key like a password. Never commit it to a Git repository or ship it in client-side code — OpenAI scans public repositories and disables keys it finds there. If a key is exposed, create a replacement first, update the connection, and only then delete the old one, so your agent stays online through the swap.
Setting a spend limit on the project is worth doing too: it caps the damage if a key ever leaks, and it protects you from a runaway loop in testing.
Related guides
OpenAI references
Comments
0 comments
Article is closed for comments.