Opsmeter logo
Opsmeter
AI Cost & Inference Control

Problem / solution

OpenAI dashboard shows totals - what caused the bill?

Totals are useful for accounting, but root-cause operations need request-level dimensions and deployment context.

OpenAIAttributionRoot cause

Full guide: Bot attacks and LLM cost spikes: prevention playbook

The reporting gap

Provider dashboards answer account-level usage questions.

Engineering and product teams need to identify the specific endpoint, tenant, or prompt deploy behind cost changes.

OpenAI Usage Dashboard vs root-cause attribution

The Usage Dashboard (and usage exports) are helpful for totals, but totals do not answer “what changed” or “who owns the spend”.

To explain bill variance, you need request-level tags that connect usage to product features, customers, and deploys.

  • Per endpoint: endpointTag (feature ownership)
  • Per user/tenant: stable userId/tenant mapping (hash when needed)
  • Per deploy: promptVersion (deploy correlation)
  • Retry-safe: externalRequestId reuse (attempt grouping)

Fields that close the gap

  • endpointTag for feature-level concentration
  • userId or tenant mapping for customer-level concentration
  • promptVersion for deploy-linked regressions
  • externalRequestId for retry-safe tracking

Operator workflow

  1. Confirm spend change window in Overview.
  2. Find endpoint concentration in Top Endpoints.
  3. Find tenant concentration in Top Users.
  4. Validate promptVersion drift in Prompt Versions.

Common reasons the bill changes (and totals cannot explain it)

Most “bill surprises” come from a small set of patterns. Totals hide the driver because they do not include feature ownership or deploy context.

If you can attribute spend by endpointTag, user/tenant, and promptVersion, you can answer the real question: what changed?

  • Token growth (system prompt, RAG context, verbosity drift)
  • Retry storms (timeouts, rate limits, transient errors)
  • Abuse traffic (bots, leaked keys, unknown-user bursts)
  • Routing changes (model tier drift, fallback behavior)
  • New endpoints shipped without cost guardrails

A practical way to explain variance to stakeholders

  1. Identify the top endpointTag driver and quantify contribution to delta.
  2. Identify the top tenant/user driver and quantify concentration.
  3. Check promptVersion changes in the window (deploy correlation).
  4. Separate volume change (requests) from efficiency change (cost/request).
  5. Document the one action: cap, throttle, rollback, or pricing/quota update.

Minimal implementation checklist (fast adoption)

  • Add endpointTag for each feature path calling OpenAI.
  • Add promptVersion for every deploy of prompt/routing logic.
  • Attach tenant/user IDs (hashed) for customer attribution.
  • Keep externalRequestId stable across retries.
  • Separate real vs demo/test traffic (dataMode + environment).

KPIs that keep OpenAI cost management stable

  • cost/request and tokens/request by endpointTag
  • top tenants/users by spend and concentration %
  • promptVersion regressions after deploys
  • retry ratio and status distribution
  • unknown model ratio (pricing coverage)

What to send (payload example)

{
  "externalRequestId": "req_01HZXB6MQZ2WQ9D2KCF9M4V2QY",
  "provider": "openai",
  "model": "gpt-4o-mini",
  "endpointTag": "public.chat",
  "promptVersion": "public_v1",
  "userId": "anon_ip_hash",
  "inputTokens": 260,
  "outputTokens": 190,
  "latencyMs": 892,
  "status": "success",
  "dataMode": "real",
  "environment": "prod"
}

Common mistakes

  • Shipping provider keys to the client or logging them in plaintext.
  • No per-endpoint rate limits for high-cost workflows.
  • Treating retry storms as "just reliability" while costs multiply.
  • Delaying containment while searching for perfect root-cause.

How to verify in Opsmeter Dashboard

  1. Use Overview to confirm spike window and budget posture.
  2. Use Top Endpoints to find feature-level concentration.
  3. Use Top Users to find tenant-level concentration.
  4. Use Prompt Versions to validate deploy-linked cost drift.

Related guides

Open compare hubStart freeCompare alternatives

Evaluation resources

For security and procurement reviews, use our trust summary before final tool selection.

Open trust proof pack