Delta TTS API
A small HTTP API for private voice cloning and local speech synthesis.
Authentication
Send your anonymous token in Authorization: Bearer YOUR_TOKEN. An explicit header takes precedence over the browser cookie.
Create a voice
curl -X POST https://tts.deltaservers.nl/api/v1/voices \
+-H "Authorization: Bearer YOUR_TOKEN" \
+-F "name=My Voice" -F "language=English" -F "consent=true" \
+-F "reference_text=Exact transcript" -F "reference_audio=@reference.wav"Voice endpoints
GET /api/v1/voicesGET /api/v1/voices/{voice_id}DELETE /api/v1/voices/{voice_id}
Generate speech
curl -X POST https://tts.deltaservers.nl/api/v1/audio/speech \
+ -H "Authorization: Bearer YOUR_TOKEN" \
+ -H "Content-Type: application/json" \
+ -d '{"voice":"voice_xxx","text":"Hello world","format":"mp3"}' \
+ --output speech.mp3POST /api/v1/generate stores audio and returns JSON. POST /api/v1/audio/speech returns the audio bytes directly. The compatibility alias is POST /v1/audio/speech.
JavaScript
const response = await fetch("https://tts.deltaservers.nl/api/v1/audio/speech", {
method: "POST",
headers: { Authorization: "Bearer YOUR_TOKEN", "Content-Type": "application/json" },
body: JSON.stringify({ voice: "voice_xxx", text: "Hello world", format: "mp3" })
});
const audio = await response.arrayBuffer();Python
import requests
r = requests.post("https://tts.deltaservers.nl/api/v1/audio/speech",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={"voice":"voice_xxx", "text":"Hello world", "format":"mp3"})
open("speech.mp3", "wb").write(r.content)Errors
Errors use {"success":false,"error":{"code":"...","message":"..."}}. Common codes: INVALID_TOKEN, VOICE_NOT_FOUND, TEXT_TOO_LONG, QUEUE_FULL, MODEL_UNAVAILABLE, and RATE_LIMITED.