Router9
Documentation
API Reference

Audio Tool

Speech-to-text and text-to-speech capabilities

Speech-to-Text (Transcription)

Transcribe audio files to text. Compatible with the OpenAI Whisper API format.

Endpoint

POST /v1/audio/transcriptions

Request (multipart/form-data)

Upload an audio file directly:

curl https://api.router9.com/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -F [email protected] \
  -F prompt="Technical meeting about API design"

Request (JSON)

Provide audio via URL or base64:

curl https://api.router9.com/v1/audio/transcribe \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "mediaUrl": "https://example.com/audio.mp3",
    "prompt": "Technical meeting"
  }'
ParameterTypeRequiredDescription
filebinaryOne of file/mediaUrl/mediaBase64Audio file (multipart upload)
mediaUrlstringOne of file/mediaUrl/mediaBase64URL to audio file
mediaBase64stringOne of file/mediaUrl/mediaBase64Base64-encoded audio
promptstringNoContext hint for transcription

Response

{
  "success": true,
  "tool": "audio.transcribe",
  "result": {
    "fullText": "Hello everyone, today we'll discuss the new API design."
  }
}

Text-to-Speech (Synthesis)

Convert text to spoken audio.

Endpoint

POST /v1/audio/synthesize

Request

curl https://api.router9.com/v1/audio/synthesize \
  -H "Authorization: Bearer sk-r9k-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "Hello, welcome to Router9!",
    "voice": "nova",
    "response_format": "mp3"
  }' \
  --output speech.mp3
ParameterTypeRequiredDescription
inputstringYesText to synthesize (max 4,096 characters)
voicestringNoVoice selection (provider-specific)
response_formatstringNoOutput format: mp3, wav, etc.

Response

Returns the audio file binary with the appropriate Content-Type header (e.g., audio/mp3).

Quotas

PlanASR (Speech-to-Text)TTS (Text-to-Speech)
Free10/period10/period
Assistant200/period200/period
Engineer5,000/period5,000/period

On this page