Foundations

Track and understand costs

CTOs, founding engineers, platform teams·3 modules · 28 min total

About this course

Most teams do not fully understand how AI and cloud costs work until something goes wrong. Token billing, context windows, model tiers, and provider-specific pricing all interact in ways that make spend hard to predict. This course walks you through the cost model from first principles, shows you what drives spend in practice, and teaches you how to set up the monitoring that catches changes before they become surprises.

What you will learn

  • How token billing, context windows, and model tiers affect your monthly spend
  • Which cost signals matter day to day vs which are noise
  • How to set up production monitoring that gives you daily visibility
  • Why relying on provider dashboards alone creates blind spots

How to use this course: Work through the modules in order for the full picture, or jump to the lesson that matches the problem in front of you right now. Each module is a standalone read — estimated total time is 28 minutes.

Course modules

3 lessons · 28 min total read time

18 min

How LLM pricing works

Understand token billing, context windows, and why a small product change can move spend quickly.

210 min

How to track LLM usage in production

Measure requests, token usage, and cost by provider, service, and category instead of relying on provider dashboards alone.

310 min

Monitoring AI infrastructure in production

Set up the minimum monitoring stack for daily visibility, cost spikes, and weekly review handoffs.

Frequently asked questions

Answers to the questions teams ask before starting this course.

What drives AI costs the most?

Token volume is the primary driver of AI cost: you pay per input and output token, so long prompts, large retrieved contexts, verbose outputs, and high request volume move spend fastest. Model tier is the second lever — a premium model can cost 15–20x more per token than a small one for the same task. Everything else (caching, batching, retries) modifies these two.

Why are provider dashboards not enough for tracking AI cost?

Provider dashboards show spend one provider at a time, usually a day or more behind, with no attribution to your services, features, or teams. When you run several providers, no single dashboard shows total spend or lets you compare where cost is moving. Unified tracking across providers, with daily granularity and service-level attribution, is what turns raw invoices into decisions.

How often should I check AI and cloud spend?

Check a daily pacing signal (spend so far this month vs forecast) every day, but only act on it weekly. Daily visibility catches spikes within hours instead of on the invoice; a weekly 30-minute review turns that visibility into decisions. Checking constantly without a review rhythm produces anxiety, not control.

Is this course free?

Yes. Every AI Cost Academy course is free to read. StackSpend itself offers a free 14-day trial (which doubles as a free cost health audit of your stack), then plans from $29/month.

Track and understand costs — AI Cost Academy | StackSpend