/v1/audio/transcriptionsTranscribe a file
Upload audio as multipart/form-data and get the transcript in the response. Up to 500 MB per request; any container the decoder reads (wav, flac, mp3, ogg/opus, m4a, webm).
Auth: API key or upload token with stt:write
Request
| Parameter | Where | Type | Default | Description |
|---|---|---|---|---|
| filerequired | form field | file | — | The audio. Must not be empty. |
| model | form field | string | inferentium-stt-1 | Accepted for SDK compatibility. Every value runs the same model; the ids listed by GET /v1/models are inferentium-stt-1 and whisper-1. |
| language | form field | string | en | ISO-639-1 hint, echoed back as language in verbose_json. The model detects the spoken language itself. |
| response_format | form field | string | json | json, text, verbose_json, srt or vtt. |
| timestamp_granularities[] | form field | string[] | segment | segment and/or word (repeat the field or comma-separate). Only affects verbose_json: word adds words[], segment adds segments[]. |
| prompt, temperature | form field | string, number | — | Accepted and ignored. |
| stream | form field | — | — | Not supported on this route. Use POST /api/v1/stt/transcribe/stream for server-sent partials. |
curl https://api.inferentium.ai/v1/audio/transcriptions \
-H "Authorization: Bearer tapi_..." \
-F model=inferentium-stt-1 \
-F language=pt \
-F response_format=verbose_json \
-F "timestamp_granularities[]=word" \
-F file=@call.mp3from openai import OpenAI
client = OpenAI(base_url="https://api.inferentium.ai/v1", api_key="tapi_...")
tx = client.audio.transcriptions.create(
model="inferentium-stt-1",
file=open("call.mp3", "rb"),
language="pt",
)
print(tx.text)Response
{ "text": "Olá, tudo bem? Sim, obrigado.", "usage": { "type": "duration", "seconds": 8 } }{
"task": "transcribe",
"language": "pt",
"duration": 7.43,
"text": "Olá, tudo bem? Sim, obrigado.",
"words": [
{ "word": "Olá,", "start": 0.12, "end": 0.44 },
{ "word": "tudo", "start": 0.46, "end": 0.69 }
],
"segments": [
{ "id": 0, "start": 0.12, "end": 1.35, "text": "Olá, tudo bem?" },
{ "id": 1, "start": 2.10, "end": 3.40, "text": "Sim, obrigado." }
],
"usage": { "type": "duration", "seconds": 8 }
}Olá, tudo bem? Sim, obrigado.1
00:00:00,120 --> 00:00:01,350
Olá, tudo bem?
2
00:00:02,100 --> 00:00:03,400
Sim, obrigado.Errors
| Status | Code / body | When |
|---|---|---|
| 400 | missing_file | file missing or empty |
| 400 | invalid_value | response_format not one of json, text, verbose_json, srt, vtt |
| 402 | insufficient_credits | balance does not cover the estimate; nothing charged |
| 413 | — | body over 500 MB (no JSON body) |
| 502 | inference_failed | backend failed or the audio could not be decoded; nothing charged |
- Response headers: x-request-id (quote it when you contact us), openai-processing-ms, X-RateLimit-Limit, X-RateLimit-Remaining.
- duration and usage.seconds come from the decoded audio, not the file size; usage.seconds is rounded up. The charge is not echoed on this route — read it from GET /api/v1/account/usage or use the native route.
- words[] is null (not absent) when word was not requested. segments[] are sentences cut at sentence-final punctuation, at pauses over 1.2 s and at 320 characters.
- Speaker labels are not on this route: use POST /api/v1/stt/transcribe with diarize=true.