Connect OpenRouter
Cost Catch reads your daily activity — spend, requests, and tokens per model and provider — from OpenRouter's Activity API. Summing the per-day usage is your OpenRouter-credit spend. Works for individual or organization accounts on any tier; nothing to choose.
Before you start
Two things, and the app generates the technical parts:
- An OpenRouter Management API key (Settings → Management Keys; OpenRouter's docs also call this a Provisioning API key). Not a normal
sk-or-…inference key — those get a 403 on the Activity API. Already have one? Reuse it. - A Snowflake ACCOUNTADMIN to store the key as a secret and allow outbound calls to
openrouter.ai. The app generates the SQL.
Good to know
There are no options to choose — one API, one key type. Worth knowing:
- The Activity API serves only the last 30 completed UTC days. That's why a daily schedule matters — a gap longer than 30 days loses data that can't be backfilled.
- BYOK inference is reported separately as an estimate and kept out of the unified total.
Create the key
Create a Management API key — this is the one that can read the Activity API:
- Go to Settings → Management Keys on openrouter.ai.
- Create a new key, give it a name, and create it.
- Copy the key — it's shown only once — and paste it into the wizard. Don't use a normal
sk-or-…inference key; it returns 403.
Reference: Provisioning API Keys.
Refresh cadence
Pick how often Cost Catch checks for new data. Every connection offers the same menu; we suggest a default that matches how often OpenRouter actually publishes.
| Cadence option | Good for |
|---|---|
| Every hour | Tightest freshness; more runs |
| Every 6 hours | Same-day freshness, light footprint |
| Every 12 hours | Twice a day; low cost |
| Daily Recommended | The Activity API is daily-grain and only serves the last 30 completed UTC days — a daily pull sees everything and stays clear of the 30-day data-loss cliff. |
| Custom | Any schedule you like, on your own cron |
The app pre-selects Daily and shows this reasoning right next to the picker — override it any time.
What to expect
- Keep the schedule running. Because of the 30-day window, a long pause risks unbackfillable gaps — the daily cadence stays well clear of it.
- Recent days can still change. OpenRouter aggregates by request start time, so Cost Catch re-reads and replaces a recent date's snapshot during settlement; final figures are best-effort (OpenRouter documents no explicit finality guarantee).
- Where your data lands.
RAW.VENDOR_BILLING; current billing viaANALYTICS.OPENROUTER_BILLING.
Connect it
Open OpenRouter in the setup wizard — it generates the Snowflake secret and network access, and tests the connection (catching a normal inference key) before you commit.
Stuck on a step? Email [email protected].