Back to Registry

Unified Cost Dashboard Plan (Docs-Verified Draft)

Objective

Build a single cost dashboard that tracks spend and usage across:

This plan is based on current provider docs/changelogs reviewed during this session.


1) Feasibility Matrix (by provider)

| Provider | Programmatic Cost/Usage Access | Granularity Confidence | Key/Auth Notes | Implementation Notes | |---|---|---|---|---| | OpenAI | Yes (Usage + Costs org endpoints shown in official cookbook examples) | High | Admin-level org key required for org usage/cost endpoints | Strong API path for time-bucketed costs and grouping | | Anthropic | Yes (Usage & Cost Admin API) | High | Admin API key (sk-ant-admin...) required; not available for individual accounts | Excellent for org-level reconciliation and monitoring | | OpenRouter | Partial-strong (generation-level usage/cost documented; account rollups less explicit) | Medium | Standard API key + generation IDs | Use per-request usage/cost and aggregate internally | | Google Gemini API / AI Studio | Billing docs exist; programmatic export path depends on project/billing setup | Medium-low | Depends on AI Studio/Cloud Billing setup | Likely requires Cloud Billing export integration for robust reporting | | Vercel | Yes (/billing/charges in changelog/API, FOCUS v1.3 stream) | High | Team token with billing access | Great source for FinOps-grade ingest | | Cloudflare | Usage/billing docs available; usage-heavy per-service metrics; invoice remains source of truth | Medium | Account token with relevant scopes | Good for usage; cost allocation may need internal mapping model | | WP Engine | API exists for platform/account ops; billing/overage data not clearly exposed as rich API in docs checked | Low-medium | Per-user API credentials | Likely combine API + portal export/manual feed initially |


2) Evidence Notes (docs checked)


3) Architecture Proposal

3.1 Data pipeline

  1. Ingestors per provider (scheduled)
  2. Normalize into one schema
  3. Attribution mapper (team/app/site/env/project)
  4. Cost calculator (when only usage is available)
  5. Dashboard/API layer

3.2 Core normalized schema

3.3 Attribution model (critical)


4) Security and access model

Use dual-plane model from fuelvm-access-matrix-v1.md:

Token handling:


5) Phased implementation

Phase 0 (1-2 days) — Validation Spike

Phase 1 (1 week) — MVP Dashboard

Phase 2 (1 week) — Expand connectors

Phase 3 (1 week) — Client-grade views


6) Known unknowns / risks

  1. OpenRouter account-level billing API depth vs per-generation reconstruction.
  2. Google AI Studio vs Cloud Billing export path for robust automation.
  3. WP Engine billing granularity via API appears limited from docs reviewed.
  4. Cross-provider timestamp normalization and FX/tax treatment (if needed).

Mitigation:


7) Immediate next steps (actionable)

  1. Create connector spike tickets for 4 high-confidence providers:
    • OpenAI, Anthropic, Vercel, Cloudflare
  2. Define secret scopes per provider
  3. Stand up normalized cost_events table
  4. Build first dashboard page:
    • Total spend MTD
    • Spend by provider
    • Spend by app/site
    • Confidence badges

8) Recommendation

Build this now as a staged FinOps product:

This is not pie-in-the-sky, it is a practical 3-phase build with clear early value.