Eleven Flash v2.5
curl --request POST \
--url https://api.snapgen.org/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "<string>",
"speed": 123,
"language": "<string>",
"stability": 123,
"similarity_boost": 123,
"style": 123,
"use_speaker_boost": true,
"seed": 123,
"previous_text": "<string>",
"next_text": "<string>",
"apply_text_normalization": "<string>"
}
'import requests
url = "https://api.snapgen.org/v1/audio/speech"
payload = {
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "<string>",
"speed": 123,
"language": "<string>",
"stability": 123,
"similarity_boost": 123,
"style": 123,
"use_speaker_boost": True,
"seed": 123,
"previous_text": "<string>",
"next_text": "<string>",
"apply_text_normalization": "<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({
model: '<string>',
input: '<string>',
voice: '<string>',
response_format: '<string>',
speed: 123,
language: '<string>',
stability: 123,
similarity_boost: 123,
style: 123,
use_speaker_boost: true,
seed: 123,
previous_text: '<string>',
next_text: '<string>',
apply_text_normalization: '<string>'
})
};
fetch('https://api.snapgen.org/v1/audio/speech', 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.snapgen.org/v1/audio/speech",
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>',
'input' => '<string>',
'voice' => '<string>',
'response_format' => '<string>',
'speed' => 123,
'language' => '<string>',
'stability' => 123,
'similarity_boost' => 123,
'style' => 123,
'use_speaker_boost' => true,
'seed' => 123,
'previous_text' => '<string>',
'next_text' => '<string>',
'apply_text_normalization' => '<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 := "https://api.snapgen.org/v1/audio/speech"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<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("https://api.snapgen.org/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/audio/speech")
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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyElevenLabs Speech
Eleven Flash v2.5
Low-cost ElevenLabs Flash v2.5 text to speech, up to 40,000 characters per request. $0.09 per 1,000 characters.
POST
/
v1
/
audio
/
speech
Eleven Flash v2.5
curl --request POST \
--url https://api.snapgen.org/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "<string>",
"speed": 123,
"language": "<string>",
"stability": 123,
"similarity_boost": 123,
"style": 123,
"use_speaker_boost": true,
"seed": 123,
"previous_text": "<string>",
"next_text": "<string>",
"apply_text_normalization": "<string>"
}
'import requests
url = "https://api.snapgen.org/v1/audio/speech"
payload = {
"model": "<string>",
"input": "<string>",
"voice": "<string>",
"response_format": "<string>",
"speed": 123,
"language": "<string>",
"stability": 123,
"similarity_boost": 123,
"style": 123,
"use_speaker_boost": True,
"seed": 123,
"previous_text": "<string>",
"next_text": "<string>",
"apply_text_normalization": "<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({
model: '<string>',
input: '<string>',
voice: '<string>',
response_format: '<string>',
speed: 123,
language: '<string>',
stability: 123,
similarity_boost: 123,
style: 123,
use_speaker_boost: true,
seed: 123,
previous_text: '<string>',
next_text: '<string>',
apply_text_normalization: '<string>'
})
};
fetch('https://api.snapgen.org/v1/audio/speech', 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.snapgen.org/v1/audio/speech",
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>',
'input' => '<string>',
'voice' => '<string>',
'response_format' => '<string>',
'speed' => 123,
'language' => '<string>',
'stability' => 123,
'similarity_boost' => 123,
'style' => 123,
'use_speaker_boost' => true,
'seed' => 123,
'previous_text' => '<string>',
'next_text' => '<string>',
'apply_text_normalization' => '<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 := "https://api.snapgen.org/v1/audio/speech"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<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("https://api.snapgen.org/v1/audio/speech")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.snapgen.org/v1/audio/speech")
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 \"model\": \"<string>\",\n \"input\": \"<string>\",\n \"voice\": \"<string>\",\n \"response_format\": \"<string>\",\n \"speed\": 123,\n \"language\": \"<string>\",\n \"stability\": 123,\n \"similarity_boost\": 123,\n \"style\": 123,\n \"use_speaker_boost\": true,\n \"seed\": 123,\n \"previous_text\": \"<string>\",\n \"next_text\": \"<string>\",\n \"apply_text_normalization\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyeleven-flash-v2.5 runs ElevenLabs Flash v2.5 text to speech. It costs half as much per character as the other speech models and accepts the most text: up to 40,000 characters per request.
| Property | Value |
|---|---|
| Model ID | eleven-flash-v2.5 |
| Endpoint | POST /v1/audio/speech |
| Output | Audio bytes: MP3 (default), Opus, PCM, or WAV |
| Limits | Up to 40,000 characters per request |
| Billed on | Characters of input |
| Price | $0.09 per 1,000 characters (9 credits) |
The text to speak, up to 40,000 characters for this model. Newlines are allowed; blank text and other control characters are rejected. Each character is billed.
A voice ID or first name from the voice list, for example
JBFqnCBsd6RMkjVDRZzb or George. Names are case-insensitive.mp3, opus, pcm, or wav. See Output formats.An ISO 639 language code of two or three lowercase letters, such as
en or de. The provider rejects a code the model doesn’t support.From
0 to 1. Lower values give a broader emotional range; higher values sound more consistent.From
0 to 4294967295. Makes repeated requests more repeatable, without guaranteeing identical audio.Request
curl https://api.snapgen.org/v1/audio/speech \
-H "Authorization: Bearer $SNAPGEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "eleven-flash-v2.5",
"input": "Welcome back! Today we explore the northern lights.",
"voice": "JBFqnCBsd6RMkjVDRZzb",
"response_format": "mp3"
}' \
--output speech.mp3
Content-Type that matches response_format.
Price examples
| Text | Price |
|---|---|
| 100 characters | $0.009 |
| 1,000 characters | $0.09 |
| 40,000 characters | $3.60 |
Synchronous audio endpoints reject
Idempotency-Key. If a request times out, check your Console request logs before you retry.
See Text to speech for every field, the response, and errors.