Create a transcription
Transcribe audio (speech to text). Accepts a multipart/form-data upload with the audio in the file field, or an application/json body with base64 input_audio. Multipart requests take the same fields as form values, but provider, metadata, options, and keyterms must be JSON-encoded strings. response_format of text, srt, or vtt returns a plain-text body instead of the transcription object. Add ?async=true to queue the job and get a 202 with a request id to poll.
curl --request POST \
--url https://api.usenaive.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input_audio": {
"data": "<string>",
"format": "<string>",
"sample_rate": 123,
"channels": 123
},
"model": "auto",
"language": "<string>",
"prompt": "<string>",
"response_format": "json",
"temperature": 123,
"diarize": true,
"redact": true,
"translate": true,
"keyterms": [
"<string>"
],
"metadata": {},
"provider": {
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"order": [
"<string>"
],
"allow_fallbacks": true,
"require_features": true,
"max_price": {
"per_min": 123,
"per_1k_chars": 123
},
"region": [
"<string>"
]
},
"options": {}
}
'import requests
url = "https://api.usenaive.ai/v1/audio/transcriptions"
payload = {
"input_audio": {
"data": "<string>",
"format": "<string>",
"sample_rate": 123,
"channels": 123
},
"model": "auto",
"language": "<string>",
"prompt": "<string>",
"response_format": "json",
"temperature": 123,
"diarize": True,
"redact": True,
"translate": True,
"keyterms": ["<string>"],
"metadata": {},
"provider": {
"only": ["<string>"],
"ignore": ["<string>"],
"order": ["<string>"],
"allow_fallbacks": True,
"require_features": True,
"max_price": {
"per_min": 123,
"per_1k_chars": 123
},
"region": ["<string>"]
},
"options": {}
}
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({
input_audio: {data: '<string>', format: '<string>', sample_rate: 123, channels: 123},
model: 'auto',
language: '<string>',
prompt: '<string>',
response_format: 'json',
temperature: 123,
diarize: true,
redact: true,
translate: true,
keyterms: ['<string>'],
metadata: {},
provider: {
only: ['<string>'],
ignore: ['<string>'],
order: ['<string>'],
allow_fallbacks: true,
require_features: true,
max_price: {per_min: 123, per_1k_chars: 123},
region: ['<string>']
},
options: {}
})
};
fetch('https://api.usenaive.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usenaive.ai/v1/audio/transcriptions",
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([
'input_audio' => [
'data' => '<string>',
'format' => '<string>',
'sample_rate' => 123,
'channels' => 123
],
'model' => 'auto',
'language' => '<string>',
'prompt' => '<string>',
'response_format' => 'json',
'temperature' => 123,
'diarize' => true,
'redact' => true,
'translate' => true,
'keyterms' => [
'<string>'
],
'metadata' => [
],
'provider' => [
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'order' => [
'<string>'
],
'allow_fallbacks' => true,
'require_features' => true,
'max_price' => [
'per_min' => 123,
'per_1k_chars' => 123
],
'region' => [
'<string>'
]
],
'options' => [
]
]),
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 := "https://api.usenaive.ai/v1/audio/transcriptions"
payload := strings.NewReader("{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\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("https://api.usenaive.ai/v1/audio/transcriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/audio/transcriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "transcription",
"created": 123,
"model": "<string>",
"resolved_model": "<string>",
"provider": "<string>",
"text": "<string>",
"language": "<string>",
"duration": 123,
"segments": [
{}
],
"words": [
{}
],
"speakers": [
{}
],
"entities": [
{}
],
"usage": {
"seconds": 123,
"billable_seconds": 123,
"input_seconds": 123,
"output_seconds": 123,
"input_chars": 123,
"cost": 123,
"currency": "<string>"
},
"route": {
"mode": "<string>",
"reason": "<string>",
"candidates": 123,
"filtered": [
{}
],
"attempts": [
{}
]
},
"warnings": [
"<string>"
],
"credits_used": 123,
"credits_remaining": 123
}{
"id": "<string>",
"status": "queued"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"hint": "<string>",
"reason": "<string>",
"block_reason": "no_subscription",
"credit_kind": "trial",
"balance": 123,
"balance_note": "<string>",
"actions": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"hint": "<string>",
"reason": "<string>",
"block_reason": "no_subscription",
"credit_kind": "trial",
"balance": 123,
"balance_note": "<string>",
"actions": {}
}
}Authorizations
Workspace API key. Create one via the dashboard or POST /v1/auth/keys.
Query Parameters
Queue the transcription and return 202 with a request id instead of waiting. Recommended for long audio.
true, 1 Body
Base64 audio (JSON requests only). Mutually exclusive with the multipart file field.
Show child attributes
Show child attributes
Exact owner/model slug, or auto / stt/auto for managed routing.
BCP-47 hint (e.g. es, pt-BR). On a managed route this skips language detection — lower latency and better accuracy.
Context or vocabulary hint for models that support prompting.
json, verbose_json, text, srt, vtt, diarized_json none, segment, word, both Label speakers. Speaker ids are normalized to spk_N.
Redact detected PII where supported.
Translate the transcript to English where supported.
none, transcript, debug, archive minimal, low, medium, high Per-request routing constraints, applied before ranking.
Show child attributes
Show child attributes
Native model controls, namespaced per owner. Applied only when the request resolves to that owner.
Response
The transcription. text/srt/vtt formats return a plain-text body instead.
"transcription"
The model you requested.
The model that served the request. Managed routes report auto.
Audio duration in seconds.
Normalized usage. cost is in USD; Naive credits are reported separately as credits_used.
Show child attributes
Show child attributes
How the model was selected, and what was attempted.
Show child attributes
Show child attributes
Naive credits charged for this request.
curl --request POST \
--url https://api.usenaive.ai/v1/audio/transcriptions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input_audio": {
"data": "<string>",
"format": "<string>",
"sample_rate": 123,
"channels": 123
},
"model": "auto",
"language": "<string>",
"prompt": "<string>",
"response_format": "json",
"temperature": 123,
"diarize": true,
"redact": true,
"translate": true,
"keyterms": [
"<string>"
],
"metadata": {},
"provider": {
"only": [
"<string>"
],
"ignore": [
"<string>"
],
"order": [
"<string>"
],
"allow_fallbacks": true,
"require_features": true,
"max_price": {
"per_min": 123,
"per_1k_chars": 123
},
"region": [
"<string>"
]
},
"options": {}
}
'import requests
url = "https://api.usenaive.ai/v1/audio/transcriptions"
payload = {
"input_audio": {
"data": "<string>",
"format": "<string>",
"sample_rate": 123,
"channels": 123
},
"model": "auto",
"language": "<string>",
"prompt": "<string>",
"response_format": "json",
"temperature": 123,
"diarize": True,
"redact": True,
"translate": True,
"keyterms": ["<string>"],
"metadata": {},
"provider": {
"only": ["<string>"],
"ignore": ["<string>"],
"order": ["<string>"],
"allow_fallbacks": True,
"require_features": True,
"max_price": {
"per_min": 123,
"per_1k_chars": 123
},
"region": ["<string>"]
},
"options": {}
}
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({
input_audio: {data: '<string>', format: '<string>', sample_rate: 123, channels: 123},
model: 'auto',
language: '<string>',
prompt: '<string>',
response_format: 'json',
temperature: 123,
diarize: true,
redact: true,
translate: true,
keyterms: ['<string>'],
metadata: {},
provider: {
only: ['<string>'],
ignore: ['<string>'],
order: ['<string>'],
allow_fallbacks: true,
require_features: true,
max_price: {per_min: 123, per_1k_chars: 123},
region: ['<string>']
},
options: {}
})
};
fetch('https://api.usenaive.ai/v1/audio/transcriptions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usenaive.ai/v1/audio/transcriptions",
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([
'input_audio' => [
'data' => '<string>',
'format' => '<string>',
'sample_rate' => 123,
'channels' => 123
],
'model' => 'auto',
'language' => '<string>',
'prompt' => '<string>',
'response_format' => 'json',
'temperature' => 123,
'diarize' => true,
'redact' => true,
'translate' => true,
'keyterms' => [
'<string>'
],
'metadata' => [
],
'provider' => [
'only' => [
'<string>'
],
'ignore' => [
'<string>'
],
'order' => [
'<string>'
],
'allow_fallbacks' => true,
'require_features' => true,
'max_price' => [
'per_min' => 123,
'per_1k_chars' => 123
],
'region' => [
'<string>'
]
],
'options' => [
]
]),
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 := "https://api.usenaive.ai/v1/audio/transcriptions"
payload := strings.NewReader("{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\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("https://api.usenaive.ai/v1/audio/transcriptions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenaive.ai/v1/audio/transcriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_audio\": {\n \"data\": \"<string>\",\n \"format\": \"<string>\",\n \"sample_rate\": 123,\n \"channels\": 123\n },\n \"model\": \"auto\",\n \"language\": \"<string>\",\n \"prompt\": \"<string>\",\n \"response_format\": \"json\",\n \"temperature\": 123,\n \"diarize\": true,\n \"redact\": true,\n \"translate\": true,\n \"keyterms\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"provider\": {\n \"only\": [\n \"<string>\"\n ],\n \"ignore\": [\n \"<string>\"\n ],\n \"order\": [\n \"<string>\"\n ],\n \"allow_fallbacks\": true,\n \"require_features\": true,\n \"max_price\": {\n \"per_min\": 123,\n \"per_1k_chars\": 123\n },\n \"region\": [\n \"<string>\"\n ]\n },\n \"options\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "transcription",
"created": 123,
"model": "<string>",
"resolved_model": "<string>",
"provider": "<string>",
"text": "<string>",
"language": "<string>",
"duration": 123,
"segments": [
{}
],
"words": [
{}
],
"speakers": [
{}
],
"entities": [
{}
],
"usage": {
"seconds": 123,
"billable_seconds": 123,
"input_seconds": 123,
"output_seconds": 123,
"input_chars": 123,
"cost": 123,
"currency": "<string>"
},
"route": {
"mode": "<string>",
"reason": "<string>",
"candidates": 123,
"filtered": [
{}
],
"attempts": [
{}
]
},
"warnings": [
"<string>"
],
"credits_used": 123,
"credits_remaining": 123
}{
"id": "<string>",
"status": "queued"
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"hint": "<string>",
"reason": "<string>",
"block_reason": "no_subscription",
"credit_kind": "trial",
"balance": 123,
"balance_note": "<string>",
"actions": {}
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"hint": "<string>",
"reason": "<string>",
"block_reason": "no_subscription",
"credit_kind": "trial",
"balance": 123,
"balance_note": "<string>",
"actions": {}
}
}