Retrieve text-to-speech audio clip
December 23, 2024 (August 24, 2026)
Table of contents
This endpoint will return audio clip generated by
https://api.useapi.net/v1/minimax/speech/
audio_id
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API tokenis required, see Setup useapi.net for details.
Path parameter
audio_idis required. Specify audio clip you want to retrieve.
Notes:
- Accepts an
audioIdreturned by POST speech/create as well as anyaudio_idlisted by GET speech. - While a generation from POST speech/create is still running, the response is
{"statusLabel": "pending", "statusFinal": false}with noaudio_url. Poll untilstatusFinalistrue, or supply areplyUrland let the callback tell you. - A generation that never completed reports
statusLabel: "failed"withcodeanderrordescribing why. Cancelling one with DELETE scheduler/idputs it in the same state. - An
audioIdissued by POST speech/create resolves for 7 days. After that use GET speech to find the recording, which stays on the account.
Responses
-
{ "audio_id": "user:user_id-minimax:account_id-audio:audio_id", "audio_review": 0, "voice_info": { "voice_id": "209533299589184", "parent_voice_id": "0", "voice_name": "Calm Woman", "tag_list": [ "English", "Female", "Adult", "Audiobook", "US (General)" ], "file_id": "", "cover_url": "https://cdn.hailuoai.video/...png", "create_time": 1122334455667, "update_time": 1122334455668, "collected": false, "voice_status": 2, "sample_audio": "https://cdn.hailuoai.video/...mp3", "uniq_id": "English_CalmWoman", "group_id": "0" }, "text": "<Text>", "audio_url": "https://cdn.hailuoai.video/...mp3", "audio_title": "<Title>", "create_time": 1122334455667, "emotion": "Auto", "language_boost": "Auto", "speed": 1, "pitch": 0, "update_time": 0, "effects": { "deepen_lighten": 0, "stronger_softer": 0, "nasal_crisp": 0, "spacious_echo": true, "lofi_telephone": false, "robotic": false, "auditorium_echo": false }, "statusLabel": "completed", "statusFinal": true }While the generation is still running:
{ "audioId": "user:12345-minimax:123456789012345678-audio:178737039436895391", "status": 0, "statusLabel": "pending", "statusFinal": false }And when it failed, or was still unfinished after the 10-minute tracking window:
{ "audioId": "user:12345-minimax:123456789012345678-audio:178737039436895391", "status": 3, "statusLabel": "failed", "statusFinal": true, "code": 400, "error": "More than 10 minutes have passed, the task has expired." }Poll on
statusFinalrather thanstatus—statusLabelandstatusFinalare added by useapi.net, because every MiniMax history row reportsstatus0whether or not it finished. -
{ "error": "<Error message>", "code": 400 } -
{ "error": "Unauthorized", "code": 401 } -
Returned with an empty body when MiniMax no longer holds the recording, for example once it has been deleted.
-
596 Account Error
{ "error": "Your minimax account has pending error. Please address this issue at https://useapi.net/docs/api-minimax-v1/post-minimax-accounts-account before making any new API calls.", "code": 596 }
Model
{ // TypeScript, all fields are optional
audio_id: string
audio_review: number
voice_info: {
voice_id: string
parent_voice_id: string
voice_name: string
tag_list: string[]
file_id: string
cover_url: string
create_time: number
update_time: number
collected: boolean
voice_status: number
sample_audio: string
uniq_id: string
group_id: string
}
text: string
audio_url: string
audio_title: string
create_time: number
emotion: string
language_boost: string
speed: number
pitch: number
volume: number
update_time: number
model: string // The speech model used
cost_credit: number // Credits this generation cost
is_first: boolean
status: number
statusLabel: string // completed once audio_url is set, otherwise processing
statusFinal: boolean
async: number
has_srt: boolean
has_wav: boolean
effects: {
deepen_lighten: number
stronger_softer: number
nasal_crisp: number
spacious_echo: boolean
lofi_telephone: boolean
robotic: boolean
auditorium_echo: boolean
}
}
Examples
-
curl "https://api.useapi.net/v1/minimax/speech/audio_id" \ -H "Accept: application/json" \ -H "Authorization: Bearer …" -
const token = "API token"; const audio_id = "audio_id to retrieve"; const apiUrl = `https://api.useapi.net/v1/minimax/speech/${audio_id}`; const response = await fetch(apiUrl, { headers: { "Authorization": `Bearer ${token}`, }, }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" audio_id = "audio_id to retrieve" apiUrl = f"https://api.useapi.net/v1/minimax/speech/{audio_id}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())