Create Transcription
Transcribe audio. The request can be OpenRouter's JSON form, with the audio base64-encoded in input_audio, or OpenAI's multipart/form-data upload with the audio in file. Both return the same response, so the OpenAI and OpenRouter SDKs work unchanged.
Audio: Up to 25 MB after decoding and 4 hours long. Audio URLs are not accepted.
Formats: response_format is json (the default) or text, which returns the bare transcript as text/plain. verbose_json, timestamp_, srt and vtt are not supported and return 400.
Streaming: With stream: true the response is OpenAI's server-sent events: transcript. events with each piece of the transcript as it is decoded, then one transcript.text.done with the whole text and the same usage as the JSON response. A failure after the stream began ends it with a transcript. event in the error envelope. The upload still completes before decoding starts; this is not live audio.
Billing: Per second of audio, rounded up, as reported in usage.seconds.
Body
application/jsonOpenRouter's transcription request. OpenRouter's provider is accepted and ignored.
-
model string required
The speech-to-text model to use, e.g.
whisper-large-v3-turbo. -
input_audio object required
-
language string
ISO-639-1 code of the spoken language. Detected when omitted.
-
prompt string
Text to guide spelling and style, such as names and terms in the audio.
-
temperature numberrange 0–1
-
response_format stringdefault jsonjsontext
-
stream boolean
Stream the transcript as OpenAI's
transcript.text.*server-sent events.default false
Body
multipart/form-dataResponses
OK
application/json, text/plain, text/event-stream · transcription-response-payload
The request body is neither JSON nor multipart, or the model could not decode the audio
application/json · error-payload
The API key is missing, unknown or not active. Send it as Authorization: Bearer <key>.
application/json · error-payload
Model not found
application/json · error-payload
The audio is larger than 25 MB
application/json · error-payload
Rate limit exceeded
application/json · error-payload
The model could not be reached or returned an unusable response
application/json · error-payload
The model timed out
application/json · error-payload
curl https://api.vultrinference.com/v1/audio/transcriptions \
-H "Authorization: Bearer $VULTR_INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "whisper-large-v3-turbo",
"input_audio": {
"data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YQAAAAA=",
"format": "wav"
},
"language": "en"
}'import os
import requests
response = requests.post(
"https://api.vultrinference.com/v1/audio/transcriptions",
headers={"Authorization": f"Bearer {os.environ['VULTR_INFERENCE_API_KEY']}"},
json={
"model": "whisper-large-v3-turbo",
"input_audio": {
"data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YQAAAAA=",
"format": "wav",
},
"language": "en",
},
)
print(response.json())const response = await fetch("https://api.vultrinference.com/v1/audio/transcriptions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VULTR_INFERENCE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "whisper-large-v3-turbo",
"input_audio": {
"data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAgD4AAAB9AAACABAAZGF0YQAAAAA=",
"format": "wav"
},
"language": "en"
}),
});
console.log(await response.json());{
"text": "string",
"usage": {
"type": "string",
"seconds": 0
}
}