Token Usage Tracking
The native Edgee SDK exposes response usage for tracking tokens and costs. The examples below assume an initializededgee client; see your language’s SDK guide for setup.
- Model (GPT-5.2 vs Claude vs Gemini)
- Project or application
- Environment (production vs staging)
- User or tenant (for multi-tenant apps)
- Time period (daily, weekly, monthly)
Use token usage data with provider pricing to calculate costs. The Edgee dashboard automatically calculates costs based on real-time provider pricing.
Request Tags for Analytics
Tags allow you to categorize and label requests for filtering and grouping in your analytics dashboard. Add tags to track requests by environment, feature, user, team, or any custom dimension. Using tags in native SDKs:- TypeScript
- Python
- Go
- Rust
x-edgee-tags header (comma-separated):
- OpenAI SDK (TypeScript)
- Anthropic SDK (Python)
Environment taggingTag by environment:
production, staging, developmentFeature taggingTag by feature:
chat, summarization, code-generation, rag-qaUser/tenant taggingTrack per-user or per-tenant usage:
user-123, tenant-acme, customer-xyzTeam taggingOrganize by team:
team-backend, team-frontend, team-dataCompression Metrics
See exactly how much token compression is saving you on every request:Reading the compression block
The native Edgee SDK exposes a compression block when compression details are returned. Do not assume every provider-compatible response includes this extension; use the console to inspect those requests.
The
usage.prompt_tokens field on the same response reflects the compressed count actually billed by the provider, not the original input.