Add natural-sounding AI voices to your applications with our simple REST API. 17 voices, low latency, flexible pricing. Get started in minutes.
100 requests/hour free • No credit card required
New to voiceovers? See how to create text-to-speech audio in the web app first, then integrate with the API.
Simple HTTP endpoints that work with any programming language or platform.
Access all voices via API - American, British, and Australian accents.
Fast response times optimized for real-time applications.
Neural TTS powered by Google Cloud for natural-sounding output.
JSON responses include base64-encoded MP3 ready to decode or save to disk.
Monitor your character usage and API calls in real-time.
Simple REST endpoints to generate speech from text. Works with any language or framework.
/api/ttsGenerate speech from text
{
"text": string, // Required. Text to convert (max 5000 characters per request)
"voice": string, // Required. Voice ID (e.g., "af_heart")
"speed": number // Optional. Speed multiplier (0.5-2.0, default 1.0)
}{
"success": true,
"audio": string, // Base64-encoded audio data
"format": "mp3", // Audio format
"voice": "af_heart", // Voice used
"characters": 13 // Characters processed
}af_heartaf_bellaaf_sarahaf_nicoleaf_emilyam_adamam_michaelam_jamesam_thomasbf_emmabf_isabellabm_georgebm_lewisaus_sophiaaus_graceaus_jackaus_oliver/api/voicesList all available voices
{
"voices": [
{
"id": "af_heart",
"name": "Heart",
"gender": "female",
"accent": "American",
"style": "warm"
},
// ... more voices
]
}curl -X POST https://speaklucid.com/api/tts \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"text": "Hello, world!",
"voice": "af_heart",
"speed": 1.0
}'const response = await fetch('https://speaklucid.com/api/tts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
},
body: JSON.stringify({
text: 'Hello, world!',
voice: 'af_heart',
speed: 1.0
})
});
const { audio, format } = await response.json();
// audio is base64-encoded MP3import requests
import base64
response = requests.post(
'https://speaklucid.com/api/tts',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'text': 'Hello, world!',
'voice': 'af_heart',
'speed': 1.0
}
)
data = response.json()
audio_bytes = base64.b64decode(data['audio'])
with open('output.mp3', 'wb') as f:
f.write(audio_bytes)POST /api/tts requires a signed-in session (browser cookie) or Authorization: Bearer / X-API-Key with an API key from your Dashboard. The main API does not accept unauthenticated calls. On speaklucid.com, guests can try the playground in the browser (1,000 characters) without an API client.
The free tier includes up to 100 API requests per hour and character allowances for signed-in users per the Free plan (see Pricing for current limits). All 17 AI voices are available—ideal for testing and small projects.
Each request can include up to 5,000 characters of input text (aligned with Google Cloud TTS limits). Split longer scripts into multiple requests.
Successful synthesis returns 200 with JSON { success, audio, format, voice, characters }. 400 means bad input (missing text, unknown voice, text too long, speed outside 0.5–2.0). 429 means your account exceeded its character budget for the current period—see upgradeUrl in the response. 503 usually means TTS credentials are not configured on the server.
The API responds to OPTIONS with CORS headers for simple integrations. For production, prefer calling the API from your backend so your app secrets and session handling stay server-side, then stream or deliver audio to clients.
Successful responses include base64-encoded MP3 in the audio field, plus format: "mp3". Decode base64 to bytes and write a .mp3 file or pipe to a player. The web app uses the same synthesis path.
Any language that can send HTTPS POST with JSON works. We document cURL, JavaScript (fetch), and Python (requests); the same contract applies to PHP, Go, Ruby, etc.
Most requests complete in a few seconds depending on length. Latency includes neural synthesis; keep requests reasonably sized for responsive UX.
The API returns 400 with a message listing valid voice IDs. Use GET /api/voices to retrieve names, accents, and IDs before generating.
The documented contract uses plain text plus voice and speed. For advanced SSML or custom lexicons, contact us about enterprise workflows.
Start free and scale as you grow. All plans include full API access.
$0
100/hour requests
5,000/month chars
$9/mo
500/hour requests
100,000/month chars
$29/mo
5,000/hour requests
500,000/month chars
$99/mo
10,000/hour requests
2,000,000/month chars