POST request to https://api.qhaigc.net/v1/audio/speech to convert a text string into an audio file. The qhai-tts model supports over 38 distinct voice characters — from cute and youthful to mature and authoritative — including popular game and anime personas such as 派蒙 (Paimon), 温迪 (Venti), and 纳西妲 (Nahida).
Request
Parameters
The TTS model to use. Set this to
"qhai-tts".The text to convert to speech. Maximum length is approximately 4096 characters.
The name of the voice character to use, for example
"可爱少女" or "御姐". Call GET /v1/audio/voices to see all available characters.The audio format of the returned file. Supported values include
"mp3", "wav", and "opus". Defaults to "mp3".Playback speed multiplier. A value of
1.0 is normal speed. Increase to speed up or decrease to slow down the output. Defaults to 1.0.Response
The endpoint returns the audio file as a binary stream in the format specified byresponse_format. Save the response body directly to a file.
Code examples
Related endpoints
- GET /v1/audio/voices — List all available voice characters
- POST /v1/voice-clone/create-model — Create a custom cloned voice to use with this endpoint