Transcribe audio
curl --request POST \
--url http://127.0.0.1:{port}/transcribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "<string>",
"audio_base64": "<string>",
"mime_type": "<string>",
"mode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"engine": "<string>",
"model": "<string>",
"language": "<string>"
}
'import requests
url = "http://127.0.0.1:{port}/transcribe"
payload = {
"file": "<string>",
"audio_base64": "<string>",
"mime_type": "<string>",
"mode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"engine": "<string>",
"model": "<string>",
"language": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: '<string>',
audio_base64: '<string>',
mime_type: '<string>',
mode_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
engine: '<string>',
model: '<string>',
language: '<string>'
})
};
fetch('http://127.0.0.1:{port}/transcribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://127.0.0.1:{port}/transcribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => '<string>',
'audio_base64' => '<string>',
'mime_type' => '<string>',
'mode_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'engine' => '<string>',
'model' => '<string>',
'language' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:{port}/transcribe"
payload := strings.NewReader("{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:{port}/transcribe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:{port}/transcribe")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"text": "<string>",
"engine": "<string>",
"model": "<string>",
"language": "<string>",
"timings": {
"load_ms": 123,
"decode_ms": 123
},
"latency_ms": 123
}API Reference
Transcribe audio
Accepts either an absolute file path OR an audio_base64 + mime_type
pair. The engine + model can come from a saved mode_id, from explicit
engine/model/language fields, or a mix (mode supplies defaults
and per-call fields override).
POST
/
transcribe
Transcribe audio
curl --request POST \
--url http://127.0.0.1:{port}/transcribe \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "<string>",
"audio_base64": "<string>",
"mime_type": "<string>",
"mode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"engine": "<string>",
"model": "<string>",
"language": "<string>"
}
'import requests
url = "http://127.0.0.1:{port}/transcribe"
payload = {
"file": "<string>",
"audio_base64": "<string>",
"mime_type": "<string>",
"mode_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"engine": "<string>",
"model": "<string>",
"language": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: '<string>',
audio_base64: '<string>',
mime_type: '<string>',
mode_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
engine: '<string>',
model: '<string>',
language: '<string>'
})
};
fetch('http://127.0.0.1:{port}/transcribe', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "62437",
CURLOPT_URL => "http://127.0.0.1:{port}/transcribe",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => '<string>',
'audio_base64' => '<string>',
'mime_type' => '<string>',
'mode_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'engine' => '<string>',
'model' => '<string>',
'language' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:{port}/transcribe"
payload := strings.NewReader("{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:{port}/transcribe")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:{port}/transcribe")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\",\n \"audio_base64\": \"<string>\",\n \"mime_type\": \"<string>\",\n \"mode_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"engine\": \"<string>\",\n \"model\": \"<string>\",\n \"language\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"text": "<string>",
"engine": "<string>",
"model": "<string>",
"language": "<string>",
"timings": {
"load_ms": 123,
"decode_ms": 123
},
"latency_ms": 123
}Authorizations
Token from the discovery file. Required on every endpoint except /health.
Body
application/json
Absolute filesystem path. Mutually exclusive with audio_base64.
base64-encoded audio bytes. Pair with mime_type.
e.g. audio/wav, audio/m4a, audio/mpeg, audio/flac
Saved Mode used as the baseline. May be combined with engine/model/language to override per-call.
whisperLocal | parakeet | qwen3Asr | appleSpeech |
Was this page helpful?
⌘I
