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/tasksbash
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
| field | Annotations |
|---|---|
model | digital human audio model name. |
text | Text to synthesize. |
voice_id | Public voice ID. |
voice_asset_id | Your voice asset ID. |
speed | Speed. |
volume | Volume. |
pitch | Pitch. |
name | Name of task. |