Budgets & Control

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.

In the app: Shadow Spend · Growth plan and aboveOpen in app →No account? Start free

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

  1. 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.
  2. 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).
  3. If reported − observed clears both a dollar floor and a percentage floor, an alert is raised.
Reported by provider:  $87,000.00
Observed by proxy:          $0.00
─────────────────────────────────
Unexplained:            $87,000.00   ← alert

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.

ConnectionWhat it readsCoversCredential
OpenAIOrganization Costs APIOpenAI APIAn OpenAI Admin key
AnthropicCost Report APIClaude APIAn Anthropic Admin API key (sk-ant-admin…)
Google CloudYour Cloud Billing export in BigQuery (cost plus credits)Vertex AI and the Gemini APIA 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)
AWSCost Explorer, UnblendedCost by serviceAmazon Bedrock, including the "(Amazon Bedrock Edition)" lines that third-party models bill underAn access key with ce:GetCostAndUsage
AzureCost Management Query API (ActualCost) by serviceAzure OpenAI / Foundry / Cognitive ServicesAn 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:

ThresholdDefaultWhy
Dollar floor$25.00A $3 gap on a tiny account isn't worth paging anyone, even if it's a large percentage
Percentage floor15%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

On this page