POST /v1/tts
Ubah teks menjadi audio.
Request
POST /v1/tts HTTP/1.1
Host: api.vonip.ai
Authorization: Bearer sk_live_xxx
Content-Type: application/json
{
"text": "Halo dunia",
"voice": "anime_voice",
"format": "mp3",
"speed": 1.0
}
| Field | Type | Required | Default | Catatan |
|---|---|---|---|---|
text |
string | ✓ | — | Maks 5000 karakter. |
voice |
string | ✓ | — | Voice slug (lihat GET /voices). |
format |
string | mp3 |
mp3 / wav. |
|
speed |
number | 1.0 |
0.5 – 2.0. |
Response 200 OK
{
"id": "01h…",
"kind": "tts",
"status": "ready",
"text": "Halo dunia",
"duration_sec": 2,
"audio_url": "https://cdn.vonip.ai/tts/abc.mp3",
"voice_id": "0c1…",
"created_at": "2026-05-14T07:01:23Z"
}
Error
| Status | Arti |
|---|---|
| 401 | API key tidak valid. |
| 404 | voice tidak ditemukan. |
| 429 | Rate limit terlampaui. |
| 502 | Provider AI sementara tidak tersedia. |
Lihat: Error Handling