AngeVoice API reference
Use the OpenAI-style speech endpoint by default. Use /api/tts when uploading reference audio or supporting a legacy client.
Base URLs and authentication
| Deployment | HTTP | WebSocket |
|---|---|---|
| CPU | http://host:8100 | ws://host:8100/ws/v1/tts |
| Standard GPU | http://host:8101 | ws://host:8101/ws/v1/tts |
| Legacy GPU | http://host:8102 | ws://host:8102/ws/v1/tts |
Authorization: Bearer YOUR_TOKEN
Status and discovery
| Method | Path | Purpose |
|---|---|---|
| GET | /health | Service, model and runtime status |
| GET | /v1/models | Available models and providers |
| GET | /v1/models/current | Active model and fallback state |
| GET | /v1/tts/capabilities | Formats, encodings and voices |
| GET | /v1/audio/voices | Voice list |
| GET | /v1/audio/formats | Output formats and FFmpeg availability |
| GET | /v1/engines/parameter-schema | Model-specific parameter schema |
Load and switch models
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/models/{model}/load | Preload a model |
| POST | /v1/models/switch | Switch models and optionally unload the previous one |
| POST | /v1/models/{model}/unload | Release a model |
curl -X POST "$BASE_URL/v1/models/switch" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"model":"moss","unload_previous":true}'
OpenAI-style speech synthesis
curl -X POST "$BASE_URL/v1/audio/speech" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"model":"kokoro","input":"Hello world","voice":"zm_010","speed":1.0,"response_format":"wav"}' \
--output speech.wav
Output formats and encodings
Use /v1/audio/formats as the source of truth. WAV and PCM are the basic path; MP3, OGG, M4A and telegram_voice require the matching conversion capability. Set response_encoding=base64 when the client needs a JSON response.
Successful responses include a request ID. Record that ID for troubleshooting instead of logging the full token.
Reference-audio cloning
curl -X POST "$BASE_URL/api/tts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-F model=moss \
-F text="Reference voice cloning test." \
-F voice=Junhao \
-F prompt_audio=@reference.wav \
-F response_format=wav \
--output clone.wav
ZipVoice also requires prompt_text. A default MOSS reference can be configured with MOSS_PROMPT_AUDIO_PATH.
WebSocket streaming
{
"model": "kokoro",
"text": "Streaming synthesis test.",
"voice": "zm_010",
"format": "pcm_s16le",
"binary": false,
"token": "YOUR_TOKEN"
}
Send {"type":"cancel"} to stop later segments. A segment already in synchronous inference may finish first.
Batch and cancellation
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/audio/batch | Generate multiple items as a ZIP |
| POST | /v1/audio/requests/{request_id}/cancel | Cancel an HTTP or batch request |
| GET | /requests | Inspect recent request state |
curl -X POST "$BASE_URL/v1/audio/batch" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"model":"kokoro",
"voice":"zm_010",
"response_format":"wav",
"items":[
{"text":"First item","filename":"001"},
{"text":"Second item","filename":"002"}
]
}' \
--output speech-batch.zip
Voice Profiles
Voice Profiles saved in Studio appear in the voice list and can be passed as voice. Query /v1/audio/voices?detail=true to discover available profiles, their model and voice details.
Interactive documentation
/api-docs: examples for everyday use./docs: Swagger with complete request schemas./redoc: ReDoc reference view.