Docs

API Reference

Rate Limits

Rate Limits

How fast your workspace can send requests and tokens, how the limits rise, and what to do when you reach one.

Rate limits control how quickly your workspace can send requests and tokens. They exist so a sudden surge, or a loop in your code, can't flood the service, and they rise as you buy credit. They are separate from how much credit you have and from your own spend limit: each of those fails with its own error, described below.

What is limited

  • Requests per minute: how many requests your workspace can send in a minute.
  • Input tokens per minute: how many tokens your requests can send in a minute, attached files included.
  • Output tokens per minute: how many tokens of answers your workspace can receive in a minute. This limit applies only where a figure is shown for it below.
  • Concurrent requests: how many of your requests can be running at the same time.
  • Daily and monthly ceilings can also apply.

Limit tiers

Loading the current limits…

Limits apply to the workspace

Limits count everything your workspace sends: every API key and every member, together. An organization workspace shares one set of limits across the whole organization, and your Personal workspace has its own. A request counts against the workspace it was made in.

Rate limits, credit and your spend limit

A rate limit controls how quickly requests can be processed; credit determines how much usage is available to pay for. They are separate, and so is the spend limit you can set on your own account.

LimitWhat it controlsWho sets itWhat you see
Rate limitHow fast your workspace can send requests and tokens.Aivana, by tier.429 with a Retry-After header. Wait, then retry.
Credit balanceHow much usage you can pay for.You, by buying credit.402 with the code insufficient_credit. Add credit, then retry.
Purchased credit spend limitHow much purchased credit you allow to be spent in a day, week or month.Only you.429 with the code spend_limit_reached and a Retry-After that counts down to the start of the next period.

When you reach a limit

The API answers 429 with a Retry-After header, in seconds, and retry_after_ms in the body. The request wasn't processed, so you aren't charged for it. Wait that long, then send it again.

  • Spread requests out instead of sending them in a burst.
  • Retry with exponential backoff and a little random jitter. The full guidance is on Errors & Retries.
  • Queue work on your side, and cap how many requests you run at once.
  • If you reach a limit regularly, the Production Readiness card on Usage & Insights shows your recent peak against each limit.

See your limits

  • Under Your limits on the Billing page, when your workspace has a tier.
  • GET /v1/quotas returns the limits and usage for the current minute, day and month, and GET /v1/metrics reports token usage over a period. Both need a key with the metrics scope, which a key created without scopes has.

Learn more

Errors & Retries

What the API returns when something goes wrong, and how to recover.

View in Docs

Managing API Keys

Learn how to create and revoke API keys in Aivana AI Studio.

Create KeyView in Docs

Parameters

Every option the Generate API accepts.

Still have questions? We are here to help!

Try live

Run chat interactively in the Playground without any setup.

On this page

Rate LimitsWhat is limitedLimit tiersLimits apply to the workspaceRate limits, credit and your spend limitWhen you reach a limitSee your limits

Helpful links

Aivana Status

Was this helpful?

Still have questions? We are here to help!