curl -X POST "https://api.audixa.ai/v3/tts" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"speed": 1.0,
"audio_format": "wav",
"language_code": "a"
}'
import requests
response = requests.post(
"https://api.audixa.ai/v3/tts",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"audio_format": "wav",
},
timeout=30,
)
response.raise_for_status()
generation = response.json()
print(generation["generation_id"], generation["status"])
const response = await fetch('https://api.audixa.ai/v3/tts', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Hello from Audixa. This request is long enough for generation.',
voice_id: 'am_ethan',
model: 'base',
audio_format: 'wav'
})
});
if (!response.ok) throw new Error(await response.text());
const generation = await response.json();
console.log(generation.generation_id, generation.status);
{
"generation_id": "gen_abc123xyz",
"status": "IN_QUEUE",
"input_text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"voice_name": "Ethan",
"model": "base",
"tokens": 6,
"dollar_cost": 0.000006,
"method": null,
"created_at": "2025-02-05T12:00:00Z",
"started_at": null,
"completed_at": null
}
Endpoints
Create Generation
Start a text-to-speech generation job
POST
/
v3
/
tts
curl -X POST "https://api.audixa.ai/v3/tts" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"speed": 1.0,
"audio_format": "wav",
"language_code": "a"
}'
import requests
response = requests.post(
"https://api.audixa.ai/v3/tts",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"audio_format": "wav",
},
timeout=30,
)
response.raise_for_status()
generation = response.json()
print(generation["generation_id"], generation["status"])
const response = await fetch('https://api.audixa.ai/v3/tts', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Hello from Audixa. This request is long enough for generation.',
voice_id: 'am_ethan',
model: 'base',
audio_format: 'wav'
})
});
if (!response.ok) throw new Error(await response.text());
const generation = await response.json();
console.log(generation.generation_id, generation.status);
{
"generation_id": "gen_abc123xyz",
"status": "IN_QUEUE",
"input_text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"voice_name": "Ethan",
"model": "base",
"tokens": 6,
"dollar_cost": 0.000006,
"method": null,
"created_at": "2025-02-05T12:00:00Z",
"started_at": null,
"completed_at": null
}
Submits a text-to-speech task and returns a
generation_id for tracking. The audio is generated asynchronously—use the Get Generation endpoint to check when it’s ready.
Endpoint
POST https://api.audixa.ai/v3/tts
Request
The text to convert to speech. At least 1 character is required. Each generation
is billed for at least 30 characters (8 tokens), even for shorter text. The maximum is set by
the active plan and cannot exceed the API schema maximum of 50,000 characters.
The voice ID to use. Get available voices from /voices.
The model tier to use.
base: Supportsspeedand Base-compatible voices.advanced: Supportscfg_weight,exaggeration, and Advanced-compatible voices.
Advanced Model Settings
Optional language code for the input text. The accepted values depend on
model:- Base model uses single-letter codes:
a(American English),b(British English),j(Japanese),z(Mandarin Chinese),e(Spanish),f(French),h(Hindi),i(Italian),p(Brazilian Portuguese). - Advanced model uses ISO 639-1 codes:
en,ar,da,de,el,es,fi,fr,he,hi,it,ja,ko,ms,nl,no,pl,pt,ru,sv,sw,tr,zh.
Response
Unique identifier for this generation job. Use this to poll /tts.
curl -X POST "https://api.audixa.ai/v3/tts" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"speed": 1.0,
"audio_format": "wav",
"language_code": "a"
}'
import requests
response = requests.post(
"https://api.audixa.ai/v3/tts",
headers={"X-API-Key": "YOUR_API_KEY"},
json={
"text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"model": "base",
"audio_format": "wav",
},
timeout=30,
)
response.raise_for_status()
generation = response.json()
print(generation["generation_id"], generation["status"])
const response = await fetch('https://api.audixa.ai/v3/tts', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Hello from Audixa. This request is long enough for generation.',
voice_id: 'am_ethan',
model: 'base',
audio_format: 'wav'
})
});
if (!response.ok) throw new Error(await response.text());
const generation = await response.json();
console.log(generation.generation_id, generation.status);
{
"generation_id": "gen_abc123xyz",
"status": "IN_QUEUE",
"input_text": "Hello from Audixa. This request is long enough for generation.",
"voice_id": "am_ethan",
"voice_name": "Ethan",
"model": "base",
"tokens": 6,
"dollar_cost": 0.000006,
"method": null,
"created_at": "2025-02-05T12:00:00Z",
"started_at": null,
"completed_at": null
}
Error Responses
400 Bad Request
400 Bad Request
Invalid parameters (e.g. invalid model, voice not found).
402 Payment Required
402 Payment Required
Insufficient balance.
429 Too Many Requests
429 Too Many Requests
Rate limit exceeded.