Audio
Transcribes audio into the input language.
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)curl -X POST https://api.infercom.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $INFERCOM_API_KEY" \ -F file="@audio.mp3" \ -F model="Whisper-Large-v3"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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Audio to transcribe and parameters
Transcription request object
object
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.
Optional text prompt provided to influence transcription Translation style or vocabulary. Example: “Please transcribe carefully, including pauses and hesitations.”
Optional language of the input audio. Supplying the input language in ISO-639-1 (e.g. en) format will improve accuracy and latency.
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.
Enables streaming responses.
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}Responses
Section titled “Responses”Successful Response
Transcription response json object
object
Audio file text transcription
Streamed chunk of a transcription response returned by the model
object
A list of transcription or translation choices.
Transcription or translation chunk choice generated by streamed model responses.
object
Transcription or translation response delta chunk generated by streamed model responses.
object
The role of the messages author
The content delta of the transcription or translation.
The reason the model stopped generating tokens
The index of the choice in the list of choices
Completion Log Probs object
object
object
object
The Unix timestamp (in seconds) of when the chat completion was created.
A unique identifier for the chat completion.
The model used for the chat completion.
The object type, always chat.completion.chunk.
Backend configuration that the model runs with.
Usage metrics for the completion, embeddings,transcription or translation request
object
Acceptance rate
Number of tokens generated in completion
Completion tokens per second after first token generation
Completion tokens per second after first token generation first ten
Completion tokens per second after first token generation
Completion tokens per second
Breakdown of the generated tokens. Returned by every model. Use it to budget and bill reasoning separately from the visible answer.
object
Number of tokens spent on the chain of thought. Counts towards completion_tokens and therefore towards max_tokens. Returns 0 when the model did not reason, for example gemma-4-31B-it without chat_template_kwargs: {"enable_thinking": true}.
The Unix timestamp (in seconds) of when the generation finished.
Whether or not is last response, always true for non streaming response
Extra prompt token details. Not returned by /chat/completions. Prompt caching is reported on /responses as usage.input_tokens_details.cached_tokens instead.
object
Amount of cached tokens
Number of tokens used in the prompt sent
The Unix timestamp (in seconds) of when the generation started.
Also TTF, time (in seconds) taken to generate the first token
Time to first token measurement for graphing/monitoring purposes
The reason generation stopped. Values include stop (natural end or stop sequence), length (max_tokens reached), tool_calls (model invoked a tool).
Total time (in seconds) taken to generate the full generation
Prompt tokens + completion tokens
Tokens per second including prompt and completion
Example
{ "text": "Es un efecto de sonido de una campana sonando, específicamente una campana de iglesia."}Example
It's a sound effect of a bell chiming, specifically a church bell.Headers
Section titled “Headers”Example
a0b08d8a-1893-45d6-a0f4-7ad6fdeb5443Unique identifier for this inference request, useful for debugging and support.
Example
250Maximum requests allowed per minute.
Example
50000Maximum requests allowed per day.
Example
247Remaining requests in the current minute window.
Example
49988Remaining requests in the current day.
Example
1776937132Unix timestamp when the per-minute limit resets.
Example
1777023472Unix 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.
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
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"}Returned when the multipart body itself is malformed.
Unauthorized - the API key is missing, incorrect or revoked.
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
Examplegenerated
{ "error": { "code": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Not found - the model ID does not exist.
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
Examplegenerated
{ "error": { "code": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Request timeout
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
Examplegenerated
{ "error": { "code": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Gone - model is no longer available (deprecated or removed)
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
Examplegenerated
{ "error": { "code": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Too Many Requests
Other kind of errors
object
object
Error code
Error message
Error params
Error type
Unique identifier for the request. Quote it in any support report. Absent on the two responses that use the flat error shape.
Examplegenerated
{ "error": { "code": "example", "message": "example", "param": "example", "type": "example" }, "request_id": "example"}Internal Server Error. Unexpected issue on server side.
Service Temporarily Unavailable
Example
Service Temporarily Unavailable