How to attribute AI API costs to teams and features in 2026

Dev.to AI
Generative AI AI Business

OpenAI and Anthropic still give you strong org and project level usage data, but not true per-feature chargeback unless you add your own metadata before each request leaves your app. Amazon Bedrock changed on April 17, 2026: native IAM principal attribution and project-based tagging now help with team level visibility, but shared gateways still need app context for feature and tenant allocation. The cleanest pattern is request-time tagging with team_id, feature_id, tenant_id, provider, model, and token counts d in your own event stream.