Skip to content

Speech to Text

SIRAYA Model Router's Speech to Text API provides highly accurate transcription and translation for audio files. We offer a unified interface for various STT models, supporting multiple languages and formats.

Authorization string Required
Your API Key (e.g., Bearer <API_KEY>).

Body

file file Required
The audio file object (supports .flac, .mp3, .mp4, .m4a, .wav, .webm).
model string Required
The ID of the model to use (e.g., qwen3-asr-flash).

Endpoints

Task Endpoint
Transcription (same language) POST https://llm.siraya.ai/v1/audio/transcriptions
Translation (to English) POST https://llm.siraya.ai/v1/audio/translations
curl https://llm.siraya.ai/v1/audio/transcriptions \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer <API_KEY>" \
  --form "file=@/path/to/speech.mp3" \
  --form "model=\"qwen3-asr-flash\""
curl https://llm.siraya.ai/v1/audio/translations \
  -H "Content-Type: multipart/form-data" \
  -H "Authorization: Bearer <API_KEY>" \
  --form "file=@/path/to/speech.mp3" \
  --form "model=\"qwen3-asr-flash\""
from openai import OpenAI

client = OpenAI(
    api_key="<API_KEY>",
    base_url="https://llm.siraya.ai/v1"
)

audio_file = open("/path/to/speech.mp3", "rb")
transcription = client.audio.transcriptions.create(
    model="qwen3-asr-flash",
    file=audio_file
)

print(transcription.text)

Example Response

{
  "text": "Imagine the wildest idea that you've ever had...",
  "usage": {
    "type": "tokens",
    "input_tokens": 14,
    "total_tokens": 59
  }
}

Visit the Models Directory for all supported speech-to-text engines.