Skip to content

GPT Realtime

openai/gpt-realtimeRetires Jan 20, 2027

OpenAI's first generally available Realtime API speech-to-speech model (snapshot gpt-realtime-2025-08-28), which launched with image input and the Marin and Cedar voices. Deprecated in July 2026; shuts down 2027-01-20, replaced by gpt-realtime-2.1.

API
import WebSocket from "ws";
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";
import { createWriteStream } from "node:fs";

// Up to 60 seconds of mono PCM16 at 24000 Hz.
const input = await readFile("recording.pcm");
const output = createWriteStream("response.pcm"); // Mono PCM16, 24 kHz.
const url = new URL("/v1/audio/speech-to-speech/stream", process.env.AUDIOLAB_API_URL);
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
const socket = new WebSocket(url, {
  headers: { Authorization: `Bearer ${process.env.AUDIOLAB_API_KEY}`, "Idempotency-Key": randomUUID() },
});
socket.on("open", () => socket.send(JSON.stringify({
  type: "session.start", model: "openai/gpt-realtime", voice: "marin",
  instructions: "Answer briefly.", max_output_tokens: 1024,
  input_audio: { "format": "pcm16", "sample_rate": 24000, channels: 1 },
  output_audio: { "format": "pcm16", "sample_rate": 24000 },
  turn_detection: { type: "none" }, input_transcription: false, output_transcription: true,
})));
socket.on("message", raw => {
  const event = JSON.parse(raw.toString());
  if (event.type === "session.ready") {
    for (let offset = 0; offset < input.length; offset += 48000)
      socket.send(input.subarray(offset, offset + 48000));
    socket.send(JSON.stringify({ type: "input_audio.commit" }));
    socket.send(JSON.stringify({ type: "response.create" }));
  } else if (event.type === "output_audio.delta") output.write(Buffer.from(event.delta, "base64"));
  else if (event.type === "response.done") socket.close();
  else if (event.type === "error") { console.error(event); socket.close(); }
});
socket.on("close", () => output.end());
socket.on("error", error => { console.error(error); output.end(); });
Input Price
$27.20 / 1M tokens
Output Price
$54.40 / 1M tokens
Input
Audio
Output
Audio

Capabilities

Explore what GPT Realtime supports, then use the API section for a request tailored to this model.

StreamRealtimeAudio inputAudio output

Languages

Multilingual

Model Information

Provider
OpenAI
Product
Conversational
Release Date
Aug 28, 2025
Data Policy
No training
Region
Global
Input
Audio
Output
Audio
Provider Documentation

Playground

Try GPT Realtime by OpenAI. Requests use the selected workspace’s credits and API pricing.

GPT RealtimeCredits —
GPT Realtime
This model uses a dedicated input format. Explore its API example or open the supported playground.

Providers

Compare available endpoints, pricing, and context limits for GPT Realtime.

ProviderContextOutputInput PriceOutput PriceEndpoint
OpenAINot specifiedAudio$27.20 / 1M tokens$54.40 / 1M tokens
openai/gpt-realtime:openai

Prices are catalog rates. Your workspace’s estimate and endpoint pricing determine the final charge.

Input and Output Limits

Formats and limits AudioLab enforces on each request.

LimitValue
Input formatspcm16
Input sample rate24000
Output formatspcm16
Output sample rate24000
Max input seconds60
Max turns1
Max output tokens1024

Provider Notes

Up to 100 separately funded manual turns on one WebSocket connection. Each turn accepts up to 60 seconds of mono PCM16 input. Output streams at 24 kHz.

Status

Current catalog availability. Your workspace’s access is checked separately before a request runs.

Getting Started

Use your workspace API key and the exact model identifier below. Set the API URL to the endpoint shown in your workspace and keep credentials on your server.

API
import WebSocket from "ws";
import { randomUUID } from "node:crypto";
import { readFile } from "node:fs/promises";
import { createWriteStream } from "node:fs";

// Up to 60 seconds of mono PCM16 at 24000 Hz.
const input = await readFile("recording.pcm");
const output = createWriteStream("response.pcm"); // Mono PCM16, 24 kHz.
const url = new URL("/v1/audio/speech-to-speech/stream", process.env.AUDIOLAB_API_URL);
url.protocol = url.protocol === "https:" ? "wss:" : "ws:";
const socket = new WebSocket(url, {
  headers: { Authorization: `Bearer ${process.env.AUDIOLAB_API_KEY}`, "Idempotency-Key": randomUUID() },
});
socket.on("open", () => socket.send(JSON.stringify({
  type: "session.start", model: "openai/gpt-realtime", voice: "marin",
  instructions: "Answer briefly.", max_output_tokens: 1024,
  input_audio: { "format": "pcm16", "sample_rate": 24000, channels: 1 },
  output_audio: { "format": "pcm16", "sample_rate": 24000 },
  turn_detection: { type: "none" }, input_transcription: false, output_transcription: true,
})));
socket.on("message", raw => {
  const event = JSON.parse(raw.toString());
  if (event.type === "session.ready") {
    for (let offset = 0; offset < input.length; offset += 48000)
      socket.send(input.subarray(offset, offset + 48000));
    socket.send(JSON.stringify({ type: "input_audio.commit" }));
    socket.send(JSON.stringify({ type: "response.create" }));
  } else if (event.type === "output_audio.delta") output.write(Buffer.from(event.delta, "base64"));
  else if (event.type === "response.done") socket.close();
  else if (event.type === "error") { console.error(event); socket.close(); }
});
socket.on("close", () => output.end());
socket.on("error", error => { console.error(error); output.end(); });
Read the Endpoint Reference

Request Parameters

Available parameters depend on the provider and request format. The endpoint reference explains accepted values and required fields.

ParameterDetails
modelopenai/gpt-realtime — Required model identifier.
voiceView Accepted Values
instructionsView Accepted Values
max_output_tokensView Accepted Values
input_audioView Accepted Values
output_audioView Accepted Values
turn_detectionView Accepted Values

Input and Output Limits

Formats and limits AudioLab enforces on each request.

LimitValue
Input formatspcm16
Input sample rate24000
Output formatspcm16
Output sample rate24000
Max input seconds60
Max turns1
Max output tokens1024

Similar Models

Explore more conversational and compare their capabilities.

ModelContextInput PriceOutput Price
GPT Realtime 2.1OpenAINot specified$27.20 / 1M tokens$54.40 / 1M tokens
GPT Realtime 2.1 MiniOpenAINot specified$8.50 / 1M tokens$17.00 / 1M tokens
GPT Realtime 2OpenAINot specified$27.20 / 1M tokens$54.40 / 1M tokens
GPT Audio 1.5OpenAINot specified$27.20 / 1M tokens$54.40 / 1M tokens
GPT Realtime 1.5OpenAINot specified$27.20 / 1M tokens$54.40 / 1M tokens
Grok Voice LatestxAINot specified$0.0425 / minute—
View All Conversational