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

ModelStandard price per 10,000 billable characters
speech-2.8-hd155.33 credits
speech-2.8-turbo88.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

FieldTypeRequiredDescription
modelstringYesspeech-2.8-hd or speech-2.8-turbo
inputobjectYesSpeech parameters below
callback_urlstringNoPublic HTTP(S) URL that receives completion or failure callbacks

Input fields

FieldTypeRequiredDescription
textstringYesNon-empty direct text, at most 50,000 Unicode code points
voice_settingobjectYesVoice and delivery settings
audio_settingobjectNoOutput encoding settings; defaults to MP3 upstream
language_booststringNoLanguage or dialect enhancement, or auto
pronunciation_dictobjectNoCustom pronunciation entries in tone
voice_modifyobjectNoPitch, intensity, timbre, and sound-effect processing
aigc_watermarkbooleanNoAdd 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

FieldTypeRangeDescription
voice_idstringnon-emptyRequired voice ID
speednumber0.5–2Speaking speed
volnumbergreater than 0 through 10Volume
pitchinteger-12–12Pitch offset
emotionstringhappy, sad, angry, fearful, disgusted, surprised, calmSpeech 2.8 emotion; fluent and whisper are rejected
english_normalizationbooleanEnable 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

FieldTypeValues
formatstringmp3, pcm, flac, wav, pcmu_raw, pcmu_wav, opus
audio_sample_rateintegerStandard formats: 8000, 16000, 22050, 24000, 32000, 44100; Opus: 8000, 12000, 16000, 24000, 48000
bitrateintegerMP3 only: 32000, 64000, 128000, 256000
channelinteger1 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 pendingprocessingcompleted 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 StatusCodeTypeDescription
400invalid_requestinvalid_request_errorMissing or invalid parameters
401invalid_api_keyauthentication_errorAPI key is invalid, disabled, or deleted
402insufficient_creditsbilling_errorCredit balance too low, please top up
403ip_not_allowedpermission_errorRequest IP not in the key's allowlist
404model_not_foundinvalid_request_errorModel does not exist or is inactive
404task_not_foundinvalid_request_errorTask ID does not exist
429rate_limit_exceededrate_limit_errorToo many requests, please slow down
429spend_limit_exceededbilling_errorKey spend limit reached (hourly/daily/total)
500internal_errorapi_errorUnexpected server error
503upstream_errorupstream_errorUpstream 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.