API Rate Limit Calculator
Local model only. No API calls, provider presets, quota bypass or service guarantee.
Local model only. No API calls, provider presets, quota bypass or service guarantee.
Choose an algorithm and time unit for all scenarios. Enter every required value; use - for inapplicable fields.
Scenario columns: name; clock; batch; quota; window; origin; used; capacity; refill per time unit; tokens; last refill; cost per request; history.
Calculate every scenario. History uses comma-separated timestamps (duplicates count); - explicitly means a complete empty history.
History must be complete. Without complete timestamp state, exact sliding-window results are unknown.
Fixed windows are [start, start + window), relative to origin. Sliding windows include (clock − window, clock], expiring exactly at timestamp + window. Token refill is continuous and clipped to capacity. Retry for the full original batch assumes no intervening traffic.
Enter complete non-negative decimals, valid units and a valid model state. Maximum 100 scenarios, 200 resources and 2000 history timestamps per scenario.
A QUICK WALKTHROUGH
How to use this tool
- Choose an algorithm and time unit for all scenarios. Enter every required value; use - for inapplicable fields.
- Scenario columns: name; clock; batch; quota; window; origin; used; capacity; refill per time unit; tokens; last refill; cost per request; history.
- Calculate every scenario. History uses comma-separated timestamps (duplicates count); - explicitly means a complete empty history.
Model
Local model only. No API calls, provider presets, quota bypass or service guarantee.
Boundary rules
Fixed windows are [start, start + window), relative to origin. Sliding windows include (clock − window, clock], expiring exactly at timestamp + window. Token refill is continuous and clipped to capacity. Retry for the full original batch assumes no intervening traffic.
GOOD TO KNOW
Common questions
Does this describe a provider quota?
Only the state and rules you enter. Actual providers may use additional limits and different algorithms.
Why are timestamps needed?
Counts from previous windows cannot identify exact expiry times. Complete timestamps are required for an exact sliding window.
What does batch retry mean?
It is the earliest delay for the whole original batch before accepting any part of it. The next-request delay uses the balance after accepted requests. No further traffic is assumed.