fastokens

Limits & billing

How metering, spend caps, and rate limits work.

The request lifecycle

Every inference request runs the same path:

  1. Authenticate the API key.
  2. Resolve the model you requested.
  3. Check key quotas and workspace balance.
  4. Reserve balance.
  5. Call the model.
  6. Meter the actual token usage of the response.
  7. Capture the actual charge, release the unused reserve, write the ledger row.
  8. Return the OpenAI-shaped response with an X-Request-Id.

You are billed from the actual token counts of each response.

Usage buckets

Every successful request is metered into six buckets, each priced by the model's rate card:

input_tokens
cache_read_tokens
cache_creation_5m_tokens
cache_creation_1h_tokens
output_tokens
reasoning_tokens

Cached input is cheaper than fresh input on models that support it. Cache writes (5-minute and 1-hour durations) are metered separately from cache reads.

Charges are in micros

All charges are computed in USD micros: 1_000_000 micros = $1.00. A spend cap of 50000000 is exactly $50.00.

Per-key quotas

QuotaFieldBehavior
Spend capspend_cap_microsMaximum lifetime platform charge for the key
Request raterate_limit_rpmMax requests started per minute
Token raterate_limit_tpmMax ledgered tokens per minute

All three are optional and enforced before the model is called. Exceeding them returns 402 spend_cap_exceeded or 429 rate_limit_exceeded, and costs nothing.

Current limitations

  • No self-serve signup: workspaces are provisioned by our team during the pilot.
  • Top-ups are handled by our team; self-serve card top-up is on the roadmap.
  • No key rotation endpoint: create a replacement key and revoke the old one.

On this page