What is FluxGate?
FluxGate is an observability and cost-monitoring platform for AI/LLM usage. It lets your backend record every LLM call — tokens consumed, cost incurred, latency, and any custom metadata you attach — and surfaces that data in a real-time dashboard.
It answers questions like:
- "How much does our
code-reviewfeature cost per day?" - "Which of our users is responsible for 40% of our OpenAI bill?"
- "Why did latency spike on Tuesday at 3 AM?"
How it works
Your app → @fluxgate/sdk (or a wrapper) → FluxGate API → Dashboard
- You install a small SDK package — or a provider-specific wrapper (
@fluxgate/openai,@fluxgate/anthropic,@fluxgate/gemini). - The SDK sends a lightweight JSON payload to the FluxGate API after each LLM call. This happens asynchronously and never blocks your response.
- FluxGate stores the event, calculates cost using its live
ModelPricingtable, and makes the data available on your dashboard immediately.
Key concepts
| Concept | What it is |
|---|---|
| AiEvent | One telemetry record — one LLM call |
| feature | A string tag you attach to group events by product feature |
| user | Your app's user ID (or a full TrackedUser object with name/email/MRR) |
| Organization | Multi-tenant workspace — one account can hold multiple orgs |
| ModelPricing | Server-side table of per-token costs, updated when providers change prices |
Prerequisites
- A FluxGate account — sign up at fluxgate.app
- An API key — generate one under Settings → API Keys
- Node.js ≥ 18
Next steps
- Installation — install the SDK and send your first event
- OpenAI integration — zero-boilerplate tracking for OpenAI
- Anthropic integration — tracking for Claude
- Gemini integration — tracking for Google Gemini