OPENAI COST TRACKING
OpenAI API Cost Tracking by Project
An OpenAI invoice tells you total usage; engineering teams often need to know which product, workload or release caused it. CostNerve is built around that attribution problem.
What problem does it solve?
- Cost by project and model
- Exact versus estimated labels
- Anomaly and budget signals
- Cross-provider project totals
What to check first
- Establish current spend, previous-period spend and forecast using the same scope.
- Use Input and output tokens by model and project as the first provider-specific check, then attribute spend by project or service. Leave uncertain cost unallocated instead of guessing.
- Rank the top cost drivers by absolute money and growth rate, then investigate the first few deeply.
- Attach every saving or budget action to an owner, expected impact and a verification date.
Metrics and signals that matter
- Input and output tokens by model and project
- Request count, retries and failed/repeated generations
- Usage by project/API key and the smallest available time interval
- Model mix changes, context growth, batch/background jobs and cache behavior
Likely causes
Deployment or configuration regression
A release can change request fan-out, runtime, memory, model choice, logging volume or cache behavior without obvious user-facing breakage.
Traffic, retries or loops
Legitimate growth, bots, retry storms and recursive/background loops can all multiply a normally cheap unit of work.
Billing dimension changed
For OpenAI, investigate Input and output tokens by model and project and Request count, retries and failed/repeated generations before assuming the total moved for a single reason.
How it works
From model usage to project cost
Usage is normalized into the same cost model as the rest of the stack, preserving provider evidence and confidence instead of mixing estimates with exact charges.
Investigate a spike
Explain My Bill is designed to surface the technical signals behind a change, including token volume and correlated project activity, without presenting correlation as causation.
Worked example with explicit assumptions
Illustrative alert: a project normally spends 20 USD/day. A reading of 35 USD is 15 USD and 75% above baseline. Check both the absolute increase and the percentage, and exclude incomplete days before escalating.
Frequently asked questions
Which OpenAI signals should I inspect first?
Start with Input and output tokens by model and project, Request count, retries and failed/repeated generations, Usage by project/API key and the smallest available time interval. Compare the same time window before and after the change so volume and unit-cost effects do not get mixed.
Does a budget alert stop spending?
No. A notification is not a spending cap. Verify delivery, data freshness and escalation separately. Any supported control must be explicitly enabled and its effect checked; read-only monitoring does not change infrastructure.
Should uncertain cost be forced into a project?
No. Keep it unallocated until tags, project IDs, resource IDs or another reliable signal justify attribution. False precision produces worse decisions than visible uncertainty.