Skip to content

Create an audio task ​

Digital human audio tasks convert text to speech using a public voice ID or an uploaded or trained voice asset.

Use public voice ​

http
POST /v1/tasks
bash
curl https://moonnexai.com/v1/tasks \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "digital-human-audio-v8",
    "voice_id": 6339,
    "text": "欢迎使用 MoonNexAI 数字人接口。",
    "speed": 1.0,
    "volume": 50,
    "pitch": 1.0,
    "language": 0,
    "name": "welcome-audio"
  }'

Use voice assets ​

bash
curl https://moonnexai.com/v1/tasks \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "digital-human-audio-v8",
    "voice_asset_id": "asset_voice_xxx",
    "text": "这是一段使用自有音色生成的音频。",
    "name": "custom-voice-audio"
  }'

Query an audio task ​

http
GET /v1/tasks/{task_id}
bash
curl https://moonnexai.com/v1/tasks/task_xxx \
  -H "Authorization: Bearer <MOONNEXAI_API_KEY>"

Common field ​

fieldAnnotations
modeldigital human audio model name.
textText to synthesize.
voice_idPublic voice ID.
voice_asset_idYour voice asset ID.
speedSpeed.
volumeVolume.
pitchPitch.
nameName of task.

Relevant Pages ​