Reference

Rate limits

Sixty requests a minute for each API key. The headers that show your position, and what to do when you get a 429 error.

60 requests a minute for each API key. We use a fixed window that starts again each minute.

The limit applies to /v1/chat/completions, /v1/messages, /v1/messages/count_tokens and /v1/responses together. GET /v1/models has no limit of this type.

Other limits:

  • An account that has only the starter balance can send 5 requests a minute.
  • The dashboard playground has a limit of 20 requests a minute for each account.

Headers

Each response from an endpoint with a limit has these headers. A 429 response has them too.

HeaderWhat it is
X-RateLimit-LimitThe limit for this window
X-RateLimit-RemainingThe number of requests that you can send before the window ends
X-RateLimit-ResetThe time when the window ends, in Unix seconds

A 429 response also has Retry-After: 60.

When you get a 429 error

Wait before you send the request again. The openai and anthropic SDKs retry 429 and 5xx errors with backoff. To change the number of retries, set max_retries on the client.

If you write your own retry code, retry only 409, 429, 500, 502 and 503. Do not retry 400, 401, 402, 403, 404 or 422. These errors do not change when you send the request again:

import time, random, openai

def with_retry(fn, attempts=5):
    for i in range(attempts):
        try:
            return fn()
        except openai.RateLimitError as e:
            wait = float(e.response.headers.get("retry-after", 0)) or (2 ** i + random.random())
            time.sleep(wait)
        except openai.APIStatusError as e:
            # 409 and 5xx can pass on a second try. 402 needs more balance; any other 4xx needs a
            # change to the request. A retry changes nothing for those.
            if e.status_code not in (409, 500, 502, 503):
                raise
            time.sleep(2 ** i + random.random())
    raise RuntimeError("still failing after retries")

Coding tools

Claude Code, Codex and OpenCode can send many requests in one minute, for example when they start subagents. If they get 429 errors, use a second key for the second tool. Each key has its own limit.

Requests at the same time

There is no limit on the number of requests that run at the same time. But each request holds its maximum cost from your balance until it completes. Thus, many large requests at the same time can get a 402 error, although each one alone has enough balance. Make max_tokens smaller, or add balance.

What counts

A request counts when we accept it, also if the model then fails. A request that the limit refuses does not cost money.

If you need a higher limit

Write to team@kontinentai.com. Tell us what you make and the rate that you need.