Text to speech API
Send text, get one audio file back: 50 natural voices in English and Spanish, French, Chinese, Japanese and Korean too, or a low-cost English voice at $0.02 per 1,000 characters. ElevenLabs- and OpenAI-compatible.
- Up to 2,000 characters as one MP3 in a single call; longer text in several calls
- Natural voices (Deepgram Aura-2): 40 English and 10 Spanish, pick by name; French, Chinese, Japanese and Korean with MeloTTS (one voice each, up to 1,200 characters)
- Low-cost English voices (Aura-1) with text-to-speech/lite: $0.04 for up to 2,000 characters
- Drop-in for existing code: POST /v1/text-to-speech/{voice_id} (ElevenLabs shape; premade voice IDs map to a similar voice) and POST /v1/audio/speech (OpenAI shape)
No account to create. Failed calls are never charged.
Try it free, right here
Runs in your browser with open models, so it is free and unlimited and nothing is uploaded. The API below does the same job on our servers for your app.
15 more voices
First play fetches the voice once (about 90 MB), then it starts in seconds.
Fix one sentence without redoing the rest
The first time, your browser fetches the listening model once; after that it starts straight away.
One request
curl -H "Authorization: Bearer $API_KEY" \
"https://lex.glyphcall.com/text-to-speech?text=Your%20order%20has%20shipped.%20It%20leaves%20our%20warehouse%20today%20and%20should%20reach%20you%20within%20three%20working%20days.%20You%20can%20follow%20the%20parcel%20with%20the%20link%20in%20your%20confirmation%20e-mail."
Python
import os, requests
r = requests.get(
"https://lex.glyphcall.com/text-to-speech",
params={
"text": "Your order has shipped. It leaves our warehouse today and should reach you within three working days. You can follow the parcel with the link in your confirmation e-mail.",
},
headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())
Node.js
const params = new URLSearchParams({
text: "Your order has shipped. It leaves our warehouse today and should reach you within three working days. You can follow the parcel with the link in your confirmation e-mail.",
});
const r = await fetch(`https://lex.glyphcall.com/text-to-speech?${params}`, {
headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());
The answer
{
"contentType": "audio/mpeg",
"audioBase64": "SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjYwLjMuMTAwAAAA…",
"bytes": 187392,
"lang": "en",
"voice": "luna",
"characters": 168,
"parts": 1,
"model": "@cf/deepgram/aura-2-en"
}
Pricing
One API key, paid by card through Stripe. $0.08 per successful call with a key; failed calls cost nothing.
A plan adds its credits each month when the payment succeeds; unused credits stay, and you can cancel at any time. Packs never expire. After paying you get your key on the next page. The same key works on every tool in the catalog. Details: credits and plans.
Inputs
| Name | Type | Description |
|---|---|---|
text (required) | string | Text to speak, up to 2,000 characters (1,200 in fr, zh, ja and ko) |
lang | string | Language: en or es (Aura-2 MP3, many voices), fr, zh, ja or ko (MeloTTS WAV, one voice each); default en |
voice | string | Voice name. English: amalthea, andromeda, apollo, arcas, aries, asteria, athena, atlas, aurora, callista, cora, cordelia, delia, draco, electra, harmonia, helena, hera, hermes, hyperion, iris, janus, juno, jupiter, luna, mars, minerva, neptune, odysseus, ophelia, orion, orpheus, pandora, phoebe, pluto, saturn, thalia, theia, vesta, zeus. Spanish: sirio, nestor, carina, celeste, alvaro, diana, aquila, selena, estrella, javier. Default: luna (en), aquila (es) |
format | string | Audio format: mp3 (default), wav, pcm (raw 16-bit little-endian mono), ulaw or alaw (8 kHz telephony, e.g. Twilio), opus (Ogg) or flac. opus and flac only for text spoken in one part (up to 450 characters) |
sample_rate | string | Sample rate in Hz for wav and pcm (8000, 16000, 24000 default, 32000, 48000) or ulaw/alaw (8000 default, 16000) |
pronunciations | string | How to say words: JSON {"Nginx":"engine x","GIF":"jif"} or Nginx=engine x, GIF=jif (up to 50, whole words, any case) |
What it does not do
- Six languages: English, Spanish, French, Chinese, Japanese and Korean; no German yet. The low-cost voices are English only.
- MP3 in English and Spanish, WAV in the other four; no streaming in parts, no voice cloning.
Also on the same key
- Cheap text to speech: up to 2,000 characters in English as one MP3 · $0.04 a call
- Text to speech (TTS): natural voices, audio file · $0.01 a call
Questions
Can I keep my ElevenLabs or OpenAI code?
Yes. POST /v1/text-to-speech/{voice_id} takes ElevenLabs' request (text, model_id, output_format mp3_*), and ElevenLabs' premade voice IDs and names map to one of our voices of the same kind; the X-Voice header names it. The voice list, model list and key check ElevenLabs apps read on setup (GET /v1/voices, /v1/models, /v1/user) answer too. POST /v1/audio/speech takes OpenAI's request and voice names. Answers are MP3 by default; WAV, raw PCM, 8 kHz mu-law or A-law for phone lines (Twilio), Opus and FLAC on request, and a pronunciations list ({"Nginx":"engine x"}) says how to read names.
What does it cost?
Up to 300 characters with a natural voice: $0.01 (ai/speech). Up to 2,000: $0.08 (text-to-speech). Up to 2,000 with the low-cost voice: $0.04 (text-to-speech/lite). Failed calls are never charged.
Can I clone a voice?
No. The voices are the models' own; no one's voice is copied.
Is there a subscription?
There is a monthly plan and there are one-off credit packs. Both give one API key; a plan adds credits each month and unused credits stay.
Guides
For AI agents
The same tool is on the MCP server https://lex.glyphcall.com/mcp (the first 25 successful calls are free), and an agent with a wallet can pay per call in USDC: the tool URL answers 402 Payment Required with x402 and MPP terms. Reference: tool page · OpenAPI · docs for agents.