VOICE API / DOCUMENTATION
Tích hợp Text-to-Speech.
Base URL: https://voice.emtroly.online/v1
Authentication
Gửi API key trong header Bearer. Không đưa key vào frontend công khai.
Authorization: Bearer sk_live_...
POST /text-to-speech
curl https://voice.emtroly.online/v1/text-to-speech \
-H "Authorization: Bearer $VOICE_API_KEY" \
-H "Idempotency-Key: order-123" \
-H "Content-Type: application/json" \
-d '{"text":"Xin chào Việt Nam","provider":"elevenlabs","voice_id":"...","model_id":"...","language_code":"vi"}'GET /balance
curl https://voice.emtroly.online/v1/balance \ -H "Authorization: Bearer $VOICE_API_KEY"
HTTP codes
202 đang xử lý · 401 key không hợp lệ · 402 số dư không đủ · 429 vượt rate limit · 502 provider lỗi.