Speech-to-Text
curl --request POST \
--url https://api.example.com/api/v2/stt \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"language": "<string>",
"diarize": true
}
'import requests
url = "https://api.example.com/api/v2/stt"
payload = {
"model": "<string>",
"language": "<string>",
"diarize": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', language: '<string>', diarize: true})
};
fetch('https://api.example.com/api/v2/stt', 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.example.com/api/v2/stt",
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([
'model' => '<string>',
'language' => '<string>',
'diarize' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.example.com/api/v2/stt"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.example.com/api/v2/stt")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/stt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}"
response = http.request(request)
puts response.read_bodyGenerations (results)
Speech-to-Text
Transcribe audio files using Whisper, GPT-4o Transcribe, or ElevenLabs Scribe
POST
/
api
/
v2
/
stt
Speech-to-Text
curl --request POST \
--url https://api.example.com/api/v2/stt \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"language": "<string>",
"diarize": true
}
'import requests
url = "https://api.example.com/api/v2/stt"
payload = {
"model": "<string>",
"language": "<string>",
"diarize": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', language: '<string>', diarize: true})
};
fetch('https://api.example.com/api/v2/stt', 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.example.com/api/v2/stt",
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([
'model' => '<string>',
'language' => '<string>',
'diarize' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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.example.com/api/v2/stt"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.example.com/api/v2/stt")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v2/stt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"language\": \"<string>\",\n \"diarize\": true\n}"
response = http.request(request)
puts response.read_bodySTT uses a dedicated multipart endpoint
POST /api/v2/stt, not the standard /generate endpoint.Request
curl -X POST https://elumenta.ru/api/v2/stt \
-H "Authorization: Bearer nb_YOUR_API_KEY" \
-F "audio=@recording.mp3" \
-F "model=whisper" \
-F "language=en"
string
required
Authorization: Bearer nb_YOUR_API_KEYfile
required
Audio file. Supported formats:
mp3, mp4, wav, m4a, ogg, flac, webm. Max size: 25 MB.string
default:"whisper"
STT model slug. See table below.
string
Language code (e.g.
en, ru, es). Optional — auto-detected if omitted.boolean
default:"false"
Speaker diarization. Only supported by
elevenlabs-scribe.Models
| Slug | Provider | Tier | Cost | Notes |
|---|---|---|---|---|
whisper | OpenAI | Starter | 2 tkn | Fast, 99 languages |
gpt-4o-transcribe | OpenAI | Basic+ | 2 tkn | Highest accuracy |
elevenlabs-scribe | ElevenLabs | Basic+ | 2 tkn | Best for meetings, supports diarization |
Response
{
"id": 18510,
"status": "completed",
"model_slug": "whisper",
"result_text": "Hello and welcome to today's episode...",
"tokens_spent": 2,
"processing_ms": 3420
}
Diarization (who said what)
Available only withelevenlabs-scribe:
curl -X POST https://elumenta.ru/api/v2/stt \
-H "Authorization: Bearer nb_YOUR_API_KEY" \
-F "audio=@meeting.mp3" \
-F "model=elevenlabs-scribe" \
-F "diarize=true"
result_text:
[Speaker 1]: Hello, let's start the meeting.
[Speaker 2]: Sure, I have three points to discuss.
Code Examples
import requests
with open("audio.mp3", "rb") as f:
response = requests.post(
"https://elumenta.ru/api/v2/stt",
headers={"Authorization": "Bearer nb_YOUR_API_KEY"},
files={"audio": f},
data={"model": "whisper", "language": "en"}
)
print(response.json()["result_text"])
const form = new FormData();
form.append("audio", audioBlob, "recording.mp3");
form.append("model", "gpt-4o-transcribe");
const res = await fetch("https://elumenta.ru/api/v2/stt", {
method: "POST",
headers: { "Authorization": "Bearer nb_YOUR_API_KEY" },
body: form
});
const data = await res.json();
console.log(data.result_text);
⌘I

