Speech 2.5 HD Preview
Setup your API Key
API Schema
post
Body
modelstring · enumRequiredPossible values:
textstring · min: 1 · max: 5000Required
The text content to be converted to speech.
language_booststring · enumOptionalPossible values:
Language recognition enhancement option.
subtitle_enablebooleanOptionalDefault:
Enable subtitle generation service. Only available for non-streaming requests. Generates timing information for the synthesized speech.
falsestreamboolean · enumOptionalDefault:
falsePossible values: Responses
200Success
audiostring · uriRequired
post/v1/tts
curl -L \
--request POST \
--url 'https://api.aimlapi.com/v1/tts' \
--header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"model": "minimax/speech-2.5-hd-preview",
"text": "Cities of the future promise to radically transform how people live, work, and move. Instead of sprawling layouts, we will see vertical structures that integrate residential, work, and public spaces into single, self-sustaining ecosystems. Architecture will adapt to climate conditions, and buildings will be energy-efficient—generating power through solar panels, wind turbines, and even foot traffic."
}'200Success
{
"audio": "https://example.com",
"meta": {
"usage": {
"credits_used": 120000,
"usd_spent": 0.06
}
}
}Code Example
Last updated
Was this helpful?