How LLM Subscription Rate Limits Work: Quotas, Rolling Windows, and Token Math

    This article explains why the advertised quota on an LLM subscription is rarely what you can actually spend. It breaks quota down into three dimensions—pricing, time windows, and request structure—shows how nominal quota is capped by weekly and rolling-window limits, and provides a reusable cost model for estimating real capacity per dollar. It also outlines the engineering layers behind rate limiting and practical tips for planning capacity.

    1. The Symptom: Why a “Large” Quota Runs Out

    With AI coding tools and LLM subscription plans, a familiar pattern appears: the monthly allowance on the plan looks generous, and converted into tokens it looks astronomical, yet in practice you keep hitting a ceiling and being forced to wait. The confusion usually comes down to two things: the gap between the advertised quota and what is actually usable, and the fact that different models advertise very different quotas but feel roughly the same in daily use.

    To make sense of this, quota has to be split into three independent dimensions: the pricing dimension (cost per million tokens), the time dimension (monthly, weekly, and rolling 5-hour windows), and the structural dimension (the price differences between regular input, cached input, and output). Ignore any one of them and the math goes wrong.

    2. Three Concepts That Get Confused

    2.1 Nominal Quota Is Not Usable Quota

    Nominal quota is the credit limit shown on the billing account. Usable quota is the portion you can actually spend under the time-window constraints. The relationship can be written as:

    1. usable quota = min(monthly remaining, weekly cap × remaining weeks ratio, per-window cap × remaining windows)

    As long as constraints like “at most 50% of the monthly quota per week” or “at most 20% of the monthly quota per 5 hours” exist, the nominal quota is necessarily truncated.

    2.2 A Rolling Window Is Not a Calendar Week

    A “per 5 hours” cap usually refers to a rolling window: the clock starts with your first request, and quota is only replenished 5 hours later. This means sustained heavy usage keeps resetting the window start, so real throughput ends up lower than the intuition you get from averaging across natural time periods.

    2.3 Cache Hits Change the Cost Structure

    Cached input is typically priced at only 20–30% of regular input, while output costs several times the input price. So “how many tokens one dollar of quota buys” is determined almost entirely by the input/cache/output mix of your requests, not by any single unit price.

    3. A Reusable Estimation Model

    Let the usage of the three token types be N_in, N_cache, and N_out, with unit prices p_in, p_cache, and p_out (in USD per million tokens). The cost of a single request is:

    1. C = (N_in * p_in + N_cache * p_cache + N_out * p_out) / 1e6

    Plugging in a typical set of values (regular input 1.40, cached input 0.26, output 4.40; roughly 700K regular input tokens, 52K cache reads, and 150 output tokens per request):

    1. C ≈ (700*1.40 + 52000*0.26 + 150*4.40) / 1e6
    2. ≈ 0.01516 USD per request

    From this, three key conversions follow: about 3.48 million tokens per USD, and about 348 million tokens per 100 USD. If the nominal monthly quota is 500 USD, that is nominally about 1.74 billion tokens, or roughly 33,000 typical requests. Add the “50% per week” constraint and the theoretical ceiling for one week is only 250 USD—about 870 million tokens, or roughly 16,500 requests. Add the “20% per 5 hours” constraint on top and the per-window cap is 100 USD, about 348 million tokens, or roughly 6,600 requests.

    The conclusion is clear: near the end of a cycle, with the weekly quota unspent, the maximum theoretical consumption is set by the weekly cap, not the monthly quota; and it takes at least three rolling windows to burn through the weekly allowance. This also explains a counterintuitive observation—estimate the number of requests that fit in a 5-hour window and it lines up almost exactly with the window’s quota, which suggests the rate-limit parameters and the typical request cost are designed to work together.

    4. Engineering the Rate-Limiting Strategy

    From a system design perspective, this kind of mechanism usually has four layers:

    1. Quota ledger: track consumption per account and model, using atomic decrements or a token bucket to avoid over-issuing under concurrency.
    2. Multi-level windows: the month acts as a coarse-grained budget, while the weekly and rolling hourly windows do fine-grained shaping; the effective limit is their intersection.
    3. Request shaping: on the client side, queue and back off; on 429-type responses, use exponential backoff with jitter so a freshly opened window is not saturated by a burst of traffic.
    4. Observability: turn remaining quota, window reset time, and cache hit rate into metrics and alerts, so “quota about to run out” is visible in advance.

    Illustrative client-side shaping logic:

    1. def acquire(token_budget, cost):
    2. if token_budget.remaining_window() < cost:
    3. sleep_until(token_budget.window_reset())
    4. return token_budget.consume(cost)

    5. Practical Recommendations

    • Measure the mix before talking about quota: use real workload samples to compute the input/cache/output ratio, then feed it into the model to get the real number of usable requests, instead of being misled by nominal figures.
    • Raise the cache hit rate: stable prefixes and reused system prompts and context are the most direct way to amplify effective quota.
    • Spread work across windows: split batch jobs across multiple rolling windows rather than saturating a single one.
    • Build a quota dashboard: for multi-model, multi-plan setups, aggregate consumption in one ledger to compare cost-effectiveness side by side.
    • Keep a fallback path: when quota is constrained, switch to a lighter model or local processing to keep the pipeline working.

    Overall, the “nominal quota” is only a budget ceiling; what really shapes the experience is the combined effect of the pricing structure and the time-window constraints. Model the estimation and make usage observable, and you can do accurate capacity planning for AI coding and LLM application scenarios.