What is token usage?#
Every AI model charges by the token — roughly, a token is about four characters of text. Toolbelt tracks token consumption at multiple levels (per-message, per-chat, per-assistant, and per-user) so you always know what you're spending and where.
Beyond tracking, Toolbelt includes automatic conversation management that keeps your conversations within each model's context window — without interrupting your flow.
Viewing your token usage#
Navigate to Settings → Token Usage in the Toolbelt dashboard. The overview shows:
- Total tokens used — your lifetime count (input + output combined)
- By assistant — a ranked list of assistants sorted by usage
- Recent usage by model — the last 30 days of activity broken down by AI provider and model
Token counts are updated in real time as you chat.
Usage breakdown#
Toolbelt tracks three token categories:
| Category | Description |
|---|---|
| Input tokens | Tokens sent to the model (your messages + conversation history + system prompt + tool definitions) |
| Output tokens | Tokens generated by the model in response |
| Total tokens | Input + output combined |
If your model supports prompt caching, Toolbelt automatically subtracts cached tokens from your input count so the number reflects what you're actually being charged.
Automatic conversation management#
Long conversations can exceed a model's context window. Rather than throwing an error, Toolbelt automatically trims the conversation before sending it to the AI — preserving your most important context.
How trimming works#
System messages are always kept. Your assistant's instructions are never trimmed.
The last 10 messages are always kept. Recent context is the most important.
Tool call/response pairs are never split. If a tool call is included, its corresponding response stays with it — or both are removed together.
Older messages are scored and selected. Messages in the middle of the conversation are ranked by importance:
- Role weight: system > user > assistant > tool
- Presence of tool calls
- Message length
- Important keywords (errors, success states, etc.)
- Recency within the middle section
When trimming occurs, you'll see a notification in the chat:
💡 Conversation Optimized
Your conversation was getting long (1,120,400 tokens), so I've intelligently
trimmed it to stay within GPT-6.1 Sol's limits.
Optimized: 54 → 26 messages
Tokens: 1,120,400 → 680,210 (limit: 1,050,000)
I kept the most important messages and recent context to maintain conversation quality.
Large tool response compression#
When a tool returns a very large response (over 5,000 tokens), Toolbelt compresses it before adding it to the conversation history. The compressed version preserves actual data structure and values — it's not just a generic description. A full expandable view remains available in the chat.
Model-aware token limits#
Toolbelt automatically detects the model you're using and applies the correct limits. A 20,000-token safety buffer is applied to all models to reduce the chance of limit errors.
| Model family | Context window |
|---|---|
| OpenAI GPT-6 & GPT-6.1 (Astra, Sol, Terra, Luna) | 1,050,000 tokens |
| Anthropic Claude (Sonnet 5.5, Haiku 5.5, Fable 5.2) | 1,000,000 tokens |
| Anthropic Claude Opus 5.5 | 200,000 tokens |
| Google Gemini (Gemini 4 Carbon, Argon, Neon, Hydrogen; Gemini 3.8 Flash, 3.1 Pro, 3.5 Flash Lite) | 1,000,000 tokens |
| xAI Grok (4.7, 4.6) | 500,000 tokens |
| Toolbelt Crescent (Large, Medium, Small) | 262,144 tokens |
| Toolbelt Free (Qwen 3 30B) & Fallback default | 128,000 tokens |
Retired Inception Labs Mercury models (mercury-2) are automatically routed to Toolbelt Crescent Medium (crescent-medium) with a 262,144-token context limit (or 128,000 tokens on legacy budgeting).
API reference#
Get user token usage#
GET /api/token-usage/user
Returns your lifetime token totals, a per-assistant breakdown, and recent usage by model/provider.
Example response
{
"user": {
"totalTokensUsed": 1240000,
"inputTokensUsed": 830000,
"outputTokensUsed": 410000,
"lastTokenUsageDate": "2026-03-22T18:00:00Z"
},
"assistants": [
{
"id": "ws_abc123",
"name": "Research Assistant",
"totalTokensUsed": 740000,
"inputTokensUsed": 500000,
"outputTokensUsed": 240000
}
],
"recentUsage": [
{
"provider": "openai",
"model": "gpt-6.1-sol",
"inputTokens": 620000,
"outputTokens": 310000,
"totalTokens": 930000
}
]
}
Get organization token usage#
GET /api/token-usage/organization/:workspaceId
Returns token usage statistics for a specific assistant (organization), including a recent breakdown by model.
Organization members can access usage stats for shared organizations they have permission to view.
