Errors and limits
The error envelope
Every error, from every endpoint, has the same shape:
{
"type": "error",
"error": {
"type": "bad_request_error",
"message": "invalid params, content must include a non-empty text item (prompt is required) (2013)",
"http_code": "400"
},
"request_id": "021785229015510a2c883cf675b9804d"
}
Two details that catch people out, both inherited from the MiniMax API:
- the numeric code lives inside
message, in parentheses — there is no separatecodefield; http_codeis a string, not a number.
request_id is echoed on every response, including successes, in the
X-Request-Id header. Quote it when asking for help. Send your own and we will
use it instead.
Codes
| HTTP | error.type | Code | Meaning |
|---|---|---|---|
| 400 | bad_request_error | 2013 | Invalid parameters, or an unknown task id |
| 401 | authorized_error | 1004 | Authentication failed |
| 402 | insufficient_balance_error | 1008 | Balance will not cover the estimate |
| 422 | unprocessable_entity_error | 1026 | The prompt hit the content filter |
| 429 | rate_limit_error | 1002 | A rate or budget limit |
| 500 | server_error | 1000 | Our fault |
| 503 | overloaded_error | 1039 | No worker can serve this request shape |
Which ones to retry
429 and 503 are worth retrying, with backoff. 500 is worth retrying once.
400, 401, 402 and 422 will fail identically no matter how many times
you send them — fix the request, the key or the balance.
Task failure is not request failure
A task that is accepted and later fails reports through the query endpoint, not through an HTTP error:
{
"task": {
"status": "failed",
"error": { "code": "1000", "message": "…" }
}
}
Note task.error.code is a string, and there is no http_code. It is a
different shape from the envelope above.
A failed task costs nothing: the charge is held at submit and returned in full.
Rate limits
Four independent limits, per account:
| Limit | Default | What it protects |
|---|---|---|
| Requests per minute | 60 | The API |
| Concurrent tasks | 4 | The TPU fleet |
| Daily output seconds | 3600 | Runaway loops |
| Monthly spend | $1000 | Your invoice |
Concurrency counts queued as well as running tasks. Without that, one account could enqueue ten thousand clips and everyone else would wait a day.
All four are adjustable — ask.
Generation limits
| Resolution | 768p |
| Duration | 5–15 s |
| Frame rate | 24 fps |
| Audio | 32 kHz stereo, AAC |
| Reference images | 9 |
| Reference videos | 3, each 2–15 s |
| Reference audio | 3, each 2–15 s |
| Media files per request | 12 |
| Request body | 64 MB |
Content filtering
Prompts pass a filter before they reach a TPU. A rejection is 422 with code
1026. Filters have false positives; if you think you have one, quote the
request_id.