GA OpenAI

OpenAI Agents SDK (voice / realtime agents)

Free open-source SDK (Python and TypeScript) with RealtimeAgent/RealtimeSession wrappers over the OpenAI Realtime API (browser WebRTC with ephemeral keys, server WebSocket, SIP), and a Python VoicePipeline for chained STT -> agent -> TTS.

Est. per minuten/a

Overview

Best for: Teams standardised on OpenAI models who want agent tooling/handoffs with realtime voice.

At a glance

Platform $/min$0
All-in priceNo
Entry plan $/mo$0
Free tierYes
Phone numbersNo
WebRTCYes
WebSocketYes
Phone / SIPYes
Self-hostYes
Open weightsYes

Free SDK; cost is OpenAI model usage. SIP supported but you need a carrier for phone numbers.

Audio in

Mic via WebRTC in browser; PCM/G.711 over WebSocket

Audio out

Same

Languages

Per OpenAI realtime/transcription models.

Latency

Model-dependent.

Regions

OpenAI API regions.

Compliance

Per OpenAI API terms (not covered here).

Features

  • tools
  • handoffs
  • guardrails
  • interruptions
  • tracing
  • SIP

Pricing

WhatPriceUnitNotes
SDK$0licenseYou pay OpenAI Realtime/STT/TTS model usage (see model segment).
How the per-minute estimate was worked out

Cost is the OpenAI model bill, priced in the realtime models segment.

Free tier: Open source.

Source: npmjs.com

Setup

  1. npm i @openai/agents (or pip install 'openai-agents[voice]').
  2. Server: mint a short-lived client key for the Realtime API; never ship your real API key to the browser.
  3. Browser: create a RealtimeAgent and RealtimeSession and connect with the ephemeral key (WebRTC, mic handled for you).

Endpoint

OpenAI Realtime API

Authentication

Ephemeral client secret in browser; API key server-side

Quick start javascript

// Browser voice agent with the OpenAI Agents SDK (TypeScript/JS)
import { RealtimeAgent, RealtimeSession } from "@openai/agents/realtime";

const agent = new RealtimeAgent({
  name: "Assistant",
  instructions: "You are a friendly voice assistant. Keep answers short.",
});
const session = new RealtimeSession(agent);

// ephemeralKey comes from your server (OpenAI client secret endpoint)
const { ephemeralKey } = await fetch("/api/realtime-token").then(r => r.json());
await session.connect({ apiKey: ephemeralKey }); // WebRTC + mic in the browser

Written from the current docs. Check the vendor's SDK version before you ship.

Warnings

Ties you to OpenAI realtime pricing

The SDK is free but speech-to-speech realtime minutes are among the more expensive options; long sessions also grow context cost.

Never expose the API key

Browser sessions must use short-lived client secrets minted server-side.

Feature parity differs by language

VoicePipeline is documented for Python; check JS docs before relying on it.

No telephony numbers included

SIP support exists, but you still need a carrier (Twilio, Telnyx, etc.).

Plus 12 warnings that apply to all platforms and telephony APIs. See category warnings.

Limits

  • OpenAI Realtime rate limits apply

Models and products

NameStatusNotes
RealtimeAgent / RealtimeSession (JS: @openai/agents/realtime)GAHandles interruptions, tools and handoffs between realtime agents.
VoicePipeline (Python, openai-agents[voice])GAChained STT -> agent workflow -> TTS. The JS README lists a voice pipeline as a future item.

Docs and sources

Docs

Sources used

Not fully verified

Current default realtime model name; whether JS has a chained VoicePipeline yet.

Similar platforms APIs

Spotted a wrong price or a dead link?