Text To Speech
Endpoint for generating audio from text.
Converts a string of text into high-quality audio using the voice associated with the specified agent. Cost: 3 Credits per 100 characters (rounded up, min 1 credit).
Authorizations
Body
agentIdstringRequired
The ID of the agent whose voice should be used.
textstringRequired
The text to convert to speech.
Responses
200
The generated audio file.
audio/mpeg
Responsestring · binary
402
The user's credit balance is insufficient.
application/json
default
An unexpected error occurred.
application/json
post
/v1/ttsPOST /v1/tts HTTP/1.1
Host: api.kex.gg
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"agentId": "text",
"text": "text"
}
binary