---
title: "FinOps for AI: Allocating AI Spend and Setting Token Budgets"
description: "A practical guide to FinOps for AI: four levels of AI cost allocation, an allocation template, how to calculate a token budget, and what an AI gateway does and does not solve."
image: https://frugal.co/hubfs/Octblog5.png
---

[![company-logo](https://cdn.prod.website-files.com/686b121c919ed2b639e30952/686b28b7662f765388c4c0f2_Layer_1.svg)](https://frugal.co/)

[Product](https://frugal.co/product) [Pricing](https://frugal.co/pricing)

Company

[About Us](https://frugal.co/about) [Security](https://frugal.co/security)

Resources

[Blog](https://frugal.co/blog) [Library](https://frugal.co/resources)

[Contact](https://frugal.co/contact)

[Book Demo](https://frugal.co/) [Get a Free Audit](https://frugal.co/audit)

FinOps for AI: Allocating AI Spend and Setting Token Budgets

![Ishan Kamat](https://frugal.co/hs-fs/hubfs/Ishan%20-%20Headshot%20(1).png?width=60&height=60&name=Ishan%20-%20Headshot%20(1).png)

Ishan Kamat

 October 22, 2026

AI spend arrives as one line: Anthropic, $84,000. Good luck charging that back.

**Short answer:** FinOps for AI is the practice of allocating, budgeting and reducing spend on AI APIs and AI tooling. Allocation happens at four levels: provider, team, feature, and code path. Token budgets are set per feature from request volume and token counts, then enforced with output caps, workspace limits or a gateway. Reduction happens in code.

The FinOps Foundation's State of FinOps 2026 report found that 98% of respondents now manage AI spend, up from 31% two years earlier.

## What is FinOps for AI?

FinOps for AI applies cloud financial management to token-billed services: LLM APIs such as Anthropic and OpenAI, models served through Amazon Bedrock or Google Cloud, and coding agents such as Claude Code, Cursor and GitHub Copilot. The goals are the same as cloud FinOps. Know who spent what, forecast it, and reduce waste. The mechanics are different.

## Why is AI spend harder to allocate than cloud spend?

- **There is nothing to tag.** A token has no resource ID. Cloud allocation leans on tags, and API calls do not carry them unless you add them.
- **Keys get shared.** One API key used by six services produces one number.
- **It spans vendors and channels.** Direct API, cloud marketplace, and per-seat subscriptions all land in different places.
- **Price moves with behavior.** Cached, batch, and long-context tokens are all priced differently. Two features with the same request count can differ 10x in cost.
- **It changes with every deploy.** A longer prompt ships on Tuesday and the unit cost is different on Wednesday.

## How do you allocate AI API spend?

| Level | Mechanism | Question it answers | Effort |
| --- | --- | --- | --- |
| 1. Provider and model | The invoice and provider usage console | How much, on which model? | None |
| 2. Team or service | Separate API keys, Anthropic workspaces, OpenAI projects | Who spent it? | Low |
| 3. Feature or customer | Request metadata, gateway virtual keys, OpenTelemetry attributes | What was it spent on? | Medium. Requires instrumentation. |
| 4. Code path and call site | Code-level cost attribution | Why does it cost this much, and what do we change? | Tooling |

Levels 1 to 3 are accounting. They tell finance where the money went. Level 4 is engineering. It breaks spend down to code an engineer owns and can fix.

## What does an AI spend allocation template look like?

| Feature | Owner | Model | Requests per month | Avg input tokens | Avg output tokens | Cached share | Monthly cost | Unit cost | Budget |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Ticket summarizer | Support platform team | Claude Sonnet 5.5 | 200,000 | 3,000 | 400 | 0% | $2,000 | $0.01 per summary | $2,400 |

One row per feature, not per team. Teams own budgets. Features have unit costs.

## How do you set a token budget?

**Monthly cost = requests x (input tokens x input price + output tokens x output price)**

For the summarizer above on Claude Sonnet 5.5 ($2 input and $10 output per million tokens):

- Input: 200,000 x 3,000 = 600 million tokens = $1,200
- Output: 200,000 x 400 = 80 million tokens = $800
- Total: $2,000 a month. With 20% headroom, the budget is $2,400.

A token budget policy needs five things:

- A per-request cap. Set `max_tokens` on every call.
- A monthly budget per feature, with a named owner.
- Alerts at 50%, 80% and 100%.
- A hard limit somewhere: a workspace spend limit or a gateway budget.
- A review trigger when unit cost rises, not only when total spend does. Total spend rising with usage is growth. Unit cost rising is a code change.

## Which unit metrics matter?

- Cost per request and cost per conversation
- Cost per active user and cost per customer
- AI cost as a share of revenue per customer
- For coding agents: cost per engineer per active day and cost per merged pull request

Coding agents belong in the same ledger. Anthropic reports Claude Code averaging $150 to $250 per developer per month at API rates, and GitHub Copilot moved to token-based AI Credits on June 1, 2026.

## What does an AI gateway do, and what does it not do?

An AI gateway such as LiteLLM, Portkey or Cloudflare AI Gateway sits between your code and the model provider. It gives you virtual keys per team, budgets, rate limits, response caching and routing. It is a good enforcement point.

It manages traffic. It cannot tell you that the summarizer's prompt doubled in last week's release, or that a classification call is running on a top-tier model. That answer is in the code.

## Where does Frugal fit?

Frugal handles level 4. It attributes AI API spend to the component and call site, checks for 22 AI API waste patterns, and opens a pull request with the fix and the estimated Monthly Savings. For a FinOps lead, that turns "AI spend is up 30%" into a specific change an engineer can review. Frugal complements allocation tools. It does not replace billing visibility.

## FAQ

### Which services can automatically attribute AI API spend to specific code paths?

Finout and CloudZero allocate AI spend to teams, products and customers from billing data. LLM observability tools attribute cost to instrumented traces. Frugal attributes AI API spend to code paths and call sites using the bill, usage data and source code.

### What is a token budget?

A token budget is a spending limit for an AI feature, expressed in tokens or dollars, derived from expected request volume and tokens per request.

### What is AI cost allocation?

Assigning AI spend to the team, feature, customer or code path that caused it.

### Who owns AI spend, FinOps or engineering?

FinOps owns the reporting and the budget process. Engineering owns the unit cost, because unit cost is set by code.

You can allocate a bill without engineers. You cannot shrink one.

**Want AI spend broken down to the call site?** Get an Audit at [frugal.co](https://frugal.co).

*Sources: [FinOps Foundation, State of FinOps 2026](https://data.finops.org/), [Claude API pricing](https://platform.claude.com/docs/en/about-claude/pricing), [Claude Code cost documentation](https://code.claude.com/docs/en/costs).*

 Share Link

[Back to Top](https://frugal.co/blog/ai-or-engineer-cloud-cost-savings-start-with-the-bill-and-end-in-the-code)

![background Image](https://frugal.co/hubfs/697fa79222025cf13e7bec1e_799f61dfa4790fe0e40a2962d5468335_Group%202040.avif)

![Robo Image](https://frugal.co/hubfs/697fadb140def08f5fc80ed3_Group%202042.avif)

### Take Frugal for a live test drive

 Explore how Frugal scans your code and cloud services to find waste, recommend optimizations, and generate ready-to-use fixes in a secure, read-only environment.

[Enter Sandbox](https://auth.frugal.co/sign-up)

![background Image](https://frugal.co/hubfs/697fa936779f0fd839545616_Group%202041.avif)

![robo image](https://frugal.co/hubfs/697fa79222025cf13e7bec1e_799f61dfa4790fe0e40a2962d5468335_Group%202040.avif)

![frugal image](https://cdn.prod.website-files.com/686b121c919ed2b639e30952/686c44713462acbdaab4a82d_f8418228347e59c4cabb651eb7f5e72b_Frame%20291022.avif)

 An Intelligent Application Cost Engineering platform that optimizes code to reduce cloud costs automatically - empowering engineers without slowing development

[Blog](https://frugal.co/blog) [Contact](https://frugal.co/contact) [careers](https://frugal.co/careers) [About Us](https://frugal.co/about)

[Privacy Policy](https://frugal.co/privacy-policy) [Terms of Use](https://frugal.co/terms-and-condition) [Trust Centre](https://trust.frugal.co/) [Active Status](https://status.frugal.co/)

[X](https://x.com/frugalaico) [LinkedIn](https://www.linkedin.com/company/frugalco/)

[Featured in AI Directory](https://aidirectory.wiki)

[Privacy Policy](https://frugal.co/privacy-policy) [Terms of Use](https://frugal.co/terms-and-condition) [Trust Centre](http://trust.frugal.co/) [Active Status](http://status.frugal.co/)

Copyright Frugal AI Inc.

©2025

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Ishan Kamat",
    "url" : "https://frugal.co/blog/author/ishan-kamat"
  },
  "dateModified" : "2026-10-22T13:00:00.637Z",
  "datePublished" : "2026-10-22T13:00:00.000Z",
  "headline" : "FinOps for AI: Allocating AI Spend and Setting Token Budgets",
  "image" : [ "https://frugal.co/hubfs/Octblog5.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://frugal.co/blog/finops-for-ai-allocation-token-budgets",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://frugal.co/hubfs/Frugal%20Logo%20Transparent%20Black.png"
    }
  }
}
```