Quota vs. Actual Throughput: Why LLM API Usage Doesn't Match the Numbers

    Quota is what an LLM provider records as consumable resources per billing cycle, while throughput is what your system can actually complete per unit of time. This article explains the gap between the two, covering metering units, rate limiting, hidden usage, cost structures of low-priced plans, practical evaluation metrics with sample scripts, and engineering strategies such as client-side throttling, exponential backoff, and budget alerts.

    1. Quota and Throughput Are Different Things

    Quota is the amount of resources a provider records for your account within a billing cycle, usually measured in monetary value, tokens, or request counts. Throughput is the actual volume of requests or tokens a system can process per unit of time, constrained by concurrency limits, rate limits, queuing policies, and backend capacity.

    The relationship can be roughly expressed as:

    Available calls ≈ min(quota ÷ cost per call, rate limit × available time)

    This formula shows that quota is only one of the ceilings. Even with plenty of credit on paper, rate limits can slow tasks down through queuing. When evaluating a service, you should consider both “how much you can spend” and “how fast you can run.”

    2. Metering Units Determine What a Quota Is Really Worth

    The same numerical quota can mean very different numbers of calls depending on how usage is metered.

    Pay-per-amount: Converting quota into call counts depends on unit prices, which vary with model tier, input/output ratio, and cache hits.

    Pay-per-token: Input and output tokens are often priced differently. Long contexts significantly increase input-side consumption, and multi-turn conversations get more expensive as history accumulates.

    Pay-per-request: Billing only counts requests, regardless of payload size. This favors short requests but is unfair for long-text processing, so providers usually impose extra limits on oversized requests.

    Here’s a sensitivity example with assumed numbers. Suppose the quota equals 100 units, with input priced at 0.002 per 1K tokens and output at 0.008 per 1K tokens:

    • A single call with 2,000 input tokens and 800 output tokens costs 2×0.002 + 0.8×0.008 = 0.0104, allowing roughly 9,615 calls.
    • If input grows to 20,000 tokens, the per-call cost rises to 20×0.002 + 0.8×0.008 = 0.0464, allowing roughly 2,155 calls.

    A tenfold increase in input size reduces available calls to about a quarter. When estimating quota, you must calculate based on the actual token distribution of your workloads—not the idealized unit numbers on a marketing page.

    3. Rate Limits: Quota Remaining, but Tasks Slowing Down

    Common server-side rate-limiting algorithms include fixed windows, sliding windows, token buckets, and leaky buckets. They all aim to smooth traffic and prevent a single user from monopolizing shared resources.

    The token bucket is the most widely used. Tokens are added at a fixed rate, each request consumes tokens, and excess tokens overflow. It allows short bursts while constraining the long-term average rate. Here is a simplified client-side implementation:

    1. import time
    2. import threading
    3. class TokenBucket:
    4. def __init__(self, rate_per_sec: float, capacity: float):
    5. self.rate = rate_per_sec
    6. self.capacity = capacity
    7. self.tokens = capacity
    8. self.updated = time.monotonic()
    9. self.lock = threading.Lock()
    10. def acquire(self, n: float = 1.0) -> None:
    11. while True:
    12. with self.lock:
    13. now = time.monotonic()
    14. elapsed = now - self.updated
    15. self.tokens = min(self.capacity, self.tokens + elapsed * self.rate)
    16. self.updated = now
    17. if self.tokens >= n:
    18. self.tokens -= n
    19. return
    20. wait = (n - self.tokens) / self.rate
    21. time.sleep(wait)

    When throttled, the server typically returns HTTP 429, and some implementations include a Retry-After header. Clients should honor that header’s wait time rather than retrying blindly.

    4. Why Quota Decreases Even When You’re Not Running Tasks

    A common puzzle when monitoring quota: no new tasks have been submitted, yet usage keeps climbing. Common causes include:

    1. Background retries: Client SDKs or middleware may automatically resend requests after timeouts, while the original request may have already been processed.
    2. Long connections and streaming output: Streaming responses are metered continuously during transmission, and partial output after a disconnect may still be billed.
    3. Scheduled jobs and health checks: Leftover cron jobs or probing scripts may still be hitting the API.
    4. Shared credentials: The same key used by multiple processes, team members, or CI pipelines generates calls from more sources than expected.
    5. Queuing and failure metering: Some providers meter requests once they enter the queue or even when processing fails. Check the terms of service and technical documentation for specifics.

    When investigating, first break down call logs by key, endpoint, and time window to identify the source of consumption, then determine whether it stems from provider metering rules or abnormal client behavior.

    5. The Cost Structure Behind Low-Priced Usage Plans

    Whether a usage plan is a good deal depends on the provider’s cost structure. Common industry practices include:

    • Separating fixed and marginal costs: Model deployment and reserved compute are fixed costs; electricity and computation per call are marginal costs. Higher utilization means lower unit costs.
    • Off-peak scheduling: Compute utilization is lower at night and during off-peak hours, so providers can attract such workloads with lower prices.
    • Caching and batching: Caching repeated prefixes and batching requests can significantly reduce per-unit computation.
    • Rate limiting as cost control: Using rate limits to cap peak load makes resource consumption predictable—rate limiting is itself a cost-management tool.
    • Acquisition and retention: Low-priced plans are sometimes used to attract users, with the cost booked as marketing spend.

    These are general cost-analysis perspectives. For any specific service, consult its public terms and technical documentation—don’t infer pricing logic from promotional numbers alone.

    6. How to Evaluate the Real Value of a Usage Plan

    Replace marketing numbers with measured data. Focus on these metrics:

    • Effective call rate: successful requests ÷ total requests.
    • Throttling ratio: percentage of requests returning 429.
    • Latency percentiles: median (P50) and tail (P95) latency—tail latency better reflects queuing conditions.
    • Token consumption per task: average input and output tokens for a typical task.
    • End-to-end task time: from submission to a usable result.

    Here’s a sample statistics script, with input records for each request:

    1. import statistics
    2. def summarize(records: list[dict]) -> dict:
    3. """Each record includes: ok (bool), latency (seconds), tokens (int)"""
    4. total = len(records)
    5. succeeded = [r for r in records if r["ok"]]
    6. if total == 0:
    7. return {}
    8. latencies = sorted(r["latency"] for r in succeeded)
    9. p95_index = max(0, int(len(latencies) * 0.95) - 1) if latencies else None
    10. return {
    11. "success_rate": len(succeeded) / total,
    12. "p50_latency": statistics.median(latencies) if latencies else None,
    13. "p95_latency": latencies[p95_index] if latencies else None,
    14. "avg_tokens_per_success": (
    15. statistics.mean(r["tokens"] for r in succeeded) if succeeded else None
    16. ),
    17. }

    Testing should cover different time periods and task sizes, with enough samples. Single runs are easily affected by network and load fluctuations; repeated sampling is needed for stable conclusions.

    7. Engineering Strategies for Closing the Gap

    To handle the gap between quota and throughput, consider these design improvements:

    1. Client-side throttling: Use a token bucket or similar mechanism to control the sending rate, spreading bursts over time to reduce 429 responses.

    2. Exponential backoff with jitter: Grow retry intervals exponentially with failure count and add random jitter, preventing many clients from retrying simultaneously.

    1. import random
    2. import time
    3. def call_with_backoff(fn, max_retries: int = 5, base: float = 0.5, cap: float = 30.0):
    4. for attempt in range(max_retries):
    5. try:
    6. return fn()
    7. except RuntimeError: # Replace with the specific throttling or timeout exception in real projects
    8. if attempt == max_retries - 1:
    9. raise
    10. delay = min(cap, base * (2 ** attempt))
    11. time.sleep(delay * random.uniform(0.5, 1.0))

    3. Task queues and priorities: Put non-real-time tasks into queues and run them during off-peak hours or when quota is plentiful; let real-time tasks consume quota first.

    4. Multi-model fallback routing: When the primary model is unavailable due to throttling or failures, switch to a backup model. Run regression tests on output quality before switching, since different models may vary in style and accuracy.

    5. Budget alerts: Set thresholds based on remaining quota percentage—for example, notify at 70% and 90% consumption—to avoid tasks failing midway due to exhausted quota.

    8. Final Checklist

    • Estimate available calls from the actual token distribution of your workloads, not theoretical marketing figures.
    • Confirm the metering unit (amount, tokens, or requests) and its conversion rules.
    • Implement client-side throttling and handle 429 responses and Retry-After headers correctly.
    • Add exponential backoff with jitter to retries, and cap the maximum retry count.
    • Break down call records by key and purpose, and audit abnormal consumption regularly.
    • Measure effective call rate, latency percentiles, and per-task consumption before committing to a plan.
    • Prepare fallback options and budget alerts for critical tasks.