Audio.Transcriptions
March 12, 2026 ยท View on GitHub
Overview
API for audio transcription.
Available Operations
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
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
model | str | :heavy_check_mark: | ID of the model to be used. | Example 1: voxtral-mini-latest Example 2: voxtral-mini-2507 |
file | Optional[models.File] | :heavy_minus_sign: | N/A | |
file_url | OptionalNullable[str] | :heavy_minus_sign: | Url of a file to be transcribed | |
file_id | OptionalNullable[str] | :heavy_minus_sign: | ID of a file uploaded to /v1/files | |
language | OptionalNullable[str] | :heavy_minus_sign: | Language of the audio, e.g. 'en'. Providing the language can boost accuracy. | |
temperature | OptionalNullable[float] | :heavy_minus_sign: | N/A | |
diarize | Optional[bool] | :heavy_minus_sign: | N/A | |
context_bias | List[str] | :heavy_minus_sign: | N/A | |
timestamp_granularities | List[models.TimestampGranularity] | :heavy_minus_sign: | Granularities of timestamps to include in the response. | |
retries | Optional[utils.RetryConfig] | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
Response
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 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
| Parameter | Type | Required | Description |
|---|---|---|---|
model | str | :heavy_check_mark: | N/A |
file | Optional[models.File] | :heavy_minus_sign: | N/A |
file_url | OptionalNullable[str] | :heavy_minus_sign: | Url of a file to be transcribed |
file_id | OptionalNullable[str] | :heavy_minus_sign: | ID of a file uploaded to /v1/files |
language | OptionalNullable[str] | :heavy_minus_sign: | Language of the audio, e.g. 'en'. Providing the language can boost accuracy. |
temperature | OptionalNullable[float] | :heavy_minus_sign: | N/A |
diarize | Optional[bool] | :heavy_minus_sign: | N/A |
context_bias | List[str] | :heavy_minus_sign: | N/A |
timestamp_granularities | List[models.TimestampGranularity] | :heavy_minus_sign: | Granularities of timestamps to include in the response. |
retries | Optional[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 Type | Status Code | Content Type |
|---|---|---|
| errors.SDKError | 4XX, 5XX | */* |