cURL
curl --request POST \
--url https://api.nano-gpt.com/api/transcribe/status \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"runId": "abc123def456",
"cost": 123,
"paymentSource": "<string>",
"isApiRequest": true,
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"diarize": true
}
'import requests
url = "https://api.nano-gpt.com/api/transcribe/status"
payload = {
"runId": "abc123def456",
"cost": 123,
"paymentSource": "<string>",
"isApiRequest": True,
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"diarize": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runId: 'abc123def456',
cost: 123,
paymentSource: '<string>',
isApiRequest: true,
fileName: '<string>',
fileSize: 123,
chargedDuration: 123,
diarize: true
})
};
fetch('https://api.nano-gpt.com/api/transcribe/status', 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/transcribe/status",
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([
'runId' => 'abc123def456',
'cost' => 123,
'paymentSource' => '<string>',
'isApiRequest' => true,
'fileName' => '<string>',
'fileSize' => 123,
'chargedDuration' => 123,
'diarize' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.nano-gpt.com/api/transcribe/status"
payload := strings.NewReader("{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.nano-gpt.com/api/transcribe/status")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/transcribe/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"transcription": "Speaker 1: Hello everyone. Speaker 2: Hi there!",
"metadata": {
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"actualDuration": 123,
"language": "<string>",
"cost": 123,
"currency": "<string>",
"model": "<string>"
},
"words": [
{
"text": "<string>",
"start": 123,
"end": 123,
"type": "word",
"speaker_id": "<string>"
}
],
"diarization": {
"segments": [
{
"speaker": "<string>",
"text": "<string>",
"start": 123,
"end": 123
}
]
},
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Endpoint Examples
Speech-to-Text Status
Check the status of an asynchronous transcription job (Elevenlabs-STT). Poll this endpoint to get the transcription results when the job is completed.
POST
/
transcribe
/
status
cURL
curl --request POST \
--url https://api.nano-gpt.com/api/transcribe/status \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"runId": "abc123def456",
"cost": 123,
"paymentSource": "<string>",
"isApiRequest": true,
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"diarize": true
}
'import requests
url = "https://api.nano-gpt.com/api/transcribe/status"
payload = {
"runId": "abc123def456",
"cost": 123,
"paymentSource": "<string>",
"isApiRequest": True,
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"diarize": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
runId: 'abc123def456',
cost: 123,
paymentSource: '<string>',
isApiRequest: true,
fileName: '<string>',
fileSize: 123,
chargedDuration: 123,
diarize: true
})
};
fetch('https://api.nano-gpt.com/api/transcribe/status', 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/transcribe/status",
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([
'runId' => 'abc123def456',
'cost' => 123,
'paymentSource' => '<string>',
'isApiRequest' => true,
'fileName' => '<string>',
'fileSize' => 123,
'chargedDuration' => 123,
'diarize' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.nano-gpt.com/api/transcribe/status"
payload := strings.NewReader("{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.nano-gpt.com/api/transcribe/status")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nano-gpt.com/api/transcribe/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"runId\": \"abc123def456\",\n \"cost\": 123,\n \"paymentSource\": \"<string>\",\n \"isApiRequest\": true,\n \"fileName\": \"<string>\",\n \"fileSize\": 123,\n \"chargedDuration\": 123,\n \"diarize\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "pending",
"transcription": "Speaker 1: Hello everyone. Speaker 2: Hi there!",
"metadata": {
"fileName": "<string>",
"fileSize": 123,
"chargedDuration": 123,
"actualDuration": 123,
"language": "<string>",
"cost": 123,
"currency": "<string>",
"model": "<string>"
},
"words": [
{
"text": "<string>",
"start": 123,
"end": 123,
"type": "word",
"speaker_id": "<string>"
}
],
"diarization": {
"segments": [
{
"speaker": "<string>",
"text": "<string>",
"start": 123,
"end": 123
}
]
},
"error": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Overview
Check the status of an asynchronous transcription job (Elevenlabs-STT). Poll this endpoint to get transcription results when the job is completed.Usage
This endpoint is used with the Elevenlabs-STT model which processes transcriptions asynchronously. After submitting a transcription job, you’ll receive arunId that you use to check the status.
import requests
import time
def check_transcription_status(run_id, job_data):
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
status_data = {
"runId": run_id,
"cost": job_data.get('cost'),
"paymentSource": job_data.get('paymentSource'),
"isApiRequest": True,
"fileName": job_data.get('fileName'),
"fileSize": job_data.get('fileSize'),
"chargedDuration": job_data.get('chargedDuration'),
"diarize": job_data.get('diarize', False)
}
response = requests.post(
"https://api.nano-gpt.com/api/transcribe/status",
headers=headers,
json=status_data
)
return response.json()
def wait_for_completion(run_id, job_data, max_attempts=60):
for attempt in range(max_attempts):
result = check_transcription_status(run_id, job_data)
status = result.get('status')
if status == 'completed':
return result
elif status == 'failed':
raise Exception(f"Transcription failed: {result.get('error')}")
print(f"Status: {status} (attempt {attempt + 1}/{max_attempts})")
time.sleep(5)
raise Exception("Transcription timed out")
# Usage
job_data = {"runId": "abc123", "cost": 0.075, "paymentSource": "USD"}
result = wait_for_completion("abc123", job_data)
print(result['transcription'])
async function checkTranscriptionStatus(runId, jobData) {
const response = await fetch('https://api.nano-gpt.com/api/transcribe/status', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
runId: runId,
cost: jobData.cost,
paymentSource: jobData.paymentSource,
isApiRequest: true,
fileName: jobData.fileName,
fileSize: jobData.fileSize,
chargedDuration: jobData.chargedDuration,
diarize: jobData.diarize || false
})
});
return await response.json();
}
async function waitForCompletion(runId, jobData, maxAttempts = 60) {
for (let attempt = 0; attempt < maxAttempts; attempt++) {
const result = await checkTranscriptionStatus(runId, jobData);
const status = result.status;
if (status === 'completed') {
return result;
} else if (status === 'failed') {
throw new Error(`Transcription failed: ${result.error}`);
}
console.log(`Status: ${status} (attempt ${attempt + 1}/${maxAttempts})`);
await new Promise(resolve => setTimeout(resolve, 5000));
}
throw new Error('Transcription timed out');
}
// Usage
const jobData = {runId: "abc123", cost: 0.075, paymentSource: "USD"};
const result = await waitForCompletion("abc123", jobData);
console.log(result.transcription);
# Check status
curl -X POST https://api.nano-gpt.com/api/transcribe/status \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"runId": "abc123def456",
"cost": 0.075,
"paymentSource": "USD",
"isApiRequest": true,
"fileName": "meeting.mp3",
"fileSize": 2345678,
"chargedDuration": 2.5,
"diarize": true
}'
Status Values
pending: Job is queued for processingprocessing: Transcription is in progresscompleted: Transcription finished successfullyfailed: Transcription failed (check error field)
Response Examples
Pending/Processing
{
"status": "processing"
}
Completed
{
"status": "completed",
"transcription": "Speaker 1: Hello everyone. Speaker 2: Hi there!",
"metadata": {
"fileName": "meeting.mp3",
"fileSize": 2345678,
"chargedDuration": 2.5,
"actualDuration": 2.47,
"language": "en",
"cost": 0.075,
"currency": "USD",
"model": "Elevenlabs-STT"
},
"words": [
{
"text": "Hello",
"start": 0.5,
"end": 0.9,
"type": "word",
"speaker_id": "speaker_0"
}
],
"diarization": {
"segments": [
{
"speaker": "Speaker 1",
"text": "Hello everyone",
"start": 0.5,
"end": 1.5
}
]
}
}
Failed
{
"status": "failed",
"error": "Audio file could not be processed"
}
Body
application/json
Status check parameters including runId from the initial transcription request
Response
Transcription status response