Token Monitoring
Token usage is the input to every cost number in ANTS Platform. Each generation carries usage per usage type, such as input and output tokens, and the platform sums it by model, user, trace name and time.
Send usage with each generation (the OpenAI, LangChain and CrewAI integrations do it for you, or pass usage_details={"input": ..., "output": ...} in the Python SDK). When usage is missing, the platform counts tokens only if the model's definition has a tokenizer. See Models & Pricing.
Where to see token usage
| View | What it shows |
|---|---|
| A trace in Discover AI → Tracing | Usage and cost for each generation. |
| Gauge AI → Cost Performance Metrics → Model costs | Tokens and cost per model for the selected range. |
| Gauge AI → Cost Performance Metrics → Model Usage | Units by model and Units by type over time, next to Cost by model and Cost by type. |
| Gauge AI → Cost Performance Metrics → User consumption | Token cost and trace count per user. |
| Gauge AI → AI Usage → Usage by Gateway Model Group | Total tokens per Budget AI model group. |
| Gauge AI → Latency Dashboard → Avg Output Tokens Per Second by Model | Generation speed per model. |
All views filter by date range, environment, trace name, tags, user, metadata and more. To track a custom breakdown, clone a dashboard and add a widget that sums totalTokens. See Custom Dashboards.
Prices per token
Prices come from the model catalog under Settings → Models, set per usage type and shown per unit, per 1K or per 1M units. Prices change often, so check the catalog in your project rather than a fixed table. To use your negotiated rates, create a custom definition with the same model name. See Models & Pricing.
Limiting token use
ANTS Platform does not change how many tokens your application sends. To enforce limits, route traffic through Budget AI, which applies tokens-per-minute limits and USD budgets per key and project before a request reaches the provider. To find a model that does the same job with fewer or cheaper tokens, run the AI Optimizer.
Next steps
- Cost Tracking: attribute the cost of those tokens.
- Cost & Performance Metrics: tokens and cost next to quality.