API

Rate limits

Per-key, per-account and per-IP limits, the rate limit headers and other usage limits.

Requests are counted in fixed windows. When a limit is reached the API answers 429 RATE_LIMIT:

JSON
{
  "error": {
    "code": "RATE_LIMIT",
    "message": "Rate limit exceeded. Retry after the indicated delay.",
    "retryable": true,
    "retry_after_seconds": 17
  }
}

The answer also carries a Retry-After header with the same number of seconds. Wait that long, then retry.

#Headers

Answers that went through a limit carry:

HeaderMeaning
X-RateLimit-LimitRequests allowed in the current window.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetSeconds until the window resets.

Several limits apply to each request (below); the headers describe the last one checked.

#The limits

Every /v1 request, polls included, counts against all of these:

LimitWindowNotes
Per key60 sThe default per-key allowance, or the lower rate_limit_per_min set on the key under profile menu > API keys.
Per accountshared with the AITOPIA MCP serverAll keys of the account and its MCP connections share it, so adding keys does not raise the total.
Per client IP60 sChecked before the key, at ten times the default per-key allowance.

The actual numbers are returned in X-RateLimit-Limit; build against the headers rather than a fixed value. GET /v1/openapi.json is not limited.

#Other limits

LimitValueAnswer
Waiting calls (?wait=N) per account3 at a time, shared with the MCP serverFurther waits check once and answer at once (Polling).
wait0 to 60 seconds400 INVALID_INPUT
Edit planning (POST /v1/edit, dry runs included)10 per minute, 100 per dayrefused; see error.code and retryable
Items per batch1 to 12400 INVALID_INPUT
Active runs per accounta few at once429 QUEUE_LIMIT_EXCEEDED: wait for running jobs to finish
Account generation limitsset by AITOPIA429 RUN_LIMITED: see message and retry_after_seconds
JSON request body25 MB413 FILE_TOO_LARGE
Upload link file95 MBsee File uploads
Monthly credits per keyoptional cap402 KEY_CREDIT_CAP_REACHED (Billing)

#Tips

  • Prefer webhooks or ?wait=30 long-polls to frequent short polls.
  • Use one POST /v1/batch for up to 12 independent generations instead of 12 separate submits.
  • On 429, honour retry_after_seconds instead of retrying immediately.
AITOPIA REST API · Live https://api-live.aitopia.ai/v1 · Sandbox https://api-sandbox.aitopia.ai/v1