Create transcription
Transcribe an audio file into text, following the OpenAI Audio API wire format. The audio is uploaded as multipart/form-data.
response_format selects how the transcript comes back: json wraps it in an object, text returns it as a plain text/plain body, and verbose_json adds the duration and per-segment timings. Whether verbose_json is available at all is model-specific, and it is rejected with a 400 for models that cannot produce timings.
Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.
Request payload for transcribing audio. Sent as multipart/form-data, with the
audio itself as the binary file part file.
Model identifier to use for transcription.
openai/whisper-large-v3Pattern: ^[a-zA-Z0-9._/-]+$The audio to transcribe, uploaded as a file part, of at most 15 MiB. A larger file is rejected with a 413. FLAC, MP3, MP4, MPEG, M4A, Ogg, WAV and WebM are accepted.
Language of the input audio as an ISO-639-1 code, such as en or de. Supplying it improves accuracy and latency. Omit it to have the language detected.
enText to guide the transcript's style, or to supply vocabulary the audio is likely to contain. How much it changes the result is model-specific.
Format of the transcript. json wraps the text in an object, text returns
it as a plain body, and verbose_json adds the duration and per-segment
timings. verbose_json is model-specific and is rejected with a 400 for
models that cannot produce timings.
jsonPossible values: Sampling temperature. Higher values make the transcript more varied, lower values more deterministic.
0Seed for deterministic sampling. Repeated requests with the same seed and
parameters return the same transcript on a best-effort basis. It only has
an effect when temperature is above 0: at the default of 0 decoding is
greedy and already deterministic.
This is an extension, not part of the OpenAI Audio API. OpenAI SDK clients
send it through extra_body (for example extra_body={"seed": 42} in
Python), which for this multipart endpoint arrives as the form field seed.
If true, stream the transcript as Server-Sent Events. Not supported: a request
with stream set to true is rejected with a 400. Omit the field or set it to
false.
falseSuccessful operation. The body is JSON unless response_format is text,
in which case it is the transcript on its own as text/plain.
Bad Request
The request sent to the API was malformed.
Unauthorized
The request is missing authorization information or the authorization information provided are expired.
Forbidden
The user issuing the request does not have the needed permissions.
Not Found
The requested model or endpoint does not exist. A model that exists but lacks the capability the request needs is rejected with a 400 instead.
Payload Too Large
The request exceeds a size limit. The request body is limited to 16 MiB, an inline
base64 data URI to 12 MiB decoded, and an uploaded image or mask to 10 MiB. On
/v1/chat/completions, /v1/embeddings, and /v1/rerank, a message, query, or
document is limited to 2048 content parts. Count limits, such as the number of
documents, are stated with each field. Pass large media as a remote HTTP or HTTPS URL
instead of inline base64: a URL does not count against the size limits, though it
still counts as a content part.
Unprocessable Entity
The request was well-formed but contains semantic errors.
Too Many Requests
Your contract's rate limit is exhausted. Wait the number of seconds in Retry-After
before retrying, rather than a delay of your own. The OpenAI SDKs do this
automatically. Limits are contract-specific.
Internal Server Error
The request could not be completed because of an internal error. The request was
not necessarily rejected, so a retry is safe for idempotent calls. If it persists,
quote the value of the X-Request-Id response header when contacting support.
Bad Gateway
The model could not be reached, or stopped before it finished answering. No partial answer is returned in its place, and nothing is billed for it. Retrying is reasonable. An image or video URL in the request whose host cannot be reached, times out or answers with a server error is also answered this way.
Service Overloaded (503)
Too many large requests are already being handled at once. This applies only
to a request above a size threshold, or one sent with chunked transfer
encoding. An ordinary-sized request is never refused this way. Always retry
using the Retry-After header, not a fixed delay, to avoid a synchronized
retry storm. For sustained traffic in media, keep individual requests small:
pass large media in a JSON body as a remote HTTP or HTTPS URL rather than
inline base64, and keep a file upload small, for example by sending audio in
a compressed format such as MP3 or Opus. The message gives the advice that
fits how the request was sent.
Gateway Timeout
The model did not answer within the time allowed for it. The request may
have reached the model and may even have been served, so a retry is only safe for
idempotent calls. Retrying the same request unchanged tends to time out again: the
work itself is usually what was too slow, so prefer a smaller request (fewer or
smaller images, a shorter prompt, a lower n) or a model that can serve it.
Capacity Exhausted (529)
The service is temporarily overloaded. This is a non-standard status,
matching the convention used by other LLM providers for the same
condition: capacity is exhausted, not a client error (429) and not an
outage (503). error.code distinguishes a per-user throttle
(user_overloaded) from a system-wide capacity shortage
(server_overloaded). If you check only the status, treat both
alike. Always retry using the Retry-After header, not a
fixed delay, to avoid a synchronized retry storm.
POST /v1/audio/transcriptions HTTP/1.1
Host: openai.inference.de-txl.ionos.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 148
{
"model": "openai/whisper-large-v3",
"file": "binary",
"language": "en",
"prompt": "text",
"response_format": "json",
"temperature": 0,
"seed": 1,
"stream": false
}{
"text": "The quick brown fox jumps over the lazy dog.",
"usage": {
"type": "duration",
"seconds": 8
}
}Last updated
Was this helpful?