Docs /Reference /Rate limits .md

Rate limits

How many calls each Model, Search and engine take on each Plan, the headers that report them, and what to do with a 429 or a 403 plan_required.

Rate limits keep the API fast for everyone. They apply per Account, to all its API keys together, and each Model, Search and engine has its own: a burst of Queen calls never slows your Knight calls.

Your Account's Plan sets its limits. Every Account starts on Free; Hobby and Pro are the paid Plans, and a move between Plans applies at once. Buying a Top-up doesn't change the Plan.

The limits

Limit forRequests per minute (Free / Hobby / Pro)Calls capped (Free only)Also (Free / Hobby / Pro)
Knight (knight-1)20 / 150 / 1,5001,000 a day150,000 / 1,000,000 / 10,000,000 tokens per minute
Queen (queen-1)20 / 30 / 300100 in any 7 days160,000 / 250,000 / 2,500,000 tokens per minute
chessdrive-embed-160 / 150 / 1,500500 a day9,000 / 30,000 / 100,000 items per minute, 2 / 4 / 12 requests in flight, and 256 items per call
Search 20 / 150 / 1,500250 a day
Stockfish20 / 150 / 1,500200 a day for Stockfish and Lc0 together6 / 6 / 18 requests in flight
Lc0 5 / 30 / 300(shared with Stockfish)1 / 2 / 2 requests in flight

Hobby and Pro have no caps on calls. If you need more than the Pro limits, write to contact@edgecaselabs.dev with what you're building.

The Usage API, GET /v1/usage and GET /v1/balance, has a limit of its own: 60 requests a minute per Account on every Plan, the two together, and no daily cap. It never uses up the limits above.

  • Tokens per minute (Generate) count each call's estimated input when it starts, then correct to the tokens it actually processed, input and output, when it ends. A long answer can use more than what was left, and the calls after it wait until the minute catches up.
  • Items per minute (Embed) count positions and texts, so one call of 256 items uses as much as 256 calls of one.
  • Requests in flight (Engine and Embed) count the calls still running. An analysis ends when its limit is reached or at the 60-second cap, whichever comes first, and an Embed call when its vectors come back. An Engine call over them waits up to 5 seconds for one to end before it gets a 429; an Embed call gets the 429 at once. A list of positions or a whole game is one request and one in flight.

The headers

Every call that reaches the rate-limit step reports the requests-per-minute limit for what it called, on success and on refusal alike (200, 402, 403 plan_required, 429 and 5xx). A call refused earlier, for a bad request (400), a key (401) or another permission (403), carries none.

HeaderMeaning
x-ratelimit-limit-requestsRequests per minute allowed.
x-ratelimit-remaining-requestsRequests left this minute.
x-ratelimit-reset-requestsSeconds until the requests-per-minute allowance is full again.
x-ratelimit-limit-concurrentEngine and Embed only: requests allowed in flight.
x-ratelimit-remaining-concurrentEngine and Embed only: requests you may still start while yours run.
Retry-AfterOn a 429 or a 403 plan_required only: seconds to wait before retrying.

The other limits, tokens and items per minute and the caps on calls, don't have headers of their own: they speak when they refuse a call, in its code.

A 429 means wait

A call over a limit is refused with 429 and a rate_limit_error, never billed. Its code names the limit it hit:

CodeLimitClears
rate_limitedRequests per minute, Embed's items per minute, Embed's requests in flight, or Engine's requests in flight after a 5-second wait.Within the minute, or when one of your running analyses or Embed calls ends.
token_rate_limitedGenerate's tokens per minute.Within the minute.
daily_limit_reachedFree's requests per day.At midnight UTC, or at once when the Account moves to Hobby or Pro.

Wait the Retry-After seconds, then send the same call again. Don't retry in a tight loop: until then, every retry is refused too.

A 403 plan_required means Queen needs a paid Plan

On Free, Queen takes 100 calls in any 7 days, counted per Account across all its API keys and Connections. Every call that gets past the rate limit counts, whether it then succeeds or fails; a call refused before it doesn't. The 101st is refused with 403, a permission_error and the code plan_required, never billed. Its resets_at and Retry-After say when the oldest of those calls leaves the 7 days and frees one.

Knight still works. A Skill or an agent that gets plan_required should go on with Knight, or tell its user that Hobby lifts the cap. Moving the Account to Hobby or Pro lifts it at once.

A 402 is not a rate limit. It means the call was refused for money: the Balance is used up, or the Spend limit or the Key limit is reached. Waiting won't clear it, except a Key limit at its reset; a top-up or a raised limit will. See Errors.

Retry after a 429

Honour Retry-After and give up after a few tries. curl does this itself with --retry; in code, a small loop does.

curl https://api.chessdrive.io/v1/generate \
  --retry 3 \
  -H "Authorization: Bearer $CHESSDRIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "knight",
    "messages": [{ "role": "user", "content": "Name one opening for White." }]
  }'