MiniMax Speech 2.8
MiniMax Speech 2.8 generates long-form speech through the unified asynchronous task API. This integration accepts direct text only, up to 50,000 Unicode code points per request. File input, voice cloning, and voice design are not exposed in this first version.
Models and pricing
| Model | Standard price per 10,000 billable characters |
|---|---|
speech-2.8-hd | 155.33 credits |
speech-2.8-turbo | 88.76 credits |
The server derives the character count and never trusts a client-provided value:
- Every Unicode Han character counts as 2.
- Every other Unicode code point—including Latin letters, punctuation, spaces, line breaks, and emoji—counts as 1.
For example, 你好, AI! has 9 billable characters: 你 and 好 count as 4 together, while the comma, space, A, I, and exclamation mark count as 5. Use POST /v1/estimate or the Playground for the exact rounded price.
Create a task
curl -X POST https://api.aivideoapi.ai/v1/audio/generations \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "speech-2.8-hd",
"callback_url": "https://your-server.com/webhook",
"input": {
"text": "The future sounds closer than ever. (sighs)",
"voice_setting": {
"voice_id": "audiobook_male_1",
"speed": 1,
"vol": 1,
"pitch": 0,
"emotion": "calm"
},
"audio_setting": {
"audio_sample_rate": 32000,
"bitrate": 128000,
"format": "mp3",
"channel": 1
},
"language_boost": "auto",
"aigc_watermark": false
}
}'
The create response contains the platform task ID:
{
"code": 200,
"msg": "success",
"data": { "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
}
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | speech-2.8-hd or speech-2.8-turbo |
input | object | Yes | Speech parameters below |
callback_url | string | No | Public HTTP(S) URL that receives completion or failure callbacks |
Input fields
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Non-empty direct text, at most 50,000 Unicode code points |
voice_setting | object | Yes | Voice and delivery settings |
audio_setting | object | No | Output encoding settings; defaults to MP3 upstream |
language_boost | string | No | Language or dialect enhancement, or auto |
pronunciation_dict | object | No | Custom pronunciation entries in tone |
voice_modify | object | No | Pitch, intensity, timbre, and sound-effect processing |
aigc_watermark | boolean | No | Add MiniMax's audio rhythm marker; default false |
text_file_id, uploaded text files, voice cloning, and voice design are not supported by this endpoint.
Voice settings
| Field | Type | Range | Description |
|---|---|---|---|
voice_id | string | non-empty | Required voice ID |
speed | number | 0.5–2 | Speaking speed |
vol | number | greater than 0 through 10 | Volume |
pitch | integer | -12–12 | Pitch offset |
emotion | string | happy, sad, angry, fearful, disgusted, surprised, calm | Speech 2.8 emotion; fluent and whisper are rejected |
english_normalization | boolean | — | Enable English text normalization |
You may use a MiniMax system voice such as audiobook_male_1. A cloned or designed custom voice_id works only when it belongs to the MiniMax account configured by this platform; a voice in another MiniMax account is not accessible through your AI Video API key.
Audio settings
| Field | Type | Values |
|---|---|---|
format | string | mp3, pcm, flac, wav, pcmu_raw, pcmu_wav, opus |
audio_sample_rate | integer | Standard formats: 8000, 16000, 22050, 24000, 32000, 44100; Opus: 8000, 12000, 16000, 24000, 48000 |
bitrate | integer | MP3 only: 32000, 64000, 128000, 256000 |
channel | integer | 1 or 2 |
Opus requires an explicit supported sample rate. pcmu_raw and pcmu_wav require 8000 Hz. A bitrate is rejected for non-MP3 formats.
Language boost
language_boost accepts auto, Chinese, Chinese,Yue, English, Arabic, Russian, Spanish, French, Portuguese, German, Turkish, Dutch, Ukrainian, Vietnamese, Indonesian, Japanese, Italian, Korean, Thai, Polish, Romanian, Greek, Czech, Finnish, Hindi, Bulgarian, Danish, Hebrew, Malay, Persian, Slovak, Swedish, Croatian, Filipino, Hungarian, Norwegian, Slovenian, Catalan, Nynorsk, Tamil, or Afrikaans.
Pronunciation and voice effects
{
"pronunciation_dict": {
"tone": ["危险/dangerous"]
},
"voice_modify": {
"pitch": 0,
"intensity": 0,
"timbre": 0,
"sound_effects": "spacious_echo"
}
}
Each numeric voice_modify field is an integer from -100 through 100. sound_effects accepts spacious_echo, auditorium_echo, lofi_telephone, or robotic. Voice modification is available only for MP3, WAV, and FLAC output.
Estimate credits
curl -X POST https://api.aivideoapi.ai/v1/estimate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "speech-2.8-turbo",
"input": {
"text": "你好, AI!",
"voice_setting": { "voice_id": "audiobook_male_1" }
}
}'
The estimate and generation request use the same server-derived billable_characters, pricing formula, two-decimal rounding, and account multiplier.
Query a task
curl https://api.aivideoapi.ai/v1/tasks/{taskId} \
-H "Authorization: Bearer sk-your-api-key"
Status transitions are pending → processing → completed or failed. MiniMax Speech tasks cannot be cancelled because MiniMax's asynchronous speech API does not provide customer cancellation. Poll your platform task at a reasonable interval such as 2 seconds; the platform enforces MiniMax's upstream query limit below 10 requests per second across workers.
Transient upstream query errors—including HTTP 429, MiniMax code 1002, network failures, and 5xx responses—leave the task processing. They do not fail the task or refund credits. A refund occurs once only after MiniMax authoritatively reports Failed or Expired, or when submission is rejected before MiniMax accepts a task. Completed tasks never enter a refund path.
If the submission connection ends after the request may have been sent but before any authoritative response or task ID arrives, the platform marks the outcome for manual reconciliation and retains the pre-charge. Automatically refunding an ambiguous submission could otherwise refund work that MiniMax accepted.
Completed response
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "completed",
"model": "speech-2.8-hd",
"credits_consumed": 0.7,
"output": {
"urls": ["https://file.aivideoapi.ai/audio/2026/08/11/example.mp3"],
"metadata": {
"file_id": "95157322514496",
"filename": "speech.mp3",
"bytes": 5896337,
"format": "mp3",
"storage": "r2",
"source_url_expires_in": 86400
}
},
"usage": { "characters": 45 }
}
The platform first attempts to copy a successful file to R2 and returns a signed URL valid for 24 hours. If copying fails, the completed task immediately falls back to MiniMax's original URL, which is valid for about 9 hours. This delivery fallback never changes a successful task to failed and never triggers a refund. Check output.metadata.storage and source_url_expires_in to identify the source and lifetime.
Callback
Set callback_url on the create request. The platform sends the same completed or failed task shape to that URL. Duplicate polling or callback delivery is safe: task completion and refund transitions are protected against duplicate side effects.
Error Codes
When a request fails, the API returns a JSON error response:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
Error Reference
| HTTP Status | Code | Type | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | Missing or invalid parameters |
| 401 | invalid_api_key | authentication_error | API key is invalid, disabled, or deleted |
| 402 | insufficient_credits | billing_error | Credit balance too low, please top up |
| 403 | ip_not_allowed | permission_error | Request IP not in the key's allowlist |
| 404 | model_not_found | invalid_request_error | Model does not exist or is inactive |
| 404 | task_not_found | invalid_request_error | Task ID does not exist |
| 429 | rate_limit_exceeded | rate_limit_error | Too many requests, please slow down |
| 429 | spend_limit_exceeded | billing_error | Key spend limit reached (hourly/daily/total) |
| 500 | internal_error | api_error | Unexpected server error |
| 503 | upstream_error | upstream_error | Upstream AI provider returned an error |
Common Scenarios
invalid_request (400)
Returned when required fields are missing or invalid.
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
Your balance is too low. Check your balance with GET /v1/credits and top up in Dashboard > Billing.
invalid_api_key (401)
Possible causes:
- The key does not start with
sk- - The key has been disabled or deleted
- The user account has been banned
upstream_error (503)
The upstream AI provider returned an error. This may happen when:
- The input contains sensitive or prohibited content
- The provider is temporarily unavailable
- The request parameters are not supported by the provider
Credits are automatically refunded when a task fails due to upstream errors.