Skip to main content
POST
Audio Transcription

Endpoint

Transcribe an audio file using multipart/form-data. Responses are buffered JSON with an x-receipt-id header for verification.

Models and Pricing

The live model catalog lists transcription models with transcription in output_modalities and USD-per-second rates in pricing.audio_transcription. Check the catalog for current availability and pricing. Audio is billed per started second: 2.965 seconds is billed as 3 seconds.

Request Body

string
required
Transcription model ID: openai/whisper-large-v3 or mistralai/voxtral-small-24b-2507.
file
required
Exactly one nonempty file, up to 25 MiB (26,214,400 bytes). The filename must include a supported extension: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm.
string
Language code of 2–3 lowercase ASCII letters, for example en.
string
Optional context for transcription, up to 4,096 Unicode characters.
number
Sampling temperature from 0 through 1.
string
json by default. Whisper also accepts verbose_json; Voxtral supports json only and returns 400 invalid_request_error for verbose_json. Text and subtitle formats are not supported.
string[]
Accepted values are word and/or segment, once each, with Whisper and response_format=verbose_json. Repeat the form field for both. The spelling timestamp_granularities is also accepted; do not mix spellings. Word-level timestamps are not returned; segments can be absent.
boolean
Omit this field or send the literal form value false. Streaming is not supported; other values return 400.
string
Accepted for SDK compatibility but removed before forwarding upstream.
Duplicate scalar fields, malformed multipart, and invalid UTF-8 text return 400. Unknown form fields, including provider, chunking_strategy, include[], and speaker fields, return 400 unknown_parameter. ACI E2EE is not supported on this endpoint. The upload must complete within 60 seconds; oversized files or request bodies return 413.

Routing Constraints

The Phala TEE-only endpoint requires verified serving for audio requests. A provider form field is not accepted.
string
Optional JSON object with the same routing constraints as the JSON provider field, for example {"aci_verified":true}. The gateway consumes this header and does not forward it upstream. The header must appear once, contain only ASCII bytes, and be at most 8,192 bytes.
Before sending explicit multipart constraints, verify the gateway and confirm that its attestation report lists /v1/audio/transcriptions in service_capabilities.supported_multipart_constraint_endpoints. Refuse the upload if support is absent. Session pins must intersect locally accepted sessions; verify the receipt’s cited session against the effective policy. Receipt body hashes do not commit to this header. See Attested Routing.

Examples

Let the client set the multipart Content-Type boundary. Node SDK uploads need an explicit filename: toFile(buf) alone uses unknown_file, which has no supported extension and returns 400 invalid_parameter with param: file.
For Voxtral, replace the model with mistralai/voxtral-small-24b-2507 and keep response_format=json. For the Private AI Proxy example, create auth-headers.txt containing Authorization: Bearer <API_KEY>, restrict its permissions to your user, and remove it after use. No manual X-ACI-Provider header is needed for this request on the Phala TEE-only endpoint. pap curl verifies the gateway and pins its TLS channel; it does not audit response receipts. Use pap serve or an ACI verifier SDK for receipt audits. Ordinary cURL and OpenAI SDK clients do not verify the gateway or audit receipts.

Response

Example JSON response for three billable seconds of Whisper audio at the current rate:
json returns text, usage, and optional languages: [{"code":"en"}]. Whisper’s verbose_json response includes duration and language alongside text and usage. Word-level timestamps are not returned. With verbose_json, Whisper responses may include segments; they can be absent. A segment’s no_speech_prob field may also be missing. usage.seconds is an integer rounded up to the next whole second; verbose duration retains the raw value. The gateway adds usage.cost in USD when audio pricing is available: billable seconds times the model’s pricing.audio_transcription rate. Without a valid duration, the transcript is withheld with 502 and no audio is billed.

Verification

Capture x-receipt-id and fetch GET /v1/aci/receipts/{id} with the same bearer token. Audio receipts have chat_id: null; use the receipt ID. See Get Receipt and Verify a Response.

Errors

Errors use a JSON error object, with error.code and error.param where applicable. Authentication, budget, and other routing errors follow Error Handling.

List Models

Get Receipt