AI waste scans
What we scan on OpenAI, Anthropic & Gemini
Catalog of every AI waste check SpendPilot runs on connected OpenAI, Anthropic, and Gemini (Google AI Studio) accounts. All AI findings are Manual fix — SpendPilot never revokes keys, changes provider billing, or calls the provider during the waste pass. Gemini live costs use linked GCP BigQuery billing export (or Manual MTD). Cloud AI meters (Bedrock, Vertex, Azure OpenAI) stay under Cloud waste scans.
What an AI waste scan does
An AI waste scan reads the latest OpenAI / Anthropic / Gemini cost sync snapshot and opens Manual-fix Actions for likely unused keys and spend spikes. It does not call the provider live during the waste pass, and it never revokes, rotates, or edits API keys.
Findings land on Actions with estimated monthly impact. You investigate and fix in the provider console (or disconnect the account in SpendPilot), then mark the action fixed. Cloud AI meters such as Bedrock, Vertex AI, and Azure OpenAI stay under Cloud waste scans when those clouds are connected.
1. Connect
Add encrypted OpenAI, Anthropic, and/or Gemini (AI Studio) keys under Services / Connections (requires an AI plan). Gemini shares the OpenAI key budget.
2. Sync costs
Pull Usage / Costs (OpenAI), Cost Report (Anthropic), or Gemini MTD via linked GCP BigQuery billing export (or Manual MTD).
3. Scan waste
Compare the snapshot for idle keys and (where supported) spend anomalies; open Manual-fix actions.
4. Act
Fix in the provider console (rotate keys, set limits), disconnect if retired, then Mark fixed.
Connect keys and sync from your dashboard (log in). Review AI findings on Actions. AI plan limits live on Billing.
OpenAI
Flags near-zero usage keys and spend anomalies on connected OpenAI accounts. Manual fix only — SpendPilot never revokes or rotates keys.
Scope Org-scoped via encrypted Admin/usage API key. Scans use the latest cost sync snapshot only — no live OpenAI calls during the waste pass.
Requires a paid AI Cost Management plan. Idle and anomaly checks run only after costSyncedAt is set on the connection.
SpendPilot stores keys encrypted and never shows them again after save. Rotate in OpenAI, then reconnect if needed.
Prompt-cache hit rate is not exposed by the OpenAI Costs API — tune caching in your app; Batch eligibility is a heuristic from line items.
OpenAI API
| Check | Detects | How | Confidence | Fix in SpendPilot |
|---|---|---|---|---|
Near-zero usage OpenAI key openai_idle_key | Connected account with month-to-date spend at or below the idle threshold (≈ 50 in display currency) after a successful cost sync | OpenAI cost snapshot MTD spend → Manual fix (rotate/revoke in OpenAI dashboard; disconnect in SpendPilot if retired) | Medium | Manual fix |
OpenAI spend anomaly openai_spend_anomaly | Yesterday spend ≥ ~25% above the recent daily baseline (anomalyPercent on the cost snapshot) | OpenAI cost snapshot anomalyPercent → Manual fix (investigate models/projects/agents; set usage limits) | Medium | Manual fix |
Batch-eligible OpenAI Chat spend openai_batch_eligible | High Chat/Completions MTD with little/no Batch-looking line items (heuristic) | OpenAI serviceCosts snapshot → Manual fix (Batch API for offline jobs; prompt-cache hit rate not in Costs API) | Mixed | Manual fix |
OpenAI prompt-cache playbook openai_prompt_cache_playbook | Sustained high Chat/Completions MTD where prompt caching may reduce cost (guidance finding) | OpenAI cost snapshot → Manual fix (enable prompt caching / reuse prefixes in your app) | Mixed | Manual fix |
Anthropic
Flags near-zero usage Admin keys and spend anomalies on connected Anthropic accounts. Manual fix only.
Scope Org-scoped via encrypted Admin API key (Cost Report). Scans use the latest cost sync snapshot only.
Requires Team/Enterprise org with Admin API access (not consumer Claude / ChatGPT-style plans).
Requires a paid AI Cost Management plan. Same Manual-fix workflow as OpenAI — SpendPilot never changes Anthropic billing or keys.
Prompt-cache hit rate is not available from the Cost Report snapshot — tune caching in your app; Message Batches eligibility is heuristic.
Anthropic API
| Check | Detects | How | Confidence | Fix in SpendPilot |
|---|---|---|---|---|
Near-zero usage Anthropic Admin key anthropic_idle_key | Connected Admin key with month-to-date spend at or below the idle threshold (≈ 50 in display currency) after a successful cost sync | Anthropic cost snapshot MTD spend → Manual fix (rotate/revoke in Claude Console; disconnect in SpendPilot if retired) | Medium | Manual fix |
Anthropic spend anomaly anthropic_spend_anomaly | Yesterday spend ≥ ~25% above the recent daily baseline (anomalyPercent on the cost snapshot) | Anthropic cost snapshot anomalyPercent → Manual fix (investigate models/workspaces/agents; set limits) | Medium | Manual fix |
Batch-eligible Anthropic Messages spend anthropic_batch_eligible | High Messages MTD with little/no Batch service bucket (≤ ~5% of Messages+Batch) | Anthropic serviceCosts snapshot → Manual fix (Message Batches for offline jobs; cache hit rate not in Cost Report) | Mixed | Manual fix |
Anthropic prompt-cache playbook anthropic_prompt_cache_playbook | Sustained high Messages MTD where prompt caching may reduce cost (guidance finding) | Anthropic cost snapshot → Manual fix (enable prompt caching / reuse prefixes in your app) | Mixed | Manual fix |
Gemini (Google AI Studio)
Flags near-zero usage Gemini keys after cost sync or Manual MTD. Manual fix only — SpendPilot never revokes or rotates keys.
Scope Org-scoped via encrypted AI Studio API key. Live MTD from linked GCP BigQuery billing export (Generative Language / Gemini SKUs) or Manual MTD — AI Studio has no OpenAI-style Costs API.
Requires a paid AI Cost Management plan. Gemini connections count toward the OpenAI key budget (maxOpenAiAccounts).
For live costs: connect a GCP project with BigQuery billing export, then link it on the Gemini panel and Sync costs.
Manual MTD is a valid fallback when GCP export is not ready. Soft-verify uses the same MTD figure.
Google AI Studio / Gemini API
| Check | Detects | How | Confidence | Fix in SpendPilot |
|---|---|---|---|---|
Near-zero usage Gemini key gemini_idle_key | Connected key with month-to-date spend at or below the idle threshold (≈ 50 in display currency) after BQ sync or Manual MTD | Gemini cost snapshot MTD → Manual fix (rotate/revoke in AI Studio; disconnect in SpendPilot if retired) | Medium | Manual fix |
What AI waste scans do not do
- Revoke, rotate, or edit OpenAI / Anthropic / Gemini API keys (always Manual fix in the provider console)
- Call OpenAI, Anthropic, or Gemini live during the waste pass — checks read the last successful cost sync snapshot (or Manual MTD) only
- Auto-buy capacity, set provider spend caps, or change org billing settings
- Scan Bedrock, SageMaker, Vertex AI, or Azure OpenAI here — those meters are covered under Cloud waste scans when the cloud account is connected
- Connect consumer ChatGPT Plus / Claude consumer plans / unpaid AI Studio-only usage without an AI plan (Admin / Usage / AI Studio APIs on a paid AI Cost Management plan)
Fix matrix (manual only)
Every AI waste check in one table. There is no Approve & delete / stop / change for OpenAI, Anthropic, or Gemini — you change keys and limits in the provider console, then Mark fixed in SpendPilot.
| Provider | Check | Service | Fix in SpendPilot |
|---|---|---|---|
| openai | Near-zero usage OpenAI key openai_idle_key | OpenAI API | Manual fix |
| openai | OpenAI spend anomaly openai_spend_anomaly | OpenAI API | Manual fix |
| openai | Batch-eligible OpenAI Chat spend openai_batch_eligible | OpenAI API | Manual fix |
| openai | OpenAI prompt-cache playbook openai_prompt_cache_playbook | OpenAI API | Manual fix |
| anthropic | Near-zero usage Anthropic Admin key anthropic_idle_key | Anthropic API | Manual fix |
| anthropic | Anthropic spend anomaly anthropic_spend_anomaly | Anthropic API | Manual fix |
| anthropic | Batch-eligible Anthropic Messages spend anthropic_batch_eligible | Anthropic API | Manual fix |
| anthropic | Anthropic prompt-cache playbook anthropic_prompt_cache_playbook | Anthropic API | Manual fix |
| gemini | Near-zero usage Gemini key gemini_idle_key | Google AI Studio / Gemini API | Manual fix |
Manual fix checklist
- Idle key: confirm no production workload needs the key → rotate/revoke in the provider → disconnect in SpendPilot if retired → Mark fixed.
- Spend anomaly: break down yesterday vs baseline by model / project → stop runaway agents or tighten limits → Mark fixed when explained or stopped.
For AWS / Azure / GCP idle resources and Approve & delete / stop / change matrices, see Cloud waste scans and Can save /mo.