🎁 New Sign up free, 10 calls on us. Up to $1, no card needed.

gemini-2.5-flash-native-audio

Google invited beta realtime audio
Input$0.5/M
Output$2/M
Audio input$3/M
Audio output$12/M

Provider list prices: no platform markup, pay-as-you-go. These are official list prices. Logged-in customers may see effective prices including workspace discounts on /console/pricing.

Use gemini-2.5-flash-native-audio in 30 seconds

OpenAI Realtime-compatible: connect over WebSocket and stream audio in, audio out. WS /v1/realtime

import asyncio, base64, json, websockets

URL = "wss://synthorai.io/v1/realtime?model=gemini-2.5-flash-native-audio"
HEADERS = {"Authorization": "Bearer sk-syn-...", "OpenAI-Beta": "realtime=v1"}

async def main():
    async with websockets.connect(URL, additional_headers=HEADERS) as ws:
        # 1) configure the speech-to-speech session
        await ws.send(json.dumps({
            "type": "session.update",
            "session": {"modalities": ["audio", "text"], "voice": "alloy"},
        }))
        # 2) send input audio (base64 PCM16), then request a spoken reply
        await ws.send(json.dumps({"type": "input_audio_buffer.append", "audio": pcm16_b64}))
        await ws.send(json.dumps({"type": "input_audio_buffer.commit"}))
        await ws.send(json.dumps({"type": "response.create"}))
        # 3) stream the model's audio (and text) back
        async for raw in ws:
            ev = json.loads(raw)
            if ev["type"] == "response.audio.delta":
                play(base64.b64decode(ev["delta"]))   # audio out
            elif ev["type"] == "response.done":
                break

asyncio.run(main())

About gemini-2.5-flash-native-audio

Google Gemini 2.5 Flash Native Audio speech-to-speech over WebSocket (AI Studio).

  • Most natural native-audio voice.
  • Audio $3/M in · $12/M out; text $0.50/M in · $2/M out.
  • Billed per response at official list price.

FAQ

Is the gemini-2.5-flash-native-audio API free to try?

gemini-2.5-flash-native-audio is currently in invited beta: access is application-based rather than open signup. Apply from the Synthorai console; once approved, standard pay-as-you-go pricing applies with no subscription.

How much does gemini-2.5-flash-native-audio cost?

gemini-2.5-flash-native-audio costs $0.5 per million input tokens and $2 per million output tokens on Synthorai. That is the provider's list price, with no platform markup.

How do I connect to the gemini-2.5-flash-native-audio API?

gemini-2.5-flash-native-audio is a speech-to-speech model: connect over WebSocket to wss://synthorai.io/v1/realtime?model=gemini-2.5-flash-native-audio with the OpenAI Realtime SDK (or a raw WebSocket) and stream audio in, audio out. It is not a POST /v1/audio/transcriptions file upload. Authenticate with your sk-syn key and mirror the OpenAI-Beta header.

How do I get access to gemini-2.5-flash-native-audio?

gemini-2.5-flash-native-audio is in invited beta: request access from the Synthorai console. Once approved it works like every other model: point your OpenAI SDK at base_url="https://synthorai.io/v1" and set model="gemini-2.5-flash-native-audio".

Related models

Get your free API key Compare your cost →