Skip to main content

Max Keys Exceeded

max_keys_exceeded409

Billing · API key creation in the dashboard

Your plan's limit of active API keys is reached. Revoke a key you no longer use, or upgrade, before creating another.

What this means​

A request to create a new API key was refused because the account already has as many active keys as its plan allows: 5 on Sandbox, 10 on Builder, 20 on Launch and 40 on Scale. No key was created, and every existing key keeps working. Keys that AI apps hold after you connect them over MCP count toward the limit too.

When you'll see this​

  • Someone chose Create key in the dashboard while the account was already at its plan's limit.
  • Keys made for old projects, demos or tests were never revoked.
  • Several AI apps connected over MCP each hold their own key.
  • The plan was downgraded, so a lower limit now applies to the keys that already exist.
Learn more about how this works

The limit counts the account's active keys at the moment a new one is requested; revoked keys don't count. Retrying never helps: the request only succeeds after a key is revoked or the plan is upgraded. Rotating a key doesn't count as adding one, so an account at its limit can still rotate.

The most common gotcha: "active" doesn't mean "in use." A key nobody has called for months still counts until it is revoked, and so does the key of an AI app you stopped using but never disconnected.

Example response​

{
"success": false,
"error": "max_keys_exceeded",
"message": "You have reached your plan's limit of active API keys. Revoke a key or upgrade to add more.",
"details": [],
"retry_after": null,
"doc_url": "https://docs.asterwise.com/reference/errors/max_keys_exceeded/",
"request_id": "req_01HXYZABCDEFGH",
"timestamp": "2026-05-25T12:34:56Z"
}
NEW TO APIS?
Quick fix
  1. Sign in at asterwise.com/dashboard and open API Keys.
  2. Revoke keys you no longer use, and disconnect AI apps you no longer use under Connected Apps.
  3. Create the new key. To raise the limit instead, upgrade the plan.
PRODUCTION ENGINEER
Recovery pattern

Only the dashboard receives this error: creating keys needs a dashboard sign-in, and an API key sent to the key endpoints gets session_required instead. Code that calls the API with a key never sees max_keys_exceeded. Plan key counts the way you plan anything else in the dashboard: the API Keys page shows how many keys are active and the plan's limit.

Production handler​

No code example provided.

Avoid this error by​

  • Name keys clearly when you create them. production-web-2026-01 is better than Key 4, so you can tell later which ones are still needed.
  • For ephemeral integrations (CI, scripts, demos), use one stable key and rotate it on a schedule, not one key per run.
  • Review your key list and your connected AI apps every few months, and revoke anything you can't identify.
  • For multi-developer accounts, record which key belongs to which person or service in your team's shared notes.