MiniMax Audio

MethodPathUse
POST/minimax/v1/t2a_v2Catalog-advertised MiniMax T2A inbound
POST/v1/t2a_v2MiniMax SDK alias with the same semantics

This is MiniMax synchronous speech synthesis (T2A V2) as an inbound protocol. The gateway accepts a MiniMax T2aV2Req body as-is (model, text, voice_setting, audio_setting, stream, and other MiniMax fields) and renders a MiniMax T2aV2Resp, so a client written against MiniMax's own documentation can decode this surface directly.

model is the platform logical model name; policy, routing, and billing apply as usual. The logical model must advertise minimax_t2a in public_protocols, or the gateway rejects the call as a protocol mismatch.

For OpenAI-shaped binary audio, see Speech.

Synthesize

The two paths are equivalent:

bash
curl https://api.modelgo.ai/minimax/v1/t2a_v2 \
  -H "Authorization: Bearer $MODELGO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model>",
    "text": "Hello from ModelGo.",
    "voice_setting": { "voice_id": "female-shaonv", "speed": 1, "vol": 1, "pitch": 0 },
    "audio_setting": { "sample_rate": 32000, "bitrate": 128000, "format": "mp3", "channel": 1 }
  }'

A successful non-stream response is MiniMax JSON. Audio lives in data.audio as a hexadecimal string (not a raw audio/mpeg body):

json
{
  "base_resp": { "status_code": 0, "status_msg": "success" },
  "data": { "audio": "<hex mp3 bytes>", "status": 2, "ced": "" },
  "extra_info": {
    "audio_length": 2448,
    "audio_sample_rate": 32000,
    "audio_size": 40884,
    "bitrate": 128000,
    "word_count": 16,
    "usage_characters": 22,
    "audio_format": "mp3",
    "audio_channel": 1
  }
}

The response shape from speech-2.8-turbo against POST /minimax/v1/t2a_v2 (hex truncated): The same model on POST /v1/audio/speech returns model_protocol_not_offered.

Only numeric base_resp.status_code 0 is success. HTTP 200 with a non-zero status_code is still a failed invoke.

Streaming

Set "stream": true. The response is SSE whose events are MiniMax JSON (incremental hex audio), not OpenAI chat choices[].delta chunks.

Failures and HTTP status

In-band MiniMax errors are echoed to the caller. The gateway maps status_code to HTTP:

MiniMax status_codeHTTP
1004401
1002 / 1039429
2013 / 1042400
any other non-0502

Billing

Usage is the upstream character count (usage.characters, else extra_info.usage_characters). The gateway does not bill len(text).

Conventions

  • model is the platform logical model name; whether this lane is allowed is the model's public_protocols.
  • The path does not pick the upstream family. Routing on the logical model decides MiniMax-direct vs a Bailian adaptor.
  • Providers on the route must declare MiniMax T2A. An OpenAI-compatible relay alone returns provider_unsupported.