Text to speech
POST https://api.nexinfer.com/v1/audio/speechThe request requires model, input, and voice. Current verified voices include:
| Language | Voice ID |
|---|---|
| Chinese | zh_female_vv_uranus_bigtts |
| English | en_female_jane_uranus_bigtts |
curl https://api.nexinfer.com/v1/audio/speech \ -H "Authorization: Bearer $NEXINFER_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "doubao-tts-2.0", "input": "Welcome to NexInfer.", "voice": "en_female_jane_uranus_bigtts", "response_format": "mp3", "speed": 1 }' \ --output speech.mp3Supported response formats are mp3, wav, and opus. speed accepts 0.5 through 2.0, inclusive. An out-of-range speed returns 400 invalid_request and is not billed.
Billing is based on the accepted text character count. Check the HTTP status, file signature, duration, and usage log; do not rely on the file extension alone. Do not put keys or private input text in reports.