Most AI cost tracking focuses on production, and for good reason, but development and staging quietly consume real budget too. Test suites, eval runs, and debugging sessions all make model calls, and when they share a billing account with production, they inflate the bill in ways nobody attributes. Tracking AI cost by environment closes that gap.

Why non-production cost hides

Development AI cost feels free because each call is cheap and nobody is watching. But an eval pipeline that runs on every commit, or a test suite that hits the model hundreds of times per run, adds up. When this spend shares a key with production, it looks like production cost, and the real production economics are distorted.

Separate keys per environment

The cleanest way to track by environment is a separate API key for dev, staging, and production. Now the spend splits automatically, and you can see what fraction of your AI bill is development activity versus real user-serving load. This also protects you, because a runaway test loop hits a dev key with its own limit rather than the production budget.

Track dev cost as investment, not waste

Development AI cost is not automatically waste; it is the cost of building and evaluating. The goal of tracking it is not to minimize it but to make it visible and intentional. A team spending heavily on evals to ship a reliable feature is investing well; a test suite burning budget on redundant calls is not, and only environment-level tracking tells them apart.

Watch for prod-scale cost in non-prod

The signal worth alerting on is non-production cost approaching production scale. A staging environment spending like production usually means a misconfigured test, a loop, or a load test left running. Environment attribution makes that anomaly obvious instead of buried in the total.

Roll environments up per team

Each team's true AI cost is production plus its share of dev and staging. Roll all three environments up per team so the number a team owns reflects everything it consumes, not just the user-facing part. That is the honest cost of a team's AI footprint.

Development and staging are where AI cost hides in plain sight. Split keys by environment, treat dev cost as visible investment, and alert on non-production spend that behaves like production, and the whole picture comes into view.