Every voice in the studio, behind one REST endpoint. Send text, get an MP3 back. Works from any language or framework that can make an HTTP request.
Monthly subscription, billed by Stripe. Quota resets each billing cycle. Cancel anytime from the billing portal.
Your API key is shown once right after checkout — store it somewhere safe, and never ship it in front-end code.
Base URL: — authenticate every request with an X-API-Key header.
Converts text to speech. Returns raw MP3 bytes in the response body. Response headers report X-Chars-Used, X-Chars-Remaining, and X-Plan.
# curl
curl -X POST "$BASE/api/v1/tts" \
-H "X-API-Key: nl_api_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hello from Nudge Laboratories","voice":"en-US-AriaNeural","rate":0,"pitch":0}' \
--output speech.mp3
# Python
import requests
r = requests.post(
f"{BASE}/api/v1/tts",
headers={"X-API-Key": "nl_api_YOUR_KEY"},
json={"text": "Hello from Nudge Laboratories", "voice": "en-US-AriaNeural"},
)
if r.ok:
open("speech.mp3", "wb").write(r.content)
print("remaining:", r.headers["X-Chars-Remaining"])
<?php // PHP
$ch = curl_init($base . "/api/v1/tts");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode(["text" => "Hello from Nudge Laboratories", "voice" => "en-US-AriaNeural"]),
CURLOPT_HTTPHEADER => ["X-API-Key: nl_api_YOUR_KEY", "Content-Type: application/json"],
]);
$audio = curl_exec($ch);
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) === 200) file_put_contents("speech.mp3", $audio);
Lists every available voice with its voice_id, locale, and gender. Use the voice_id in TTS requests.
Returns your plan, billing cycle end date, and remaining character quota — poll it before large jobs.
{
"success": true,
"account": { "plan": "api_pro", "billing_cycle_end": "2026-08-06T…" },
"quota": { "chars_limit": 50000000, "chars_used": 120450, "chars_remaining": 49879550 }
}
401 missing/invalid key · 402 quota exceeded · 400 bad request · 502 engine error. All errors return JSON with a detail field.