Audio.Transcriptions

March 12, 2026 ยท View on GitHub

Overview

API for audio transcription.

Available Operations

  • complete - Create Transcription
  • stream - Create Streaming Transcription (SSE)

complete

Create Transcription

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.audio.transcriptions.complete(model="voxtral-mini-latest", diarize=False)

    # Handle response
    print(res)

Parameters

ParameterTypeRequiredDescriptionExample
modelstr:heavy_check_mark:ID of the model to be used.Example 1: voxtral-mini-latest
Example 2: voxtral-mini-2507
fileOptional[models.File]:heavy_minus_sign:N/A
file_urlOptionalNullable[str]:heavy_minus_sign:Url of a file to be transcribed
file_idOptionalNullable[str]:heavy_minus_sign:ID of a file uploaded to /v1/files
languageOptionalNullable[str]:heavy_minus_sign:Language of the audio, e.g. 'en'. Providing the language can boost accuracy.
temperatureOptionalNullable[float]:heavy_minus_sign:N/A
diarizeOptional[bool]:heavy_minus_sign:N/A
context_biasList[str]:heavy_minus_sign:N/A
timestamp_granularitiesList[models.TimestampGranularity]:heavy_minus_sign:Granularities of timestamps to include in the response.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.TranscriptionResponse

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*

stream

Create Streaming Transcription (SSE)

Example Usage

from mistralai.client import Mistral
import os


with Mistral(
    api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:

    res = mistral.audio.transcriptions.stream(model="Camry", diarize=False)

    with res as event_stream:
        for event in event_stream:
            # handle event
            print(event, flush=True)

Parameters

ParameterTypeRequiredDescription
modelstr:heavy_check_mark:N/A
fileOptional[models.File]:heavy_minus_sign:N/A
file_urlOptionalNullable[str]:heavy_minus_sign:Url of a file to be transcribed
file_idOptionalNullable[str]:heavy_minus_sign:ID of a file uploaded to /v1/files
languageOptionalNullable[str]:heavy_minus_sign:Language of the audio, e.g. 'en'. Providing the language can boost accuracy.
temperatureOptionalNullable[float]:heavy_minus_sign:N/A
diarizeOptional[bool]:heavy_minus_sign:N/A
context_biasList[str]:heavy_minus_sign:N/A
timestamp_granularitiesList[models.TimestampGranularity]:heavy_minus_sign:Granularities of timestamps to include in the response.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

Union[eventstreaming.EventStream[models.TranscriptionStreamEvents], eventstreaming.EventStreamAsync[models.TranscriptionStreamEvents]]

Errors

Error TypeStatus CodeContent Type
errors.SDKError4XX, 5XX*/*