Đấu nối giọng đọc AI vào app/website của bạn. Base URL: https://vietvoice.click
Gửi key trong header của mọi request:
# Header bắt buộc
Authorization: Bearer vv_xxxxxxxxxxxxxxxx
| Tham số | Kiểu | Mô tả |
|---|---|---|
input | string * | Văn bản cần đọc (tối đa 20.000 credits) |
voice | string | Tên giọng (mặc định: Hải Đăng). Xem /api/v1/voices |
response_format | string | Luôn trả wav |
curl https://vietvoice.click/api/v1/speech \
-H "Authorization: Bearer vv_..." \
-H "Content-Type: application/json" \
-d '{"input": "Xin chào các bạn!", "voice": "Hải Đăng"}' \
--output audio.wav
import requests
r = requests.post("https://vietvoice.click/api/v1/speech",
headers={"Authorization": "Bearer vv_..."},
json={"input": "Xin chào!", "voice": "Hải Đăng"})
open("audio.wav", "wb").write(r.content)
✅ Thành công: HTTP 200, body là file WAV (48kHz).
💰 Trừ 1 credits / 1 credits văn bản — giống tạo trên web.
curl https://vietvoice.click/api/v1/voices \
-H "Authorization: Bearer vv_..."
Trả về balance (số credits còn lại) và thông tin tài khoản.
| Mã | Ý nghĩa |
|---|---|
401 | Thiếu/sai API key |
402 | Hết credits — nạp thêm trong Studio |
429 | Engine đang bận — thử lại sau vài giây |
Integrate AI voices into your app/website. Base URL: https://vietvoice.click
Send the key in the header of every request:
# Required header
Authorization: Bearer vv_xxxxxxxxxxxxxxxx
| Parameter | Type | Description |
|---|---|---|
input | string * | Text to speak (max 20,000 chars) |
voice | string | Voice name (default: Hải Đăng). See /api/v1/voices |
response_format | string | Always returns wav |
curl https://vietvoice.click/api/v1/speech \
-H "Authorization: Bearer vv_..." \
-H "Content-Type: application/json" \
-d '{"input": "Hello!", "voice": "Hải Đăng"}' \
--output audio.wav
✅ Success: HTTP 200, body is a WAV file (48kHz).
💰 Deducts 1 char / 1 text character — same as web generation.
Returns balance (remaining characters) and account info.
| Code | Meaning |
|---|---|
401 | Missing/invalid API key |
402 | Out of characters — top up in Studio |
429 | Engine busy — retry in a few seconds |