// How-to · Control AI costs and usage limits
Set budgets and rate limits for a team’s LLM usage
Route every model call through one gateway, issue virtual keys per person or project, and enforce budgets, rate limits and model allow-lists there.
verified 2026-10-101 official sources
Scenario: Control AI costs and usage limits →
Symptoms
- A runaway script burns a large amount of credit overnight
- Costs cannot be split by person or project
Common causes
- Everyone uses the vendor’s master key directly
- There is no single entry point to throttle
How to fix
- Deploy an AI gateway (open-source options include LiteLLM, Portkey Gateway, Higress and Kong)
- Create virtual keys per person/project with budget caps and requests-per-minute limits
- Expose only the models needed; require approval for expensive ones
- Turn on usage logs and review anomalies weekly
- Keep vendor master keys only in the gateway, never hand them to individuals
Official references
Compiled from official documentation and public discussions on 2026-10-10; not yet reproduced in our own environment. Follow the official docs if they differ.