/

Inyandiko

Integrate TTS.ai into your applications with our REST API. OpenAI-compatible format for easy migration.

API Gufungura Amabwiriza Gushigikira

Incamake

TTS.ai Kuri Byose Ibiranga: Umwandiko - Kuri -, - Kuri - Umwandiko,,, na Birenzeho. Bisanzwe Na: Kubaza... /.

Urufunguzo

Urufunguzo Bivuye Amagenamiterere y'inyandiko. ku Byose, Kigenga Konti:.

SHINGIRO

https://api.tts.ai/v1/

Gushigikira

Biturutse Authorization Umutwempangano

Kwemeza

Urufunguzo Bya ngombwa Kuri /v1/tts/ work without any auth, up to 5,000 characters/day per IP, using any of our free models (piper, vits, melotts, kokoro). Hejuru ya: A Kigenga Konti: Kuri Kubona 15,000 Inyuguti na Kuri.

Uduciro Udushushondanga na Birenzeho Umubare, Na: A in i Authorization Umutwempangano.

Umutwempangano
Authorization: Bearer sk-tts-your-api-key-here
Urufunguzo Do not share it in client-side code, public repositories, or logs. Rotate keys regularly from your account settings.

SDKs

Official SDKs make it easy to integrate TTS.ai into your application. Both are open source and available on GitHub.

Python

pip install ttsai
from tts_ai import TTSClient

client = TTSClient(api_key="sk-tts-...")
audio = client.generate(
    text="Hello world!",
    model="kokoro"
)
client.save(audio, "output.wav")
GitHub

JavaScript / Node.js

npm install @ttsainpm/ttsai
const { TTSClient } = require('@ttsainpm/ttsai');

const client = new TTSClient({
  apiKey: 'sk-tts-...'
});
const audio = await client.generate({
  input: 'Hello world!',
  model: 'kokoro'
});
await client.saveToFile(audio, 'output.wav');
GitHub

SHINGIRO

SHINGIRO: https://api.tts.ai/v1/

Impera: Bifitanye isano Kuri iyi SHINGIRO. Urugero:, i Impera: ni:

POST https://api.tts.ai/v1/tts/

Amabwiriza

Umubare Bya Imibare ku

Imiterere y'ishusho min Gushyiraho Uburebure bw'umwandiko
Kigenga 10 2 500 chars
Gutangira 30 3 1,000,000 chars
Igihe kya karere 60 5 1,000,000 chars
Urwego 300 20 50,000 chars

Imitwe in buri: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Inguzanyo

Serivisi Igiciro Igice
TTS (Imodeli zitishyurwa: Piper, VITS, MeloTTS) 1,000 characters per 1,000 characters
TTS (Imodeli zisanzwe: Kokoro, CosyVoice 2, n'izindi.) 2,000 characters per 1,000 characters
TTS (Imodeli z'icyo cyiciro cy'ibanze: Tortoise, Chatterbox, n'izindi.) 4,000 characters per 1,000 characters
Kuri Umwandiko 1,000 characters Bya
Guca umurongo 1,000 to 4,000 characters, the cloning model's text to speech rate per 1,000 characters
Umwanyabikoresho 3,000 characters Bya
Ihindurangero 1,000 characters Bya
/ 5,000 characters kugirango Idosiye
Umwandiko wahinduwe ururimi 3,000 characters Bya
Amagambo banga Kigenga --
Urufunguzo Kigenga --
Umwanditsi w'amajwi Kigenga --

Umwandiko Kuri

POST /v1/tts/

Umwandiko Kuri. Ijwi Idosiye in i Imiterere.

Umubiri

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
model string Oya Model ID (e.g., kokoro, chatterbox, piper). If omitted, we auto-pick a model that supports the requested language: kokoro for en/ja/zh/ko/fr/de/it/pt/es/hi/ru, piper for other supported languages (ar/pl/nl/cs/da/fi/el/hu/tr/uk/vi/etc.).
text string Oya Text to convert to speech. Per-request cap: 500 chars (anonymous), 5,000 (free account), 1,000,000 (paid plan). Long inputs are auto-chunked server-side.
voice string Oya Gukoresha Inyandikoporogaramu Inyandikoporogaramu Kuri Urutonde Bihari
format string Oya Ibisohoka Imiterere Inyandikoporogaramu Inyandikoporogaramu Mburabuzi Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
speed float Oya Umuvuduko Inyandikoporogaramu 1. 0 Inyandikoporogaramu 0. 5 Inyandikoporogaramu Kuri Inyandikoporogaramu 2. 0 Inyandikoporogaramu
language string Oya Inyandikoporogaramu (& eg; Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu NIBA
instructions string Oya Acting / delivery cues (≤500 chars). e.g. "say it sarcastically, slowing down at the end". Honored by Qwen3-TTS today; check /v1/speech/models/ for the up-to-date list. Response carries instructions_supported and instructions_applied so you can detect silent drops.
pronunciations object | array Oya {
stream boolean Oya Inyandikoporogaramu Sibyo Inyandikoporogaramu

Urugero

cURL
curl -X POST https://api.tts.ai/v1/tts/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kokoro",
    "text": "Hello from TTS.ai! This is a test.",
    "voice": "af_bella",
    "format": "mp3"
  }' \
  --output output.mp3

Wrap numbers, dates, currency, phone numbers, and acronyms in <say-as interpret-as="..."> tags so the model speaks them naturally instead of guessing.

GusobanuraIyinjizaNka
cardinal1234one thousand two hundred thirty-four
ordinal21twenty-first
date1999-12-31,
time14:30two thirty PM
telephone+1-555-867-5309plus one five five five eight six seven…
currency$1,234.56one thousand two hundred thirty-four dollars and fifty-six cents
spell-outNASAN A S A

Itariki Imiterere Mburabuzi Kuri Inyandikoporogaramu kugirango Na Inyandikoporogaramu Na: Inyandikoporogaramu Imiterere =

Urugero
{
  "model": "kokoro",
  "voice": "af_bella",
  "text": "Your appointment is on <say-as interpret-as=\"date\">2026-04-26</say-as> at <say-as interpret-as=\"time\">14:30</say-as>. Please call <say-as interpret-as=\"telephone\">+1-555-867-5309</say-as> if you need to reschedule."
}

Igisubizo

The TTS endpoint queues your request and returns a JSON response with a job UUID. You then poll for the result.

Step 1: Submit request

Response (JSON)
{
  "uuid": "77b71db532874ce98e84a69a2d740d4c",
  "job_id": "f21316bb-aefa-480d-8523-701d1e3184ce",
  "status": "queued",
  "credits_used": 11,
  "credits_remaining": 15000
}

Step 2: Poll for result

GET /v1/speech/results/?uuid=<job_uuid>

Poll this endpoint every 1-2 seconds until status is completed or failed.

Polling response (completed)
{
  "status": "completed",
  "result_url": "https://api.tts.ai/static/downloads/77b71db5.../output.mp3"
}
Polling response (still processing)
{
  "status": "processing"
}

Step 3: Download audio

Fetch the result_url from the completed response to download the audio file.

Urugero

Python
import requests, time

API_KEY = "sk-tts-your-key"
BASE = "https://api.tts.ai"

# 1. Submit TTS request
resp = requests.post(f"{BASE}/v1/tts/", json={
    "model": "kokoro",
    "text": "Hello from TTS.ai!",
    "voice": "af_bella"
}, headers={"Authorization": f"Bearer {API_KEY}"})
data = resp.json()
uuid = data["uuid"]

# 2. Poll for result
while True:
    result = requests.get(f"{BASE}/v1/speech/results/",
        params={"uuid": uuid}).json()
    if result["status"] == "completed":
        # 3. Download audio
        audio = requests.get(result["result_url"])
        with open("output.mp3", "wb") as f:
            f.write(audio.content)
        break
    elif result["status"] == "failed":
        raise Exception(result.get("error", "Generation failed"))
    time.sleep(1.5)

Streaming alternative: For supported models (Kokoro, MeloTTS), use POST /v1/tts/stream/ for real-time Server-Sent Events (SSE) streaming. No polling needed.

Kuri Umwandiko

POST /v1/stt/

Inyumvo Kuri Umwandiko. Na: Ikiyega -.

Umubiri (multipart/form-data)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
file file Oya IDOSIYE,
model string Oya STT model: whisper (default), faster-whisper, sensevoice
language string Oya Inyandikoporogaramu Inyandikoporogaramu mu buryo bwikora: kugirango Mu buryo bwikora: Mburabuzi
timestamps boolean Oya Inyandikoporogaramu Sibyo
diarize boolean Oya Inyandikoporogaramu Sibyo

Igisubizo

< guimenuitem >
{
  "text": "Hello, this is a transcription test.",
  "language": "en",
  "duration": 3.5,
  "segments": [
    {
      "start": 0.0,
      "end": 1.8,
      "text": "Hello, this is",
      "speaker": "SPEAKER_00"
    },
    {
      "start": 1.8,
      "end": 3.5,
      "text": "a transcription test.",
      "speaker": "SPEAKER_00"
    }
  ]
}

Guca umurongo

POST /v1/voice-clone/

in A Ijwi. A Indango na Umwandiko.

Umubiri (multipart/form-data)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
reference_audio file Oya Reference voice audio (10-30 seconds recommended). Max 20MB.
text string Oya Kuri in i
model string Oya Clone model: chatterbox (default), cosyvoice2, gpt-sovits
format string Oya Ibisohoka Imiterere Inyandikoporogaramu Inyandikoporogaramu Mburabuzi Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
language string Oya Ururimi: Inyandikoporogaramu. ku i Urugero:.

Igisubizo

i Ijwi Idosiye Nka Ibyatanzwe, Nka i Impera Akadomo.

Umwanyabikoresho

POST /v1/voice-convert/

Ijwi Kuri Ijwi Nka A Inkomoko Ijwi na Hitamo... A Intego Ijwi.

Umubiri (multipart/form-data)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
file file Oya Ijwi IDOSIYE
target_voice string Oya Kuri Guhindura... Kuri Koresha Inyandikoporogaramu Inyandikoporogaramu Kuri Urutonde Bihari
model string Oya Ihindurangero Urugero Inyandikoporogaramu Mburabuzi Inyandikoporogaramu -
format string Oya Ibisohoka Imiterere IDOSIYE IDOSIYE Mburabuzi IDOSIYE

Urugero

cURL
curl -X POST https://api.tts.ai/v1/voice-convert/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -F "file=@source_audio.mp3" \
  -F "target_voice=af_bella" \
  -F "model=openvoice" \
  -o converted.wav

Igisubizo

i Idosiye Nka Ibyatanzwe.

Umwandiko wahinduwe ururimi

POST /v1/speech-translate/

Translate spoken audio from one language to another. Combines speech-to-text, translation, and text-to-speech in a single call.

Umubiri (multipart/form-data)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
file file Oya Ijwi IDOSIYE in i Mburabuzi Ururimi:
target_language string Oya Ururimi: Inyandikoporogaramu
voice string Oya kugirango Ibisohoka Byahiswemo NIBA
preserve_voice boolean Oya Kuri i Mburabuzi Ijwi Inyandikoporogaramu Sibyo Inyandikoporogaramu

Igisubizo

< guimenuitem >
{
  "original_text": "Hello, how are you?",
  "translated_text": "Hola, como estas?",
  "source_language": "en",
  "target_language": "es",
  "audio_url": "https://api.tts.ai/v1/results/translate_abc123.mp3",
  "credits_used": 5
}

Kuri

POST /v1/speech-to-speech/

Imisusire,, Cyangwa i Ibigize. ya:,, na.

Umubiri (multipart/form-data)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
file file Oya Ijwi IDOSIYE
voice string Oya kugirango i Ibisohoka
model string Oya Inyandikoporogaramu Inyandikoporogaramu Mburabuzi Inyandikoporogaramu Inyandikoporogaramu
emotion string Oya Inyandikoporogaramu
speed float Oya Inyandikoporogaramu 1. 0 Inyandikoporogaramu 0. 5 Inyandikoporogaramu Kuri Inyandikoporogaramu 2. 0 Inyandikoporogaramu

Igisubizo

i Ijwi Idosiye Nka Ibyatanzwe.

Ibikoresho by'amajwi

Impera Utudomo ya:, Gukuraho..., na Birenzeho.

POST /v1/audio/enhance/

Ubuziranenge:, Imikemurire, Imikemurire

file fileIDOSIYE Kuri
denoise booleanMburabuzi nibyo
enhance_clarity booleanMburabuzi: NIBYO
super_resolution booleanUbuziranenge Mburabuzi Sibyo
strength integer1. 3. (Kiremire, Gitoya,). 2.
POST /v1/audio/separate/

Kuva: (Isiba) Cyangwa Gutandukanya.

file fileIDOSIYE Kuri Gutandukanya
model stringdemucs (Mburabuzi) Cyangwa spleeter
stems integerBya 2. 4. 5. Cyangwa 6. Mburabuzi 2.
format stringIbisohoka Imiterere Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
POST /v1/audio/dereverb/

Na Bivuye

file fileIDOSIYE Kuri
type stringecho or reverb (default: both)
intensity integer1-5 (default: 3)
POST /v1/audio/analyze/ Kigenga

Kuri Urufunguzo, na Igihe Isinya

file fileIDOSIYE Kuri
Igisubizo
{
  "key": "C",
  "scale": "Major",
  "bpm": 120.0,
  "time_signature": "4/4",
  "camelot": "8B",
  "compatible_keys": ["C Major", "G Major", "F Major", "A Minor"]
}
POST /v1/audio/convert/ Kigenga

hagati Imiterere

file fileIDOSIYE Kuri Guhindura
format stringImiterere Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
bitrate integerIbisohoka in
sample_rate integerSample rate: 22050, 44100, 48000
channels stringmono Cyangwa stereo

Amagambo banga

POST /v1/voice-chat/

Cyangwa Umwandiko na Akira Na:.

Umubiri (multipart/form-data Cyangwa JSON)

IbigengaUbwoko bw'agakandishoBya ngombwaIsobanuramiterere
audio file Oya* Iyinjiza IDOSIYE IDOSIYE Cyangwa IDOSIYE Umwandiko IDOSIYE Bya ngombwa
text string Oya* Iyinjiza Idosiye Idosiye Cyangwa Idosiye Umwandiko Idosiye Bya ngombwa
voice string Oya kugirango Inyandikoporogaramu
tts_model string Oya Urugero kugirango Inyandikoporogaramu Inyandikoporogaramu
system_prompt string Oya Sisitemu kugirango i
conversation_id string Oya a

Igisubizo

< guimenuitem >
{
  "conversation_id": "conv_abc123",
  "user_text": "What is the capital of France?",
  "ai_text": "The capital of France is Paris.",
  "audio_url": "https://api.tts.ai/v1/audio/tmp/resp_xyz.mp3",
  "credits_used": 3
}

Itsinda

POST /v1/tts/batch/

Igikubo Umwandiko ya:. Akira A Ryari: Byose Ibikorwa Byuzuye.

Ibigenga

IbigengaUbwoko bw'agakandishoIsobanuramiterere
textsarrayArray of objects: {text, model, voice}. Max 50 items.
webhook_urlstringKuri Ibisubizo Ryari:

Igisubizo

< guimenuitem >
{
  "batch_id": "abc123",
  "total": 3,
  "completed": 0,
  "status": "processing"
}

Impinduka Na: v1. tts. Itsinda Igisubizo? batch_id =

Gushyiramo

POST https://tts.ai/api/v1/voice-embed/
Note: this endpoint lives on the main site host, not on the api.tts.ai base URL used by the rest of this page. Call it at https://tts.ai/api/v1/voice-embed/ with the same Bearer key.

A Ijwi Kuva: Indango Ijwin Ijwi ya: -.

Ibigenga

IbigengaUbwoko bw'agakandishoIsobanuramiterere
filefileReference audio file (WAV, MP3, FLAC).
modelstringCloning model (default: chatterbox). Supported: chatterbox, cosyvoice2, openvoice, gpt-sovits, spark, indextts2, qwen3-tts.

Igisubizo

< guimenuitem >
{
  "embed_id": "emb_abc123",
  "model": "chatterbox",
  "duration_ms": 450
}

Byabonetse

GET https://tts.ai/api/v1/user-voices/
Note: this endpoint lives on the main site host, not on the api.tts.ai base URL used by the rest of this page.

i Kuri Konti:, i Nka i ya:, na i Indango. () Kuri Kurema A na? = Kuri Gukuraho Rimwe.

Igisubizo

< guimenuitem >
{
  "voices": [
    {
      "public_id": "uv_30d109336d05",
      "name": "My Voice",
      "model_name": "chatterbox",
      "voice_id": "",
      "preview_url": "https://tts.ai/media/user-voices/....wav",
      "reference_audio_url": "https://tts.ai/media/user-voices/....wav",
      "storage_status": "active"
    }
  ],
  "quota": { "setup_chars": 500, "per_use_chars": 50 }
}

Saved voices are also selectable in the Voice Cloning tool, the AI Podcast Generator host pickers, and the Multi-Voice per-speaker pickers.

Kugenzura...

GET /v1/health/

Seriveri Imimerere, Na Umurongo Ingano kugirango amasogonda

Igisubizo

< guimenuitem >
{
  "status": "online",
  "latency_ms": 45,
  "queue_size": 3,
  "models_loaded": ["kokoro", "chatterbox", "cosyvoice2"]
}

Urutonde Urugero

GET /v1/models/

A Urutonde Bya Byose Bihari Na:.

Igisubizo

< guimenuitem >
{
  "models": [
    {
      "id": "kokoro",
      "name": "Kokoro",
      "type": "tts",
      "tier": "standard",
      "languages": ["en", "ja", "ko", "zh", "fr"],
      "supports_cloning": false,
      "supports_streaming": true,
      "credits_per_1k_chars": 2
    },
    {
      "id": "chatterbox",
      "name": "Chatterbox",
      "type": "tts",
      "tier": "premium",
      "languages": ["en"],
      "supports_cloning": true,
      "supports_streaming": true,
      "credits_per_1k_chars": 4
    }
  ]
}

Gushyira ku rutonde

GET /v1/voices/

A Urutonde Bya Byose Bihari, ku Urugero: Cyangwa Ururimi:.

Ikintu

IbigengaUbwoko bw'agakandishoIsobanuramiterere
model string ku Urugero IDOSIYE
language string ku Ururimi Inyandikoporogaramu
gender string ku Imiterere Inyandikoporogaramu Umugabo Inyandikoporogaramu Umugore Inyandikoporogaramu Inyandikoporogaramu

Igisubizo

< guimenuitem >
{
  "voices": [
    {
      "id": "af_bella",
      "name": "Bella",
      "model": "kokoro",
      "language": "en",
      "gender": "female",
      "preview_url": "https://api.tts.ai/v1/voices/preview/af_bella.mp3"
    }
  ],
  "total": 142
}

(SRT /) Gishya

GET /v1/speech/subtitles/?uuid=<job_uuid>&format=srt|vtt&download=1

ya: Icyo ari cyo cyose Byuzuye Ibikorwa:. Itondekanya KURI i na Cyangwa. ni ku Disiki% 1 A ISEGONDA Ahamagara: ya: i ni A Disiki% 1 Soma.

Ikintu

IbigengaBya ngombwaIsobanuramiterere
uuidOyaku Cyangwa
formatOyaInyandikoporogaramu Inyandikoporogaramu Mburabuzi Cyangwa Inyandikoporogaramu Inyandikoporogaramu
downloadOyaInyandikoporogaramu 1. Kuri Kohereza Inyandikoporogaramu Umugereka i Mucukumbuzi
languageOyaHint to the alignment model (auto-detected if omitted).
cURL
curl "https://api.tts.ai/v1/speech/subtitles/?uuid=$UUID&format=srt&download=1" -o subtitles.srt

Inkoranyamagambo y' ururimi Gishya

GET POST DELETE /api/v1/pronunciations/

i Kuri Amagambo. Ibyinjijwe mu buryo bwikora: - Gushyiraho Kuri Kubaza... Ubwoko. - Icyinjijwe - Konti: Impera:.

Umubiri (POST)

IbigengaUbwoko bw'agakandishoIsobanuramiterere
wordstringKuri Gusimbuza Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
replacementstringKuri kugirango i Urugero Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu Inyandikoporogaramu
languagestringInyandikoporogaramu. = Kuri Byose Ururimi:.
case_sensitivebooleanInyandikoporogaramu Sibyo Inyandikoporogaramu. Inyandikoporogaramu NIBYO Inyandikoporogaramu
cURL
# Save an entry
curl -X POST https://tts.ai/api/v1/pronunciations/ \
  -H "Authorization: Bearer sk-tts-..." \
  -H "Content-Type: application/json" \
  -d '{"word": "GIF", "replacement": "jiff"}'

# List your entries
curl https://tts.ai/api/v1/pronunciations/ -H "Authorization: Bearer sk-tts-..."

# Delete entry by id
curl -X DELETE "https://tts.ai/api/v1/pronunciations/?id=42" -H "Authorization: Bearer sk-tts-..."

You can also pass per-request overrides without saving them: include pronunciations on any /v1/tts/ call as either an object or an array (see the TTS endpoint params).

Ingingo Gishya

Drop a single script tag on any article page and visitors get a fixed reader bar that narrates the page on click. Auto-detects the article body, supports custom voice / model / position / accent color.

HTML
<script src="https://tts.ai/narrator.js"
    data-pk="pk-tts-your-publishable-key"
    data-voice="af_bella"
    data-model="kokoro"
    data-extract="auto"
    data-position="bottom"
    data-color="#e60000"
    data-locale="en"></script>

Amahitamo y' Ipaji

IbigengaIsobanuramiterere
data-pkPublishable key (pk-tts-…). Domain restrictions enforced via the key's allowed_domains field.
data-voiceInyandikoporogaramu
data-modelUrugero Inyandikoporogaramu Inyandikoporogaramu
data-extractauto (default): tries article/main/.post-content/.entry-content selectors, falls back to densest paragraph cluster. Or pass any CSS selector to target a specific element.
data-positionInyandikoporogaramu Hasi: Inyandikoporogaramu Mburabuzi Cyangwa Inyandikoporogaramu Hejuru: Inyandikoporogaramu
data-colorAccent color (any CSS color). Default #e60000.
data-min-chars / data-max-charsSkip the bar if the article is shorter than min-chars (default 200). Cap input at max-chars (default 50,000).

ku A

Ikintu

Inline button-style embed. Renders next to its script tag and plays a button-triggered short snippet. Different shape from the Article Narrator above (which auto-injects a page-spanning bar and narrates the whole article).

HTML
<script src="https://tts.ai/widget.js"
    data-voice="af_bella"
    data-model="kokoro"
    data-style="full"
    data-theme="light"></script>

()

Upload a reference audio once, get back a persistent voice_id, then reference that id in TTS requests instead of re-uploading audio every call. Ideal for high-volume integrations.

Itangira... Storage is free (no daily rent, no slot cap). Upload fee: 500 characters one-time per voice. Per-use surcharge: +50 characters added to each TTS generation that references the saved voice, on top of the normal generation cost. Archive voices you don't need right now to keep them dormant; reactivate any time. Both are free API calls.

a

POST https://tts.ai/api/v1/user-voices/ Bya ngombwa

Multipart form. Fields: file (required, 5-30s audio), name (required), language (optional, default en), model (optional; if omitted, paid accounts get chatterbox for English, cosyvoice2 for zh/ja/ko and openvoice for other languages), consent_confirmed (required, any truthy value).

curl -X POST https://tts.ai/api/v1/user-voices/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -F "file=@reference.wav" \
  -F "name=My Narrator" \
  -F "language=en" \
  -F "consent_confirmed=true"

# Response:
{
  "public_id": "uv_a1b2c3d4e5f6",
  "id": 42,
  "name": "My Narrator",
  "model_name": "chatterbox",
  "language": "en",
  "reference_audio_url": "https://tts.ai/media/user-voices/....wav",
  "storage_status": "active",
  "created_at": "2026-04-17T03:45:00+00:00"
}

i Ijwi in

Kuri / / v1 / / (Igisobanuro: Urubuga Inturo:, OYA.. ai) Na: Umukoresha. Ibirimo na Inzira: Kuri i.

curl -X POST https://tts.ai/api/v1/tts/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello from my saved voice","user_voice_id":"uv_a1b2c3d4e5f6"}'

# Returns a queued job: poll /v1/speech/results/?uuid=... for the audio URL.

Gusiba

GET    https://tts.ai/api/v1/user-voices/           # list your saved voices + quota info
DELETE https://tts.ai/api/v1/user-voices/?public_id=uv_a1b2c3d4e5f6

/ Kureka bigakora (Kigenga)

in Konti: OYA Byakoreshejwe in ya: Impera Abakoresha Urutonde

POST https://tts.ai/api/v1/user-voices/uv_a1b2c3d4e5f6/archive/
POST https://tts.ai/api/v1/user-voices/uv_a1b2c3d4e5f6/reactivate/

a Kigenga

A Kuri Urugero:. ni. Kitazwi Urugero: ni Na: i Urutonde Bya Byemewe.

curl -X POST https://tts.ai/api/v1/user-voices/uv_a1b2c3d4e5f6/model/ \
  -H "Authorization: Bearer sk-tts-..." -H "Content-Type: application/json" \
  -d '{"model": "chatterbox"}'

Inyandikoporogaramu

Umwandiko Kuri

-
import requests

API_KEY = "sk-tts-your-key"

# Text to Speech
response = requests.post(
    "https://api.tts.ai/v1/tts/",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "model": "kokoro",
        "text": "Hello from TTS.ai!",
        "voice": "af_bella",
        "format": "mp3"
    }
)

with open("output.mp3", "wb") as f:
    f.write(response.content)

print(f"Credits used: {response.headers.get('X-Credits-Used')}")

Kuri Umwandiko

-
# Speech to Text
with open("recording.mp3", "rb") as f:
    response = requests.post(
        "https://api.tts.ai/v1/stt/",
        headers={"Authorization": f"Bearer {API_KEY}"},
        files={"file": f},
        data={"model": "faster-whisper", "timestamps": "true"}
    )

result = response.json()
print(result["text"])

Guca umurongo

-
# Voice Cloning
with open("reference.wav", "rb") as ref:
    response = requests.post(
        "https://api.tts.ai/v1/voice-clone/",
        headers={"Authorization": f"Bearer {API_KEY}"},
        files={"reference_audio": ref},
        data={
            "text": "This speech uses a cloned voice.",
            "model": "chatterbox"
        }
    )

with open("cloned_output.mp3", "wb") as f:
    f.write(response.content)

Umwandiko Kuri

Kuzana
const API_KEY = 'sk-tts-your-key';

// Text to Speech
const response = await fetch('https://api.tts.ai/v1/tts/', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'kokoro',
    text: 'Hello from TTS.ai!',
    voice: 'af_bella',
    format: 'mp3'
  })
});

const audioBlob = await response.blob();
const audioUrl = URL.createObjectURL(audioBlob);
const audio = new Audio(audioUrl);
audio.play();

Kuri Umwandiko

Kuzana
// Speech to Text
const formData = new FormData();
formData.append('file', audioFile);
formData.append('model', 'faster-whisper');

const response = await fetch('https://api.tts.ai/v1/stt/', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${API_KEY}` },
  body: formData
});

const result = await response.json();
console.log(result.text);

Umwandiko Kuri

cURL
# Text to Speech
curl -X POST https://api.tts.ai/v1/tts/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"kokoro","text":"Hello!","voice":"af_bella","format":"mp3"}' \
  -o output.mp3

Kuri Umwandiko

cURL
# Speech to Text
curl -X POST https://api.tts.ai/v1/stt/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -F "file=@recording.mp3" \
  -F "model=faster-whisper" \
  -F "timestamps=true"

Guca umurongo

cURL
# Voice Cloning
curl -X POST https://api.tts.ai/v1/voice-clone/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -F "reference_audio=@reference.wav" \
  -F "text=This uses a cloned voice." \
  -F "model=chatterbox" \
  -o cloned.mp3

Ihindurangero

cURL
# Audio Enhancement
curl -X POST https://api.tts.ai/v1/audio/enhance/ \
  -H "Authorization: Bearer sk-tts-your-key" \
  -F "file=@noisy_audio.mp3" \
  -F "denoise=true" \
  -F "enhance_clarity=true" \
  -o enhanced.mp3

Imisobekere y'ikosa

Amakosa Gusubiramo A Na: error Umwanya.

Imiterere y'ikosa
{
  "error": {
    "code": "insufficient_credits",
    "message": "You do not have enough characters for this request.",
    "characters_required": 4000,
    "characters_available": 2000
  }
}
Imimerere ya HTTPIkosaIsobanuramiterere
400 bad_request Kubaza... Ibigenga i Ikosa Ubutumwa ya: Ibisobanuro:
401 unauthorized Cyangwa Sibyo Urufunguzo
402 insufficient_credits Inyuguti Birenzeho ku /.
403 forbidden OYA Uruhushya Kuri iyi Ibikorana: (& eg; Umukoresha 'S Ibikorwa:). ni ku buri.
404 not_found Cyangwa OYA Byabonetse
413 file_too_large IDOSIYE i Ingano
429 rate_limited Umubare w' ibisabwa. Umubare w' imibare Imitwe.
500 internal_error Ikosa OYA
503 model_loading ni in A Amasogonda

Webhooks

For long-running tasks (stem splitting, batch TTS), you can provide a webhook_url parameter. When the task completes, we will POST the result to your URL.

Webhook
{
  "event": "task.completed",
  "task_id": "task_abc123",
  "status": "success",
  "result_url": "https://api.tts.ai/v1/results/task_abc123",
  "credits_used": 12,
  "created_at": "2025-01-15T10:30:00Z",
  "completed_at": "2025-01-15T10:30:45Z"
}
Ibisubizo Bihari ya: Iyimura ya: 24 Amasaha Nyuma. Kuri Iyimura.

Bivuye Cyangwa

TTS.ai is also an MCP server, so AI assistants can use it from a chat: https://tts.ai/mcp. kugirango Porogaramu

Ibibazo bizwa kenshi

Sign up for a free TTS.ai account, then navigate to your account dashboard and click "Generate API Key." Your key will be prefixed with sk-tts- and can be used immediately. Free accounts receive 15,000 characters to get started.

Yes, our API follows OpenAI-compatible request and response formats. If you have existing code that uses OpenAI's TTS API, you can switch to TTS.ai by changing the base URL and API key with minimal code changes.

Na: Icyo ari cyo cyose Ururimi: Ubwoko. Inyandikoporogaramu Urugero: in, (na Mucukumbuzi), na Birenzeho. Ururimi: Na: Umukiriya Library (, Java, C #, PHP,) Koresha i.

Konti: Kuri 3. Birenzeho Imipaka ku: (60 / ISAHA), (300 / ISAHA), (Nta kiguzi). Impera Imitwe in buri.

Ibikoresha Inyuguti: ku i Urugero: na Umwandiko Uburebure. Koresha 0 Inyuguti:, Bisanzwe Koresha 2x Inyuguti:, na Birenzeho Umushahara Koresha Inyuguti:. Byashyizwemo in Byose na Nka Inyuguti:.

The API provides endpoints for text-to-speech (POST /v1/tts/), speech-to-text (POST /v1/transcribe/), voice cloning (POST /v1/voice-clone/), voice conversion (POST /v1/voice-convert/), speech translation (POST /v1/speech-translate/), audio enhancement (POST /v1/audio-enhance/), vocal removal, stem splitting, key and BPM analysis, and more.

Ijwi in Imiterere ku Mburabuzi. Kugaragaza: i Ibisohoka Imiterere (,,,) ikoresha i Imiterere Igenamiterere. ni ya: Urubuga Porogaramu, ya: Ibirenze: Ijwi.

Ego, API yacu itanga umwirongo (UUID) w'akazi, kandi ushobora kureba ibimenyetso by'ibyabaye. Ku modeli zifashishwa, nka Kokoro, gukora amajwi bigenda neza cyane, bityo bigeraho mu gihe gito. Iyo umushinga urangiye, urwego rwo kureba ibimenyetso by'ibyabaye rushobora kugarura urubuga (URL) rwa kamajwi.

Bisanzwe Imimerere Inyandikoporogaramu (ya:, ya: Amakosa, ya: Umubare w' imibare, ya: Seriveri: Amakosa) Na: Ikosa Ubutumwa. Kugenzura i Imimerere Inyandikoporogaramu na Ikosa Umwanya in ya: Ikosa.

Yes, on a paid plan. Audio generated through the API while your account is on a paid plan can be used in your products, applications and services, with no additional royalties, and upgrading also covers audio you made earlier on the free tier. Free-tier API output is for personal, non-commercial use. On every plan, models and voices whose authors allow only non-commercial use are excluded: they are marked "Personal and non-commercial use only" in the voice picker, and the voices and models API returns commercial_use: false for them.

Free-tier models (Kokoro, Piper, VITS, MeloTTS) serve as an excellent sandbox. They use zero characters and are available to all accounts. Test your integration with free models before switching to premium models for production use.

/ v1 / Kuri Urutonde Byose Bihari Na: Iyungurura Amahitamo (Urugero, Ururimi:, Itsina). / v1 / Kuri Urutonde Byose Bihari Na: na Icyiciro Ibisobanuro:. Impera: Gusubiramo.

Kuri?

Get your API key and start integrating TTS.ai into your applications.