← AI Engineer Bootcamp
Free live workshopOnline · 2 hours

Where the tokens go: the cost of an LLM API call

Most of us pay for LLM API calls without a clear picture of where the money goes. In this live session we follow one request from your code to the model and back, and look at what each step adds to the total. Then we take a small working app and make it cheaper step by step, measuring the effect of every change.

Dec
19
Saturday, December 19, 2026
7:00–9:00 PM GMT+2 · Online
Where the tokens go: the cost of an LLM API call. Free live workshop with Nikalina Ogorodova, AI/ML Engineer at Hyperskill
Save your free seat

Leave your email and we'll send you the link to join.

Thanks! The link is on its way to your inbox.
Something went wrong. Please try again.

You'll get the app's repository before the session, so you can follow along or run each step yourself afterwards.

What you'll learn

Where the tokens come from
Your messages, system prompt and tool definitions are combined into one piece of text before the model sees it, so some of the tokens you pay for are ones you never wrote. We'll look at that text on an open model, and see why output and reasoning tokens cost more than input.
How caching shows up in your bill
Providers charge less for the start of a prompt they've seen recently, as long as it stays exactly the same between requests. The usage block of a response shows how many tokens were cached, and we'll match it against what a monitoring tool reports.
Which changes bring the cost down
Starting from a deliberately wasteful version of the app, we go through a series of small diffs: reordering the prompt so caching works, sending less text, asking for shorter output, and passing easy requests to a smaller model. We also check that the answers stay good enough as the cost goes down.

Why this topic matters

LLM costs tend to rise as a product grows, as prompts get longer and teams pick a bigger model because it's the easy choice. A bill that looks fine in testing can become a problem at volume. Knowing where the tokens go lets you cut costs with measured changes, and check that the cheaper version still does the job.

Your host
Nikalina Ogorodova
Nikalina Ogorodova
AI/ML Engineer at Hyperskill

See where your tokens go

Register for free