harry0703/MoneyPrinterTurbo · error · RuntimeError

MiniMax get_voice failed: {status_message}

Error message

MiniMax get_voice failed: {status_message}

What it means

MiniMax API convention: even on HTTP 200, the body carries base_resp.status_code, where non-zero signals an application-level error. This error wraps base_resp.status_msg (or 'unknown error') when status_code is not 0/'0'.

Source

Thrown at app/services/voice.py:1424

            "Content-Type": "application/json",
        },
        timeout=30,
    )
    if response.status_code != 200:
        raise RuntimeError(
            f"MiniMax get_voice failed with status {response.status_code}: "
            f"{response.text[:200]}"
        )

    try:
        body = response.json()
    except ValueError as exc:
        raise RuntimeError("MiniMax get_voice returned invalid JSON") from exc

    base_resp = body.get("base_resp") or {}
    if base_resp.get("status_code") not in {0, "0"}:
        status_message = str(base_resp.get("status_msg") or "unknown error")
        raise RuntimeError(f"MiniMax get_voice failed: {status_message}")

    catalog = []
    seen_voice_ids = set()
    response_groups = (
        ("system", "system_voice"),
        ("voice_cloning", "voice_cloning"),
        ("voice_generation", "voice_generation"),
    )
    for normalized_type, response_key in response_groups:
        for item in body.get(response_key) or []:
            voice_id = str(item.get("voice_id") or "").strip()
            if not voice_id or voice_id in seen_voice_ids:
                continue
            seen_voice_ids.add(voice_id)
            catalog.append(
                {
                    "voice_id": voice_id,
                    "voice_name": str(item.get("voice_name") or voice_id).strip(),

View on GitHub (pinned to 1f9f19c202)

Solutions

  1. Read the embedded status_msg — MiniMax's own business error text names the problem.
  2. For permission errors, use voice_type='system' or upgrade the account's plan.
  3. For quota errors, wait/refill quota and retry.
  4. Verify voice_type matches an access level the key supports.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    voices = list_minimax_voices(voice_type=vt)
except RuntimeError as exc:
    # message carries MiniMax base_resp.status_msg verbatim
    show_user_error(str(exc))  # e.g. quota/permission text from upstream
    return []

Prevention

When it happens

Trigger: Calling get_voice with a key that lacks permission for the requested voice_type; upstream business errors such as invalid voice_type, quota exhaustion, or account restrictions returned inside base_resp.

Common situations: Free-tier key querying voice_cloning/voice_generation it has no access to; account out of quota; MiniMax changing status codes for deprecated voice types.

Related errors


AI-assisted analysis of harry0703/MoneyPrinterTurbo@1f9f19c202 (2026-08-14). Data as JSON: /api/errors/53fba0eef95f2195. Report an issue: GitHub.