POST https://openapi.myvocal.ai/v2/ai/speech/streamYOUR_API_KEY and <VOICE_ID> with your values.format selects the output encoding.voice, text and model are required.language explicitly when known. If omitted, the service infers it from the text.format supported by the model.sample_rate is in Hz. With ulaw for phone audio, 8000 is common.seed. Reusing it with the same text and settings improves consistency across generations.priority set to auto.| HTTP status | Common cause | What to do |
|---|---|---|
400 | Invalid field type, model, language or audio format | Check request parameters and model compatibility. |
401 / 403 | Invalid API key or insufficient permissions | Check the API-Key header and account permissions. |
429 | Rate or concurrency limit reached | Reduce request frequency and retry later. |
5xx | Service temporarily unavailable | Record the request time and retry later. |
curl --location 'https://openapi.myvocal.ai/v2/ai/speech/stream' \
--header 'API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"voice": "<VOICE_ID>",
"text": "您好,这是一次流式语音测试。",
"model": "Skyblight-Turbo",
"language": "zh",
"format": "mp3",
"sample_rate": 24000,
"priority": "auto"
}'