Generate speech audio
curl --request POST \
--url https://api.tera.gw/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "hexgrad/Kokoro-82M",
"input": "<string>",
"voice": "af_bella",
"response_format": "wav",
"speed": 1,
"lang_code": "<string>"
}
'"<string>"API Reference
Text to speech
OpenAI-compatible TTS endpoint backed by Kokoro. Returns raw audio bytes.
POST
/
v1
/
audio
/
speech
Generate speech audio
curl --request POST \
--url https://api.tera.gw/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "hexgrad/Kokoro-82M",
"input": "<string>",
"voice": "af_bella",
"response_format": "wav",
"speed": 1,
"lang_code": "<string>"
}
'"<string>"Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Example:
"hexgrad/Kokoro-82M"
Text to synthesize.
Kokoro voice id.
Example:
"af_bella"
Available options:
wav, mp3 Required range:
0.25 <= x <= 4BCP-47 language code, e.g. en-US.
Response
Audio bytes (WAV by default).
The response is of type file.
⌘I