v1/audio/transcriptions (STT)
curl --request POST \
--url https://api.nano-gpt.com/api/v1/audio/transcriptionsimport requests
url = "https://api.nano-gpt.com/api/v1/audio/transcriptions"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.nano-gpt.com/api/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.nano-gpt.com/api/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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/v1/audio/transcriptions"
req, _ := http.NewRequest("POST", url, nil)
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.nano-gpt.com/api/v1/audio/transcriptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/v1/audio/transcriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyEndpoint Examples
v1/audio/transcriptions (STT)
OpenAI-compatible speech-to-text transcription endpoint
POST
/
api
/
v1
/
audio
/
transcriptions
v1/audio/transcriptions (STT)
curl --request POST \
--url https://api.nano-gpt.com/api/v1/audio/transcriptionsimport requests
url = "https://api.nano-gpt.com/api/v1/audio/transcriptions"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.nano-gpt.com/api/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.nano-gpt.com/api/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",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nano-gpt.com/api/v1/audio/transcriptions"
req, _ := http.NewRequest("POST", url, nil)
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.nano-gpt.com/api/v1/audio/transcriptions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/v1/audio/transcriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyOverview
NanoGPT provides an OpenAI-compatible endpoint for synchronous speech-to-text (STT) models.Elevenlabs-STT uses the asynchronous workflow below and is not a drop-in SDK transcription response.
Endpoint
POST https://api.nano-gpt.com/api/v1/audio/transcriptions
Authentication
Use either header:Authorization: Bearer YOUR_API_KEYx-api-key: YOUR_API_KEY
Request Formats
1) Multipart upload (OpenAI-compatible)
Sendmultipart/form-data with:
file(required): audio (or video for supported models)model(required): STT model IDlanguage(optional): language code (default: auto-detect)
curl -X POST https://api.nano-gpt.com/api/v1/audio/transcriptions \
-H "Authorization: Bearer YOUR_API_KEY" \
-F file=@audio.mp3 \
-F model=Whisper-Large-V3 \
-F language=en
2) JSON with URL
{
"model": "Whisper-Large-V3",
"file_url": "https://example.com/audio.mp3",
"language": "en"
}
file_url or audio_url for URL-based transcription.
Supported Models (Examples)
Model availability changes; useGET /api/v1/models?output_modalities=transcription&detailed=true to discover synchronous transcription models. This catalog excludes voice-cloning workflows and asynchronous Elevenlabs-STT; see the async workflow and model list for those models.
| Model | Notes |
|---|---|
Whisper-Large-V3 | High-accuracy transcription |
Wizper | Fast processing |
Elevenlabs-STT | Asynchronous (HTTP 202); poll for speaker diarization + audio event tagging |
gpt-4o-mini-transcribe | Improved accuracy vs Whisper (OpenAI-family) |
openai-whisper-with-video | Accepts video files (MP4, MOV, etc.) |
Voice Cloning (via the same endpoint)
Some special model IDs run voice-cloning workflows instead of returning plain transcription text:qwen-voice-clone— returns a reusable speaker embedding URLminimax-voice-clone— returns a reusable custom voice ID (and/or preview output)
Synchronous response (HTTP 200)
{
"text": "The transcribed text goes here.",
"language": "en",
"duration": 45.2
}
Asynchronous ElevenLabs transcription (HTTP 202)
SubmittingElevenlabs-STT returns a job, not text:
{"status":"pending","run_id":"your-run-id","request_id":"your-run-id"}
POST /api/transcribe/status using the same API key. Translate the v1
response’s run_id into the polling request’s runId. Do not resubmit the audio:
resubmitting creates another job and can create another charge. Pending polls return data.status (for example IN_PROGRESS); failures return
data.status: "FAILED" with data.error. Completion returns top-level
status: "completed". Respect X-Poll-After on pending polls and Retry-After
on retryable HTTP 503 responses; otherwise wait at least three seconds.
import os
import time
import requests
headers = {"Authorization": f"Bearer {os.environ['NANOGPT_API_KEY']}"}
with open("audio.mp3", "rb") as audio:
submitted = requests.post(
"https://api.nano-gpt.com/api/v1/audio/transcriptions",
headers=headers,
files={"file": audio},
data={"model": "Elevenlabs-STT"},
timeout=800,
)
submitted.raise_for_status()
job = submitted.json()
if submitted.status_code != 202:
raise RuntimeError(f"Expected async job, got {submitted.status_code}")
deadline = time.monotonic() + 1800
while time.monotonic() < deadline:
polled = requests.post(
"https://api.nano-gpt.com/api/transcribe/status",
headers=headers,
json={"runId": job["run_id"]},
timeout=60,
)
if polled.status_code == 503:
time.sleep(float(polled.headers.get("Retry-After", "3")))
continue
polled.raise_for_status()
result = polled.json()
if result.get("status") == "completed":
print(result["transcription"])
break
state = result.get("data", result)
if str(state.get("status", "")).lower() == "failed":
raise RuntimeError(state.get("error", "Transcription failed"))
time.sleep(float(polled.headers.get("X-Poll-After", "3")))
else:
raise TimeoutError("Keep the run_id and resume polling later; do not resubmit")
transcription, with metadata:
{"status":"completed","transcription":"Transcribed text","metadata":{"model":"Elevenlabs-STT","language":"en"}}
Supported Formats
- Audio: MP3, OGG, WAV, M4A, AAC
- Video (model-dependent): MP4, MOV, AVI, MKV, WEBM
Example (Python, OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.nano-gpt.com/api/v1",
api_key="YOUR_API_KEY"
)
with open("audio.mp3", "rb") as audio_file:
transcript = client.audio.transcriptions.create(
model="Whisper-Large-V3",
file=audio_file
)
print(transcript.text)
See Also
- NanoGPT transcription workflows:
api-reference/endpoint/transcribe.mdx - Full STT guide and model list:
api-reference/speech-to-text.mdx