Skip to main content

POST /v1/audio/transcriptions

Send an audio file using multipart/form-data and retrieve its transcript with ClovisSTT/transcription.

https://llm-gateway.clovis-ai.fr/v1/audio/transcriptions

Authenticate each request with Authorization: Bearer <CLOVIS_API_KEY>. Keep the API key on your server.

Parameters​

FieldTypeValueDescription
fileBinary fileAudio file contentsRequired. Open the file in rb mode with the SDK or use -F 'file=@audio.mp3' with cURL.
modelStringClovisSTT/transcriptionRequired. Use this public name for request routing.
response_formatStringjsonSet explicitly. Returns an object containing text and usage.
languageStringar, nl, en, fr, de, hi, it, pt, esOptional. Codes listed by the HTTP validator. Requests with fr and en passed the integration test. Requests also work without this field.

language describes the input recording. In the test with language="en", the French sample is still transcribed in French.

The nine codes listed by the HTTP validator are distinct from the 13 Voxtral model languages. The integration test used a French sample; it does not measure transcription quality across languages.

Parameters are multipart body fields. Let the SDK or cURL generate the Content-Type and boundary.

Response formats​

response_formatStaging behavior
jsonHTTP 200. JSON object containing the transcript and audio duration directly. Used in the examples below.
textHTTP 200. Nested JSON with Content-Type: application/json. See below.
verbose_jsonHTTP 400. Rejected for this model.
diarized_jsonHTTP 400. Rejected for this model.
srt, vttHTTP 400. Rejected by this route.
Field omittedHTTP 400. Processing selects verbose_json, which this model rejects.

json response​

{"text":" Oui, c'est vrai.","usage":{"type":"duration","seconds":5.0}}
  • text contains the transcript. Use .strip() to remove leading and trailing whitespace.
  • usage.type is duration in this response.
  • usage.seconds contains the duration recorded by the service. The 4.48 s sample produces a value of 5 s.

text response​

{"text":"{\"text\":\" Oui, c'est vrai.\",\"usage\":{\"type\":\"duration\",\"seconds\":5}}","usage":null}

The SDK returns this body as a string. To access the transcript without decoding two JSON wrappers, use response_format="json" and read transcript.text.

Python example​

python -m pip install 'openai==3.35.1'
export CLOVIS_API_KEY='your-staging-api-key'
import os
from openai import OpenAI

with OpenAI(
api_key=os.environ["CLOVIS_API_KEY"],
base_url="https://llm-gateway.clovis-ai.fr/v1",
timeout=120.0,
max_retries=0,
) as client:
with open("audio.mp3", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="ClovisSTT/transcription",
file=audio_file,
response_format="json",
language="fr",
)
print(transcript.text.strip())

Remove language="fr" to submit the file without specifying its language.

cURL example​

curl --fail-with-body --max-time 120 \
https://llm-gateway.clovis-ai.fr/v1/audio/transcriptions \
-H "Authorization: Bearer $CLOVIS_API_KEY" \
-F 'file=@audio.mp3' \
-F 'model=ClovisSTT/transcription' \
-F 'response_format=json'

Add -F 'language=fr' to specify French.

Python client settings​

SettingExample valueEffect
api_keyos.environ["CLOVIS_API_KEY"]Adds Bearer authentication.
base_urlhttps://llm-gateway.clovis-ai.fr/v1API root. The SDK appends /audio/transcriptions.
timeout120.0Configures client network timeouts in seconds. A timeout raises APITimeoutError.
max_retries0Disables automatic retries, including after HTTP 500.

These configure the client, not the multipart body. To override a single request, use client.with_options(timeout=120.0, max_retries=0) before .audio.transcriptions.create(...).

Audio formats​

The MP3 format was tested with a 69,990-byte, 4.48 s recording.

Send the complete file. The MP3 example works without PCM conversion or Base64 encoding.

Errors​

RequestResult
Missing authentication headerHTTP 401
Missing fileHTTP 422
Missing modelHTTP 400
Backend name voxtral-mini-4b-realtime with the test keyHTTP 403
Language code xxHTTP 400, listing the nine accepted codes
Unrecognized response formatHTTP 400

Validation scope​

Verified on 19 October 2026 on staging using a 4.48 s French recording. SDK examples use openai 3.35.1. HTTP transport was tested on staging; JSON SDK and cURL examples were verified locally using the recorded real response. Client timeout and retry tests use a controlled local transport. Parameters without an established effect are excluded from this reference.