Skip to content
InfercomInfercomInfercom Documentation

Audio

Transcribes audio into the input language.

POST
/audio/transcriptions
from openai import OpenAI
client = OpenAI(
base_url="https://api.infercom.ai/v1",
api_key="your-infercom-api-key",
)
with open("audio.mp3", "rb") as audio_file:
transcription = client.audio.transcriptions.create(
file=audio_file,
model="Whisper-Large-v3",
)
print(transcription.text)

Transcribe audio to text in the original language. Note: This endpoint requires an audio model (e.g., Whisper) to be available. Check GET /v1/models for current model availability.

Audio to transcribe and parameters

Media typemultipart/form-data
Transcription Request

Transcription request object

object
model
required
Any of:
string
file
required
file

The audio file object to transcribe or translate, in one of these formats: FLAC, MP3, MP4, MPEG, MPGA, M4A, Ogg, WAV, or WebM format. File size limit is 25MB.

string format: binary
prompt
prompt

Optional text prompt provided to influence transcription Translation style or vocabulary. Example: “Please transcribe carefully, including pauses and hesitations.”

string
nullable
language
language

Optional language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.

string
nullable
Allowed values: en zh de es ru ko fr ja pt tr pl ca nl ar sv it id hi fi vi he uk el ms cs ro da hu ta no th ur hr bg lt la mi ml cy sk te fa lv bn sr az sl kn et mk br eu is hy ne mn bs kk sq sw gl mr pa si km sn yo so af oc ka be tg sd gu am yi lo uz fo ht ps tk nn mt sa lb my bo tl mg as tt haw ln ha ba jw su yue
response_format
response format

Output format. Only json and text are honoured. json returns an object, text returns the bare transcript string. The endpoint also accepts verbose_json, srt and vtt with HTTP 200, but ignores them and returns the bare transcript string - no timestamps, segments or subtitle cues.

string
default: json
Allowed values: json text
stream
stream

Enables streaming responses.

boolean
Example
{
"model": "Whisper-Large-v3",
"file": "(binary audio file, e.g. \"sample.wav\")",
"prompt": "Please transcribe carefully, including pauses and hesitations.",
"language": "es",
"response_format": "json",
"stream": true
}

Successful Response

One of:
Transcription Response

Transcription response json object

object
text
required
text

Audio file text transcription

string
key
additional properties
any
Example
{
"text": "Es un efecto de sonido de una campana sonando, específicamente una campana de iglesia."
}
inference-id
string
Example
a0b08d8a-1893-45d6-a0f4-7ad6fdeb5443

Unique identifier for this inference request, useful for debugging and support.

x-ratelimit-limit-requests
integer
Example
250

Maximum requests allowed per minute.

x-ratelimit-limit-requests-day
integer
Example
50000

Maximum requests allowed per day.

x-ratelimit-remaining-requests
integer
Example
247

Remaining requests in the current minute window.

x-ratelimit-remaining-requests-day
integer
Example
49988

Remaining requests in the current day.

x-ratelimit-reset-requests
integer
Example
1776937132

Unix timestamp when the per-minute limit resets.

x-ratelimit-reset-requests-day
integer
Example
1777023472

Unix timestamp when the daily limit resets.

Bad Request - missing or invalid parameters, or a model that does not support this endpoint (error code model_not_supported). A malformed multipart body is rejected before it reaches the API and returns an HTML page, not JSON.

GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Example
{
"error": {
"message": "The model `qwen3-tts` does not support the audio transcriptions API.",
"type": "invalid_request_error",
"param": "model",
"code": "model_not_supported"
},
"request_id": "dagknmqo1c26hr9qhvqg"
}

Unauthorized - the API key is missing, incorrect or revoked.

Media typeapplication/json
GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Not found - the model ID does not exist.

Media typeapplication/json
GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Request timeout

Media typeapplication/json
GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Gone - model is no longer available (deprecated or removed)

Media typeapplication/json
GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Too Many Requests

Media typeapplication/json
GeneralError

Other kind of errors

object
error
required
object
code
code

Error code

string
nullable
message
message

Error message

string
param
param

Error params

string
nullable
type
type

Error type

string
request_id
request_id

Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
},
"request_id": "example"
}

Internal Server Error. Unexpected issue on server side.

Media typetext/plain
string

Service Temporarily Unavailable

Media typetext/plain
string
Example
Service Temporarily Unavailable