AI Help

How do I track AI API spending separately for each customer or workflow?

Attach a customer or workflow ID to your own usage records and reconcile measured costs with provider billing.

Steps to follow

  1. Record run ID, tenant or workflow, model, input and output usage, cached usage and billable tools.
  2. Apply current pricing by billing category and allocate shared storage or infrastructure using a documented rule.
  3. Aggregate costs by period and compare the totals with the invoice. Keep access controls and data minimization on usage logs.

Example in practice

Illustrative example. A support workflow and a report workflow share a project but have separate internal cost totals through their logged workflow IDs.

Related AI help

Official guidance

OpenAI documentation