RouteMux Docs
Api referenceAudio

Speech to text (OpenAI-compatible)

POST
/v1/audio/transcriptions

Upload an audio file as multipart/form-data, using model=minimax/asr-1.0.

Example

curl https://api.routemux.com/v1/audio/transcriptions \  -H "Authorization: Bearer $ROUTEMUX_API_KEY" \  -F "model=minimax/asr-1.0" \  -F "file=@./audio.wav" \  -F "language=ru" \  -F "response_format=verbose_json" \  -F "timestamp_level=word"

Supported parameters

FieldRequiredSupport
modelYesminimax/asr-1.0
fileYesWAV, AIFF, FLAC, ALAC (M4A), MP3, AAC, Opus or Ogg; at most 500 seconds and 50 MB. Raw PCM is unsupported.
languageNoA language code from the list below; omit or leave empty for automatic, mixed-language recognition. Send as a form field with OpenAI SDKs, or as the native language HTTP header. RouteMux maps the form field to the provider header; the form field takes precedence.
response_formatNojson (default): text and duration; verbose_json: also speaker labels, n_speakers and segments; srt: SRT subtitles; vtt: WebVTT subtitles.
timestamp_levelNoEmpty or sentence (default), or word. Applies to verbose_json, srt and vtt; accepted but ignored for json. Chinese uses character timestamps; English uses word timestamps.
timestamp_granularities[]NoOpenAI SDK alias: segment maps to sentence, word maps to word. If both are requested, word takes precedence. An explicit timestamp_level takes precedence over this alias.
streamNofalse (default) returns the complete result; true streams SSE and requires response_format=json.

Supported language hints: zh, yue, en, ja, ko, th, vi, id, ms, fil, ar, tr, fr, de, es, it, pt, pl, ru, uk. zh is Chinese, ru is Russian, and en is English. The provider does not support prompt or temperature; supplying either returns 400 REQUEST_INVALID rather than silently ignoring it.

Subtitles and streaming

For subtitles, use -F response_format=srt -o transcript.srt or -F response_format=vtt -o transcript.vtt with the example above. For streaming, use curl -N, -F response_format=json and -F stream=true. The SSE response contains:

data: {"index":0,"delta":"Hello","finish":false}data: {"index":1,"delta":"","finish":true,"duration":5.952688}

Concatenate delta values in order, and stop at finish=true. The final event carries the audio duration. stream=true cannot be combined with verbose_json, srt or vtt; invalid combinations return 400 before provider invocation. This API transcribes an uploaded file; streaming output does not accept a live microphone input stream.

Billing and downloads

Billing uses the input audio duration in seconds, not tokens. JSON and SSE use the provider's returned duration; subtitle responses use the duration verified from the uploaded file on the server. See the current model price. In Playground, speech audio and transcription/subtitle files are saved to Artifacts, where they can be previewed and downloaded. Playground artifacts remain available with the conversation until deleted.

Official references: MiniMax ASR API and supported languages and audio requirements.

Authorization

bearerAuth
AuthorizationBearer <token>

Authorization: Bearer <your RouteMux API key>.

Create keys at https://routemux.com/console/keys. New keys use the sk- prefix; the legacy rmx_live_ prefix is still accepted.

The Anthropic SDK's x-api-key and the Google SDK's x-goog-api-key are accepted too. Sending several key headers with different values returns 400 AUTH_AMBIGUOUS_API_KEY.

In: header

Request Body

multipart/form-data

TypeScript Definitions

Use the request body type in TypeScript.

Supported fields for MiniMax ASR 1.0 through RouteMux. See the endpoint description for provider differences.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/audio/transcriptions" \  -F model="string" \  -F file="string"
{  "text": "Hello, this is a speech recognition test. We process three hundred minutes of audio every day.",  "duration": 5.952688,  "n_speakers": 1,  "segments": [    {      "id": 0,      "start": 0.04,      "end": 5.74,      "speaker": "S1",      "text": "Hello, this is a speech recognition test. We process three hundred minutes of audio every day."    }  ]}