curl --request POST \
--url https://api.aireserve.com/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-tts",
"input": "Welcome to AI Reserve. How can I help you today?",
"voice": "ara",
"language": "en"
}
'import requests
url = "https://api.aireserve.com/v1/audio/speech"
payload = {
"model": "grok-tts",
"input": "Welcome to AI Reserve. How can I help you today?",
"voice": "ara",
"language": "en"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-tts',
input: 'Welcome to AI Reserve. How can I help you today?',
voice: 'ara',
language: 'en'
})
};
fetch('https://api.aireserve.com/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"Synthesize speech
Synthesize speech from text using grok-tts. Synchronous — returns raw MP3 bytes (audio/mpeg). Billed per Unicode code point at the grok-tts rate. Max 4,096 characters per request; only mp3 response_format is supported in this release. Use a built-in voice ID from GET /v1/voices or a custom voice ID from GET /v1/custom-voices.
curl --request POST \
--url https://api.aireserve.com/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "grok-tts",
"input": "Welcome to AI Reserve. How can I help you today?",
"voice": "ara",
"language": "en"
}
'import requests
url = "https://api.aireserve.com/v1/audio/speech"
payload = {
"model": "grok-tts",
"input": "Welcome to AI Reserve. How can I help you today?",
"voice": "ara",
"language": "en"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'grok-tts',
input: 'Welcome to AI Reserve. How can I help you today?',
voice: 'ara',
language: 'en'
})
};
fetch('https://api.aireserve.com/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"Authorizations
Your AI Reserve API key (aireserve_api_…) from the API Keys page in the portal (https://portal.aireserve.com/keys).
Body
Must be grok-tts.
grok-tts Text to synthesize — max 4,096 Unicode code points.
4096Built-in voice ID (from GET /v1/voices) or your organization's custom voice ID (from GET /v1/custom-voices).
BCP-47 language hint (e.g. en, en-US, es). Defaults to the voice's primary language when omitted.
Output format. Only mp3 is accepted in this release.
mp3 Response
Raw MP3 audio stream.
The response is of type file.