Rate limits
Baseten applies two rate limits:- Requests per minute (RPM): The maximum number of API requests per minute.
- Tokens per minute (TPM): The maximum number of input and output tokens processed per minute. Cached and uncached input tokens count equally toward this limit, even though cached tokens cost less.
To raise a Basic account’s limits, request email verification. You can also use that form to move to Pro or Enterprise.
Rate limit response headers
Successful responses and429 Too Many Requests errors from Model APIs include these rate limit headers:
x-ratelimit-limit-requests: Reports the maximum number of requests you can send per minute.x-ratelimit-remaining-requests: Reports how many requests remain before you reach the request rate limit.x-ratelimit-limit-tokens: Reports the maximum number of tokens your requests can use per minute.x-ratelimit-remaining-tokens: Reports how many tokens remain before you reach the token rate limit.
429 Too Many Requests response.
Rate limits do not guarantee available capacity. Baseten can return
529 Overloaded when a Model API runs out of capacity. See 529: overloaded.Pricing
Model APIs bill per million tokens. For current per-model rates, see the Model APIs pricing page. Fast tier variants have their own per-model pricing and rate limits; see Supported models for details.Cached input tokens
Cached input tokens are prompt tokens served from the KV cache at a discounted rate. Caching is automatic and requires no request flags. For coding-agent requests, Baseten uses recognized session IDs to pin related requests to the same replica. Claude Code, Codex, and OpenCode include these IDs without additional configuration. Baseten checks the following header:x-session-affinity: generic session ID
x-claude-code-session-id: Claude Code’s root sessionx-claude-code-agent-id: Claude Code’s subagentsession-id: Codexx-opencode-session: OpenCodex-session-id: generic session ID
x-session-affinity value to pin related requests to the same region or replica. Use one ID for a single conversation or agent task, including its subagents. Do not reuse an ID across unrelated tasks because doing so concentrates traffic on one replica.
The ID should remain stable within a task and differ across tasks. For example, hash your internal conversation or session ID with SHA-256 and use the first 16 hexadecimal characters:
x-session.py
x-session-affinity header on every request in the conversation:
Budgets
Set a monthly budget to receive email notifications as workspace spend approaches the configured amount. If you enforce the budget, Baseten rejects Model API requests after the workspace reaches it. Budget enforcement does not affect dedicated inference or training.Usage
Track Model APIs usage withbaseten model-api usage or the GET /v1/model_apis/usage REST endpoint. Both return input, cached input, uncached input, and output token counts, plus request counts, in 1m, 1h, or 1d buckets. Group or filter results by API key, user, or model. Personal API keys and OAuth credentials are attributed to a user; usage from credentials that are not user-scoped has a null user ID.
- Baseten CLI
- REST API
Show daily usage per model over the last 7 days:Break hourly usage down by user and model for one model:Filter to a specific API key prefix and output JSON:
Usage data is available from August 5, 2026 at 20:45 UTC (
2026-08-05T20:45:00Z). Baseten did not backfill earlier Model APIs usage.baseten_model_api_tokens_total splits token counts by token_type (uncached_input, cached_input, output), and baseten_model_api_inference_requests_total counts requests by status_code. See Model API metrics for the full label set.
Next steps
Inference errors
Handle
429 Too Many Requests and other status codes.Model APIs overview
Review supported models and features.