Skip to main content
POST
https://api.audixa.ai
/
v2
/
tts
curl -X POST "https://api.audixa.ai/v2/tts" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "text": "Welcome to Audixa! This is a demonstration of our text-to-speech API.",
    "voice": "aura-asteria-en",
    "model": "base",
    "speed": 1.0
  }'
{
  "generation_id": "gen_abc123xyz789def456"
}
Submits a text-to-speech task and returns a generation_id for tracking. The audio is generated asynchronously—use the /status endpoint to check when it’s ready.

Request

text
string
required
The text to convert to speech. Maximum 5,000 characters.
voice
string
required
The voice ID to use. Get available voices from /voices.
model
string
required
The model tier to use. Must be base or advance.
  • base: Standard high-quality voices (1 credit/token)
  • advance: Premium voices with emotions and cloning (4 credits/token)
speed
number
default:"1.0"
Playback speed multiplier. Range: 0.5 to 2.0.
emotion
string
default:"neutral"
Emotional tone (Advance model only). Options: neutral, happy, sad, angry, surprised.
temperature
number
default:"0.9"
Creativity control (Advance model only). Range: 0.7 to 1.0. Higher = more variation.
top_p
number
default:"0.9"
Plausibility filter (Advance model only). Range: 0.7 to 0.98. Higher = more diverse.

Response

generation_id
string
Unique identifier for this generation job. Use this to poll /status.

Examples

curl -X POST "https://api.audixa.ai/v2/tts" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "text": "Welcome to Audixa! This is a demonstration of our text-to-speech API.",
    "voice": "aura-asteria-en",
    "model": "base",
    "speed": 1.0
  }'
{
  "generation_id": "gen_abc123xyz789def456"
}

Error Responses

Invalid or missing parameters.
{
  "detail": "Validation error",
  "errors": [
    {"field": "text", "message": "Text is required"},
    {"field": "model", "message": "Model must be 'base' or 'advance'"}
  ]
}
Missing or invalid API key.
{
  "detail": "Invalid or missing API key"
}
Insufficient credits for this request.
{
  "detail": "Insufficient Balance"
}
Rate limit exceeded.
{
  "detail": "Rate limit exceeded. Please retry after 30 seconds."
}

Next Steps

After receiving the generation_id, poll the /status endpoint to check when your audio is ready.