The ideal way to track AI costs is to tag every call with its team, project, and feature. In practice, that level of instrumentation is not always realistic, especially across a large codebase with many teams and legacy integrations. The good news is that you can get most of the value with far less effort.
Start with key architecture, not code changes
The highest-leverage tracking requires no per-call instrumentation at all. Issue a separate API key per team or major use case, and the vendor's own per-key usage reporting becomes your attribution layer. This gets you team-level cost tracking without touching application code, which covers the majority of what most organizations need.
Instrument the workloads that matter most
Full instrumentation is rarely worth it everywhere, but it is worth it for the few workloads that drive most of the cost. Identify the handful of features or agents responsible for the bulk of spend and add feature-level tags to just those. You get precise attribution where it matters and skip the effort where it does not.
Use vendor metadata where it exists
Most AI APIs accept a metadata field on requests. Populating it with a team or feature tag is far lighter than building a full instrumentation layer, and it flows into the usage data automatically. Where you already have a shared wrapper or gateway, adding the tag in one place propagates it everywhere.
Reconcile the rest against the registry
For workloads you have not instrumented, monthly reconciliation against your key registry still attributes the spend at the team level. It is coarser than per-call tagging, but it means no spend goes completely unattributed, and it surfaces the untracked workloads worth instrumenting next.
Improve coverage incrementally
Tracking coverage does not have to be all or nothing. Start with keys for everyone, instrument the top cost drivers, and add attribution to more workloads as they grow. Each increment improves the picture without ever requiring a big-bang instrumentation project.
Perfect per-call instrumentation is the ideal, not the requirement. Key architecture plus targeted tagging of your biggest workloads gets you most of the attribution value for a fraction of the effort, and you can deepen coverage over time.