On this page
Inference
Audio
Speech synthesis, transcription, and translation with the same auth and billing gates.
Speech
POST
/v1/audio/speechAPI keycurl -X POST https://api.relayrouter.org/v1/audio/speech \ -H "Authorization: Bearer $RELAY_API_KEY" \ -H 'content-type: application/json' \ -d '{ "model": "tts-model", "input": "Welcome to RelayRouter.", "voice": "alloy" }' \ --output speech.mp3Returns audio bytes, not JSON. Billing uses input text tokens plus the network fee.
Transcription and translation
curl -X POST https://api.relayrouter.org/v1/audio/transcriptions \ -H "Authorization: Bearer $RELAY_API_KEY" \ -F [email protected] \ -F model=whisper-model \ -F language=enReturns { "text": "..." } for transcription endpoints.
Billing
Audio transcription pricing is estimated from upload bytes at roughly 2 MB per minute, with a minimum of one minute. If a model has no audio pricing configured, the call falls back to token billing on estimated audio tokens. The exact amount is recorded in usage_logs.cost_micro.
10 MB limit
Audio uploads are bounded by the global request body limit. For longer recordings, split the file into chunks before uploading.