How do I catch AI spend that bypassed the proxy entirely?
Shadow Spend Reconciliation compares what your provider actually billed against what Cognocient AI's proxy observed for the same period, and alerts on the gap — the only way to catch spend that never touched the proxy at all.
Every other protection in Cognocient AI — budgets, velocity limits, anomaly detection, Compromise Risk — runs inline on traffic that passes through the proxy. Shadow Spend Reconciliation exists for the traffic that doesn't: a compromised provider account, a raw API key called directly, or a call site that was never routed through Cognocient AI in the first place. It compares what your provider actually billed against what the proxy actually saw, for the same period, and alerts on the gap.
This is the feature built directly for the incident class behind Emergency Freeze: a stolen Google Cloud credential ran Gemini image generation across multiple projects, entirely outside any proxy. No inline check — Cognocient AI's or anyone else's — can see traffic that never reaches it. The only way to catch it is from the outside, by comparing the bill to what was observed.
How reconciliation works
- You give Cognocient AI a provider's reported spend for a period — provider, start/end dates, and the dollar amount from your billing dashboard or invoice.
- Cognocient AI sums its own proxy-observed spend for that same customer, provider, and period (live proxy traffic only — imported historical data is never blended into this comparison).
- If
reported − observedclears both a dollar floor and a percentage floor, an alert is raised.
Entering a snapshot
From Shadow Spend Reconciliation, either:
- Add entry — provider, period, and the dollar amount from your provider's billing dashboard, one at a time
- Upload CSV — columns
provider, period_start, period_end, reported_spend_usd, notes(notes optional), for reconciling several periods or providers at once
Connect a provider or cloud for automatic checks
On the Growth plan and above, open Control → Shadow Spend → Live billing connections. Each connection is checked by reading yesterday's bill before it is saved, then encrypted and never shown again.
| Connection | What it reads | Covers | Credential |
|---|---|---|---|
| OpenAI | Organization Costs API | OpenAI API | An OpenAI Admin key |
| Anthropic | Cost Report API | Claude API | An Anthropic Admin API key (sk-ant-admin…) |
| Google Cloud | Your Cloud Billing export in BigQuery (cost plus credits) | Vertex AI and the Gemini API | A service-account key with BigQuery Job User in its project and BigQuery Data Viewer on the export dataset, plus the export table (project.dataset.table) |
| AWS | Cost Explorer, UnblendedCost by service | Amazon Bedrock, including the "(Amazon Bedrock Edition)" lines that third-party models bill under | An access key with ce:GetCostAndUsage |
| Azure | Cost Management Query API (ActualCost) by service | Azure OpenAI / Foundry / Cognitive Services | An app registration (tenant ID, client ID, client secret) with the Cost Management Reader role, and the subscription ID |
Every day at about 03:00 UTC Cognocient AI reads each connected bill for the last two complete UTC days (three for Google Cloud, whose export arrives late), stores each day as a snapshot, and reconciles it against what the proxy observed. A Google Cloud snapshot is compared with your Gemini and Vertex AI traffic together, because both bill to the same account; AWS is compared with Bedrock traffic, Azure with Azure traffic. Re-running never creates duplicates, and a still-open alert is updated rather than repeated, so a refresh can never re-send Slack or re-trigger an automatic freeze. Sync now runs it on demand.
What the live checks do not cover
Mistral, Groq, Together and other providers have no billing API to read: use manual or CSV entry for them. Only USD bills are compared; an account billed in another currency is reported as an error rather than converted. AWS charges $0.01 per Cost Explorer request (about two a day). Each live check compares the whole account's bill for those services, so usage from projects that were never meant to go through Cognocient AI shows up as unexplained spend: tune the dollar and percentage thresholds to suit. These connections follow each vendor's documented API and have not yet been run against a live customer account.
Alert thresholds
An alert only fires when the gap clears both:
| Threshold | Default | Why |
|---|---|---|
| Dollar floor | $25.00 | A $3 gap on a tiny account isn't worth paging anyone, even if it's a large percentage |
| Percentage floor | 15% | A $30 gap on an account spending $50,000/month isn't meaningfully unexplained |
Proxy-observed spend of $0 against real reported spend always alerts regardless of the percentage floor — that ratio can't be computed, and it's the clearest possible signal that 100% of that provider's spend bypassed the proxy.
A gap in the other direction — the proxy observed more than the provider reported — never alerts. That almost always just means the provider's bill for the period hasn't posted yet.
Automatic freeze
An unexplained-spend alert can automatically freeze your account, same as a compromise-risk signal or a velocity spike — but only if you've opted in via Auto-freeze on high-risk signals in Settings. Off by default.
Frequently asked questions
Related articles
Budget Enforcement
Hard limits enforced at the proxy before charges reach your card.
Spend Groups
Named groups of people, managed in the app or pushed by your identity provider, that one budget caps together.
Alerts: Email & Slack
Budget-threshold and anomaly alerts by email (every plan) and Slack (Base+): defaults, recipients, quiet hours, hourly cap.