Blog· Perspectives

All posts

LLM cost optimization: the enterprise AI cost management guide, with 10 levers (2026)

2026-08-05 · 7 min readhung-chien · AI Growth & Brand Manager

On this page · 12
  1. 01Layer 1: token economics
  2. 02Layer 2: credits as the settlement unit
  3. 03Layer 3: ownership through projects and keys
  4. 04Layer 4: caps and a weekly review
  5. 0510 levers for LLM cost optimization
  6. 06Choosing models by task
  7. 07Agents: measure cost per completed task
  8. 0830-day rollout plan
  9. 09Metrics scoreboard
  10. 10Setting this up in ATP Token
  11. 11Related reading
  12. 12FAQs

LLM cost management is the practice of pricing, attributing and capping what your company spends on language models, and LLM cost optimization is lowering that spend per useful output without losing quality. This guide gives you four layers with one concrete practice each, a 10-lever optimization table, model choices by task, and a 30-day rollout plan.

All model rates are ATP list rates from the model pages, as of October 2026. Vendor pricing facts link to the vendor's own pages.

Layer Practice to set up first ATP doc
1. Token economics Price your top three request shapes per 1,000 requests Pricing model
2. Credits Fund one monthly budget in credits and split it by workspace How credits work
3. Ownership One project and key per service per environment Managing API keys
4. Caps and review Allocate a fixed budget per project and review usage weekly Budget caps recipe

Layer 1: token economics

The practice: price the three request shapes that make up most of your traffic, per 1,000 requests, before you argue about the monthly total.

A support reply with 1,284 input and 412 output tokens on claude-sonnet-4-6 ($3 / $15 per 1M) costs 1,284 × 3 ÷ 1,000,000 + 412 × 15 ÷ 1,000,000 = $0.010032, or $10.03 per 1,000 requests. At 300,000 replies a month that is $3,009.60. Once you have that number per shape, every lever below has a dollar value. The full method, with five models side by side, is in LLM token cost: how to calculate it.

Layer 2: credits as the settlement unit

The practice: fund one monthly budget in credits and push it down the hierarchy, so finance reconciles one unit while engineering keeps model-level detail.

On ATP Token, 1 credit = USD 0.01. A $3,000 month is 300,000 credits, which is three Scale top-ups of USD 1,000 each. Credits flow organization → workspace → project, and each level shows Available, Received, Allocated and Consumed. Pay-as-you-go credits do not expire, and top-ups are non-refundable, so fund for the month you are planning rather than the year.

Layer 3: ownership through projects and keys

The practice: one project per service per environment, each with its own key.

Six services in staging and production means 12 projects and 12 keys. A key belongs to exactly one project and inherits its allowed models and credit balance, so the Usage page's breakdown by key reads directly as spend by owner. When a contractor leaves, revoking their project's key stops it immediately without breaking the other 11 services. The pattern is explained in one project, one key.

Layer 4: caps and a weekly review

The practice: give every project a fixed allocation, and look at usage once a week.

A project can only spend what it was allocated. A staging project with 5,000 credits has a $50 ceiling: when its balance runs out, calls return 402, and a project that ends up past its allocation is flagged In debt until topped up. The staging job that ran all weekend costs about $50.

For the review, ATP request logs keep 7 days of per-request rows (model, status, input and output tokens, request ID), so a weekly look catches anomalies while the detail still exists. Month-end reconciliation uses billing events, the 90-day ledger that is the billing source of truth.

10 levers for LLM cost optimization

Effects are either quoted from the vendor's pricing page or worked out with the support-reply example above (1,284 in / 412 out on claude-sonnet-4-6, $0.010032).

# Lever Typical effect Where to set it
1 Match the model to the task claude-haiku-4-5 ($1 / $5) prices the same request at $0.003344, one third of claude-sonnet-4-6 Model id in code; project allowed models
2 Cap output length 412 → 250 output tokens saves $0.00243 per request (24%) max_tokens, response format, prompt instructions
3 Set the reasoning budget 1,500 thinking tokens add $0.0225 per request, since reasoning bills as output Reasoning effort or thinking budget parameter
4 Trim context A 20,000-token document on every turn costs $0.06 of input per turn; a 2,000-token retrieved excerpt costs $0.006 Context assembly in your app
5 Use vendor prompt caching Anthropic cache reads cost 0.1× base input (Anthropic pricing); OpenAI lists GPT-5.5 cached input at $0.50 vs $5 Vendor caching settings, on direct vendor calls
6 Batch asynchronous jobs OpenAI Batch and Flex are 50% of standard (OpenAI pricing); Anthropic Batch API is 50% of standard Vendor Batch API, for evals, backfills, nightly jobs
7 Allow only the models a project needs Keeps a project built for gpt-5.6-luna ($6 output) from calling gpt-5.5 ($30 output), a 5× output rate ATP project allowed models; other models return 403
8 Fixed allocation per project Staging allocated 5,000 credits stops near $50 ATP Resources, allocation tree
9 Limit agent steps and retries 10 steps resending 30,000 tokens = 300,000 input tokens = $0.90 per task; 5 steps = $0.45 Agent framework configuration
10 Weekly review and idle-key cleanup No fixed percentage; finds the top-spending key while 7-day request detail exists Usage page by key; API keys page

Levers 1 to 4 and 9 apply to any provider. Levers 5 and 6 are vendor pricing programs with their own rules, so price them per vendor. Levers 7, 8 and 10 are controls you configure in the ATP console.

Choosing models by task

Lever 1 usually saves the most, and it needs an evaluation first. Run 50 to 100 real prompts from each workload through two or three candidates and compare quality before moving traffic.

Workload Candidates (ATP list rate, input / output per 1M) Side-by-side page
High-volume classification, routing, tagging qwen-3-7-flash $0.03 / $0.13; deepseek-v4-flash $0.20 / $0.40 Qwen vs DeepSeek
Support replies and internal assistants claude-haiku-4-5 $1 / $5; gemini-3-5-flash $1.50 / $9; claude-sonnet-4-6 $3 / $15 Gemini vs GPT
Coding and long reasoning claude-opus-4-8 $5 / $25; gpt-5.5 $5 / $30; deepseek-v4-pro $2.40 / $4.80 DeepSeek vs Claude, best LLM for coding

Token counts also differ between models. Anthropic notes the Claude 4.7+ tokenizer produces approximately 30% more tokens for the same text, so compare cost on your own prompts rather than on rate cards.

Agents: measure cost per completed task

A coding or research agent sends many requests per job, and each step can resend the full context. Anthropic reports that Claude Code averages around $13 per developer per active day and $150 to $250 per developer per month, and that agent teams use approximately 7× more tokens than standard sessions in plan mode (Claude Code costs).

Cost per request stays flat while cost per task climbs, so track both. Put agents in their own project with their own allocation, so a looping agent hits its own cap instead of draining production. For coding agents specifically, see the coding agents cost control checklist.

30-day rollout plan

  • Week 1: list every key and vendor account in use, and the service behind each. Price the top three request shapes per 1,000 requests.
  • Week 2: create the organization, workspaces and one project per service per environment. Move the three highest-spend services to project keys; the change is a base URL and key swap for OpenAI, Anthropic and Gemini SDKs.
  • Week 3: allocate monthly credits per project, set allowed models, and move agents into separate projects. Apply levers 1 to 4 to the most expensive workload.
  • Week 4: close the month from billing events, compare Consumed against Allocated per project, and set next month's allocations from that.

Metrics scoreboard

Metric Owner Cadence
Consumed vs allocated credits, per project Platform and finance Weekly
Cost per 1,000 requests, per request shape Engineering Weekly
Cost per completed agent task Agent owners Weekly
Share of 402 and 403 responses Platform Daily
Keys revoked or unused for 30 days Security Monthly

Setting this up in ATP Token

  1. Create a Team organization, then workspaces and projects in Resources.
  2. For each project, choose its allowed models and allocate credits. In a team organization, keys spend org-allocated credits, not a personal wallet.
  3. Create one atp- key per project. The secret is shown once; the API keys page lists every key across workspaces and lets you revoke any of them.
  4. Read the Usage page weekly by model and by key, and use request logs to drill into a spike within 7 days.

Start with the quickstart

LLM cost optimizationAI cost managementATP

FAQs

What is LLM cost optimization?

LLM cost optimization is reducing what you pay per useful model output by choosing the right model per task, limiting input and output tokens, using vendor batch and caching pricing where it applies, and capping spend per project so mistakes stay small.

What is the fastest way to reduce LLM costs?

Start with model choice and output length. Output tokens cost 5× input on claude-sonnet-4-6 and 6× on gpt-5.5, and a smaller model in the same family can cost one third as much per token. Test quality on 50 to 100 real prompts before switching.

How do you attribute AI costs to teams?

Give each service and environment its own project and key, then read usage by key. On ATP Token a key belongs to exactly one project, so usage by key is usage by owner.

How do AI agents change cost management?

Agents send many requests per job, and each step can resend the full context. Track cost per completed task next to cost per request, and limit steps and retries in the agent configuration.

Does batch processing reduce LLM cost?

At the vendor level, yes. OpenAI prices Batch and Flex at 50% of standard rates, and Anthropic's Batch API is 50% of standard, in exchange for asynchronous completion. It suits evaluations, backfills and nightly jobs.
Get started

One key, and every model call has a record

Project-scoped API keys, model allowlists, per-request logs, and pay-as-you-go credits — start with a five-dollar top-up.