Get API key
Inference

Speech to text

OpenRouter's speech-to-text API: one audio file in, its text out, never streamed. Send the audio as base64 in input_audio, or as an OpenAI multipart upload with the audio in a file part and every other field as a text part. The file is at most 25 MiB in wav, mp3, flac, ogg, webm, m4a, aac or pcm; its duration is measured before any provider is called, and a file that cannot be read is a 400, never billed. A call bills the seconds of audio. GET /api/v1/models?output_modalities=transcription lists the models your key can call, each with verbose_json.

POST/api/v1/audio/transcriptions
Request
curl -X POST https://api.llm.buzz/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $LLM_BUZZ_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/whisper-large-v3-turbo",
  "input_audio": {
    "data": "BASE64_AUDIO",
    "format": "mp3"
  }
}'
Response
{
  "text": "Thanks for calling.",
  "usage": {
    "seconds": 12.48,
    "cost": 0.000041558
  }
}

Authorization

An inference key, as Authorization: Bearer KEY.

Keys and limits

Body application/json

  • modelstringrequired

    A speech-to-text model from GET /api/v1/models?output_modalities=transcription, such as openai/whisper-large-v3-turbo.

  • input_audioobjectrequired

    data (the audio in base64) and format. A url is a 400: send the bytes.

  • response_formatstring

    json (the default: text and usage) or verbose_json, which adds task, language, duration, segments and words, on a model whose verbose_json is true.

    jsonverbose_json
  • languagestring

    An ISO-639-1 code such as en; omitted, the provider detects it.

  • temperaturenumber

    0 to 1.

  • timestamp_granularitiesstring[]

    Sent with verbose_json only.

  • providerobject

    The audio routes read only the data policy fields; order, only, ignore, allow_fallbacks and sort are accepted and ignored. With the OpenAI SDK, send it in extra_body.

    Show 2 child fields
    • zdrboolean

      true keeps the request on providers that declare 0 days of retention.

    • data_collectionstring

      deny keeps the request on providers that declare no training and 0 days of retention.

      allowdeny

Response 200

The text, with usage.seconds (what the call billed) and usage.cost in US dollars. The X-Generation-Id header names the call's generation record.

Errors

  • 400

    A field is missing or malformed (invalid_request, with metadata.param), or the model cannot do what the request asks (unsupported_capability).

  • 401

    No key, or the key is unknown, expired, revoked or disabled.

  • 402

    Your balance is spent and the model is not free, or the request could cost more than your balance.

  • 404

    No model has this name, or your key may not call it.

  • 413

    The file is over 25 MiB (request_too_large). Send a shorter file.

Every error code

Docs