Docs/AngeVoice

AngeVoice API reference

Use the OpenAI-style speech endpoint by default. Use /api/tts when uploading reference audio or supporting a legacy client.

RESTWebSocketBearer token

Base URLs and authentication

DeploymentHTTPWebSocket
CPUhttp://host:8100ws://host:8100/ws/v1/tts
Standard GPUhttp://host:8101ws://host:8101/ws/v1/tts
Legacy GPUhttp://host:8102ws://host:8102/ws/v1/tts
Authorization: Bearer YOUR_TOKEN

Status and discovery

MethodPathPurpose
GET/healthService, model and runtime status
GET/v1/modelsAvailable models and providers
GET/v1/models/currentActive model and fallback state
GET/v1/tts/capabilitiesFormats, encodings and voices
GET/v1/audio/voicesVoice list
GET/v1/audio/formatsOutput formats and FFmpeg availability
GET/v1/engines/parameter-schemaModel-specific parameter schema

Load and switch models

MethodPathPurpose
POST/v1/models/{model}/loadPreload a model
POST/v1/models/switchSwitch models and optionally unload the previous one
POST/v1/models/{model}/unloadRelease 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

MethodPathPurpose
POST/v1/audio/batchGenerate multiple items as a ZIP
POST/v1/audio/requests/{request_id}/cancelCancel an HTTP or batch request
GET/requestsInspect 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