Esc to close · ⌘K / Ctrl-K opens search anywhere
One OpenAI-compatible audio API for transcription and voice — first-party India-resident ASR/TTS by default, ElevenLabs / Sarvam / OpenAI on BYOK, with failover across all of them.
/v1/audio/transcriptions + /v1/audio/speechएक्सेसमध्यम10 min
Audio is a routed modality on BharatRouter: the OpenAI /v1/audio/* wire format, but with failover and residency underneath. The asr and tts aliases lead on first-party India-resident engines (Parakeet for speech-to-text, Kokoro for voice) and fail over to ElevenLabs, Sarvam or OpenAI when you bring a key.
You'll use: /v1/audio/transcriptions and /v1/audio/speech. Reference: Audio.
Post an audio file to /v1/audio/transcriptions. Use the asr alias for the first-party model, or name a specific one (e.g. whisper-large-v3) to pin it. Pass language to bias decoding for Indian languages.
from openai import OpenAI
client = OpenAI(base_url="https://api.bharatrouter.com/v1", api_key="br-...")
with open("call.mp3", "rb") as f:
r = client.audio.transcriptions.create(
model="asr", # first-party Parakeet; fails over on BYOK
file=f,
language="hi", # bias toward Hindi
)
print(r.text)Post text to /v1/audio/speech. The tts alias speaks on first-party Kokoro; describe the voice with language / gender / style and the gateway picks a matching voice on whichever engine serves it.
curl https://api.bharatrouter.com/v1/audio/speech \
-H "Authorization: Bearer br-..." -H "Content-Type: application/json" \
-o hello.mp3 \
-d '{
"model": "tts",
"input": "Namaste! Aapka swagat hai.",
"language": "hi",
"gender": "female",
"response_format": "mp3"
}'| Alias | First-party (default) | BYOK failover | Residency |
|---|---|---|---|
asr | Parakeet (multilingual) | ElevenLabs · Groq Whisper · Sarvam · OpenAI | 🇮🇳 India lead |
tts | Kokoro (multilingual) | ElevenLabs · Sarvam Bulbul · OpenAI | 🇮🇳 India lead |
x-br-provider tells you who actually served it."stream": true to /v1/audio/speech, or open the bidirectional WebSocket at /v1/audio/speech/stream.TTS input is capped at 4096 characters per request — chunk longer text on sentence boundaries and concatenate the clips.
और रेसिपी कुकबुक में, या पूराAPI reference देखें।