OpenAI

gpt-realtime-translate API pricing and integration

Integrate gpt-realtime-translate using the published protocols below. Review context limits and billing units before choosing request parameters.

Model ID: gpt-realtime-translate · Catalog updated: 2026-11-04

Published base prices

Audio duration
$0.034
/ audio minute
-

Account discounts and final billing are shown in your dashboard.

Model parameters and protocols

Context window
See model documentation
Maximum output
See model documentation
Billing type
composite
Published protocols
/v1/realtime/translations

Parameters and tool support

A listed protocol does not imply support for every parameter or hosted tool. Image input, reasoning options, structured output, and tool execution depend on the model and route. Validate your workload with a small request and preserve session context for tool continuations.

Tools and sessions guide

Integration examples

Complete examples

Generated from the model’s public capabilities and updated with every selection.

Supported protocols only
Protocol
Language
pip install websockets
Realtime · TranslatePythonDefault provider
Realtime · Translate · Python
import asyncio, base64, json, os
from pathlib import Path
from websockets.asyncio.client import connect

async def main():
    headers = {"Authorization": "Bearer " + os.environ["GR_API_KEY"]}
    async with connect("wss://endpoint.greatrouter.com/v1/realtime/translations?model=gpt-realtime-translate", additional_headers=headers) as ws:
        async def send(event):
            await ws.send(json.dumps(event))
        async for raw in ws:
            event = json.loads(raw)
            if event["type"] == "session.created":
                await ws.send("{\"type\":\"session.update\",\"session\":{\"audio\":{\"output\":{\"language\":\"en\"}}}}")
            elif event["type"] == "session.updated":
                # audio.pcm: PCM16 LE, mono, 24000 Hz; synthetic/test audio first.
                audio = Path("audio.pcm").read_bytes()
                for offset in range(0, len(audio), 4800):
                    await send({"type": "session.input_audio_buffer.append", "audio": base64.b64encode(audio[offset:offset+4800]).decode()})
                    await asyncio.sleep(0.1)
                await send({"type": "session.close"})
            if event["type"] == "error":
                raise RuntimeError(event["error"].get("message", "Realtime error"))
            print(event)
            if event["type"] == "session.closed":
                break

asyncio.run(main())