MixMediaAPI · Docs
Open as Markdown

Errors & limits

Response codes, task errors and rate limits.

Response format

Every response is JSON {"code", "msg", "data"}. Errors also have an error field. Check code in the body — the HTTP status can be 200 even on errors.

{
  "code": 402,
  "msg": "Insufficient balance",
  "data": {
    "balance": "0.0100",
    "required": "0.0200",
    "topUpUrl": "https://ai.aimixmedia.site/cabinet/billing"
  },
  "error": "insufficient_balance"
}

Error codes

codeerrorMeaningWhat to do
401unauthorizedMissing, invalid, disabled or deleted keyCheck the key
402insufficient_balanceNot enough balanceTop up
403account_blockedAccount blockedContact support
404task_not_foundNo such taskCheck taskId
409idempotency_conflictIdempotency-Key reused with a different bodyUse a new key
422validation_errorInvalid parameterSee msg
422unsupported_modelUnknown modelModel list
429rate_limitedToo many requestsWait Retry-After seconds
500internal_errorOur failureRetry later
505model_disabledModel temporarily disabledPick another one

Task errors

If a task was created but failed, recordInfo shows state: "fail" and a failCode. The money is refunded automatically.

failCodeMeaning
501The model could not or refused to generate (reason in failMsg)
504Timed out
503Model temporarily unavailable
422The model rejected the parameters (e.g. a photo could not be downloaded)
500Could not get the result

Rate limits

WhatLimit
Creating tasks and uploads20 requests per 10 s per key
Reads (recordInfo, list, balance)100 requests per 10 s per key
Total per IP300 requests per 10 s

Over the limit you get HTTP 429 with Retry-After. Concurrent generations are not limited: extra tasks wait in the queue. Need more? Contact us.