Usage windows and limits
How subscription windows, overage and rate limits work, with the headers and the 429 answers.
Subscription windows
A subscription has two usage windows sized by its plan: a 5-hour window and a weekly window.
- A window starts with the first request after the previous one ended, and runs for its full length (5 hours, 7 days).
- A request is within your plan when both windows still have room. The request that crosses the line completes; the next one does not.
- Usage is counted in points: the model and the input, output and cached tokens of a request decide its points.
Every answer to a subscription key carries the window headers:
x-window-5h-utilization: 0.37
x-window-5h-reset: 1763560800
x-window-weekly-utilization: 0.12
x-window-weekly-reset: 1763971200
x-billing-class: window| Header | Meaning |
|---|---|
x-window-5h-utilization | how much of the 5-hour window is used, from 0 to 1 (may pass 1 by the last request) |
x-window-5h-reset | when the 5-hour window resets, in Unix seconds |
x-window-weekly-utilization | the same for the weekly window |
x-window-weekly-reset | when the weekly window resets, in Unix seconds |
x-billing-class | window (within the plan) or overage (past it, paid from the balance) |
Overage
Switch overage on in your dashboard to keep working past your windows: such requests are charged at the prices per request from your balance, optionally under a monthly cap you set. Without overage, or when the balance is empty, the request is refused:
HTTP/1.1 429 Too Many Requests
retry-after: 5400
x-should-retry: false
x-window-5h-utilization: 1.02
x-window-5h-reset: 1763560800
x-window-weekly-utilization: 0.41
x-window-weekly-reset: 1763971200
x-billing-class: window
{"type": "error",
"error": {"type": "rate_limit_error", "code": "window_5h",
"message": "usage limit reached for the 5-hour window; resets at 2025-11-19T14:00:00Z (in 5400 s)"}}HTTP/1.1 429 Too Many Requests
retry-after: 5400
x-should-retry: false
{"error": {"type": "usage_limit_reached", "code": "window_5h",
"message": "usage limit reached for the 5-hour window; resets at 2025-11-19T14:00:00Z (in 5400 s)",
"resets_in_seconds": 5400, "resets_at": 1763560800}}error.code is window_5h or window_weekly (the later reset when both are used up). retry-after is the number of seconds until the reset; x-should-retry: false says that retrying earlier cannot help.
Read the reset time from resets_at (Unix seconds), retry-after or the x-window-*-reset headers, not from the message text.
Rate limits
Keys and workspaces may have requests-per-minute and concurrency limits, set in your dashboard. Answers carry the headroom of the limit nearest to refusing you:
x-ratelimit-limit-requests: 600
x-ratelimit-remaining-requests: 598
x-ratelimit-reset-requests: 42
x-ratelimit-limit-concurrency: 20
x-ratelimit-remaining-concurrency: 19| Header | Meaning |
|---|---|
x-ratelimit-limit-requests / -remaining-requests / -reset-requests | requests per sliding minute; reset in seconds |
x-ratelimit-limit-concurrency / -remaining-concurrency | requests in flight at once |
x-ratelimit-end-user-limit-requests / -remaining-requests | the limits of one end user, when set (end users) |
Past a limit the answer is 429 with retry-after and a code naming the limit and its level, such as key_rpm, key_concurrency, end_user_rpm or end_user_concurrency.
Good practice
- Read
retry-afterand the window headers instead of guessing. - Show the window reset time to your users when you get
window_5horwindow_weekly. - Cache long prompts: cached reads use fewer points and cost less.