Know what every
n8n workflow costs.
TokenSense is a drop-in AI gateway for n8n. Change one URL in your credentials, and every AI call gets logged with its exact cost, token count, and the workflow that made it. Works with OpenAI, Anthropic, and Gemini nodes.
No credit card · 10k requests/mo free · 5-min setup
The problem
Your n8n AI costs are a black box.
The meter is always running.
A workflow looped on GPT-4. No caps, no alerts, no kill switch. Just a bill you found on Monday.
OpenAI shows one number. Anthropic another. No breakdown by workflow or project.
One key shared across every n8n workflow. One rate limit takes everything down.
Your CFO asks what the Lead Qualifier costs to run. You don't know. Nobody does.
Before & After
One URL change. Full visibility.
- No per-workflow costs
- No budget caps
- No usage logs
- One shared API key
- Cost per workflow, per model
- Budget caps that block spend
- Every request logged
- Per-project API keys
Setup
Running in five minutes.
Name your workspace and we'll generate the exact URL to paste into your n8n credentials.
https://api.tokensense.io/v1In n8n: Credentials → OpenAI → Base URL
n8n appends /chat/completions automatically — use /v1 as the base.
How it works
Three steps, zero friction
Sign up & grab your endpoint
Create a free TokenSense workspace. You get your endpoint URL and API key instantly — no approval, no waitlist.
Add your provider keys
Paste your OpenAI, Anthropic, or Gemini keys into TokenSense Settings. Encrypted with AES-256-GCM — only used to forward your requests.
Swap the URL in n8n
In your n8n credential settings, change the base URL to your TokenSense endpoint. That's it — your workflows run exactly the same.
What you get
Full visibility, zero code
Per-workflow cost tracking
See exactly what each workflow spends on AI calls. No tagging, no custom headers — automatic attribution.
Budget caps that enforce
Set monthly or daily limits per workspace or project. When the cap is hit, requests stop — not just an alert.
Multi-provider routing
Route to OpenAI, Anthropic, Gemini, Mistral, and xAI through a single endpoint. Switch providers without changing workflows.
Real-time usage logs
Every AI call logged with tokens, cost, model, latency, and status. Filter by workflow, project, model, or time range.
Under 50ms overhead
Parallel enforcement checks and async logging. Your workflows stay fast — TokenSense adds minimal overhead.
Smart alerts
Budget thresholds, error spikes, latency degradation, and spend anomalies. Get notified before the bill surprises you.
Compatibility
Works with the nodes you already use
Any n8n node that lets you set a custom base URL is compatible. Here are the most common ones.
Learn more
Guides for n8n teams
FAQ
Common questions
TokenSense is a drop-in AI gateway. You change the base URL in your n8n AI credentials to point at TokenSense instead of the provider directly. TokenSense forwards requests, logs everything, enforces budgets, and sends responses back. Your workflows run exactly the same — they just gain full cost visibility.
TokenSense works with n8n's built-in OpenAI, Anthropic (Claude), and Google Gemini nodes, plus the AI Agent Chat Model sub-nodes. It also works with HTTP Request nodes making AI API calls. Any node that lets you set a custom base URL is compatible.
Minimal — typically under 50ms per request. Enforcement checks (auth, quota, budget) run in parallel, and logging happens asynchronously after the response is returned to your workflow.
Yes. You add your own OpenAI, Anthropic, or Gemini keys to TokenSense. They're encrypted with AES-256-GCM and only used to forward your requests. You can also set up per-project keys if you manage multiple clients.
No. The base setup only requires changing a URL and API key in your existing n8n credentials. We also offer an optional community node (n8n-nodes-tokensense) with extra features like dynamic model dropdowns and metadata injection, but it's not required.
Yes. The Starter plan is free and includes 10,000 AI requests per month, full cost tracking, and budget caps. No credit card required.
See what your n8n workflows actually cost.
Free to start. 10,000 requests/month on the Starter plan. No credit card required.
No credit card required · 5-minute setup