Limits, Metering, and Costs
Scope: EE provides usage metering and quotas without platform balance deductions or financial settlement. Prices, money-based consumption, recharge and invoices on this page apply to sites with billing enabled.
AI Gateway associates requests with API-key identities, measures usage by task, and applies configured prices. Internal teams focus on allowances and attribution; external pricing and payment workflows are covered in Operating Paid Model Services.
Distinguish the controls
| Concept | Meaning |
|---|---|
| Key spending allowance | The maximum monetary consumption for a key, not a top-up balance |
| Token usage or quota | Usage is consumption; a token-count limit is distinct from a monetary limit |
| TPM | Token usage per minute, separate from monthly or lifetime allowances |
| Account balance | Funds in the personal or organization account used for consumption |
Enter a monetary amount when setting a key’s spending allowance. The API Keys list shows the amount spent and the configured limit.
Set a key allowance
Create or edit a key under personal or organization API Keys, then choose:
- Unlimited: No monetary cap on this key. Requests are still charged at the service’s rates and subject to account balance, access permissions, and rate limits.
- Monthly allowance: Resets each calendar month. Requests using the key are rejected once the allowance is exhausted.
- Total allowance: Limits lifetime monetary consumption by the key.
Set an appropriate expiration as well. See API Keys. Each key has its own spending limit; organization cost attribution is described below.
Metering and pricing
| Task | Usage measurement |
|---|---|
| Chat / Text Generation | Input (prompt tokens) and output (completion tokens) tracked separately |
| Reasoning Models | Input and output tokens, plus independent tracking and display of reasoning stream tokens (reasoning_tokens) |
| Embeddings | Input token count |
| Audio | Duration, call count, or other task-specific units |
| Images | Call count or configured resolution tiers |
| Video | Call count or other service-specific units |
Reasoning stream metering (reasoning_tokens)
For large language models with deep reasoning capabilities (such as DeepSeek-R1 and Qwen-QwQ), AI Gateway includes an additional reasoning_tokens metric in response payloads and usage breakdowns:
- Visibility and Observability: Tracks the number of tokens consumed during the model's internal chain-of-thought (CoT) reasoning process before producing the final response, enabling developers to accurately observe reasoning depth and compute overhead.
- Pricing Policy:
reasoning_tokensis currently provided as a transparent observability metric and is not billed as an extra charge. Billing remains strictly calculated based on standard input token and final completion output token rates.
Calculate charges using the target service’s SKU and metering units. Check its pricing information for the applicable input, output, cache, and multimodal rates. When accounting for costs, record provider costs separately from customer-facing prices.
Personal and organization attribution
Personal-key consumption goes to personal billing. Organization-key consumption goes to organization billing. Choose the correct owner when creating a project key, then assign a recognizable application name.
Token-call charges are deducted from the corresponding account balance. Compute vouchers cannot be used for token-based API calls. See Compute voucher eligibility.
When reconciling charges, align time ranges and check key ownership, model name, units, the applicable price, and request outcomes. For failed or interrupted requests, check consumption records for any charges incurred.
Where to look
- API Keys list: Spending progress, allowance, and expiry.
- Personal or organization billing: Charges attributed to that identity.
- Endpoint billing: Resource consumption for a dedicated endpoint; see Using Endpoints.
- Consumption reports: Platform records in deployments with operating features; see Billing Administration.
For runtime metrics such as concurrency, traffic, and latency, see Monitoring, Logs, and Troubleshooting.