Skip to content
Clairos Learn

Cost, capacity, and reliability · Lesson 2 of 14 · 5 min

Estimate request cost

A token cost estimate multiplies each token count by its corresponding per-token rate. Convert per-million rates before summing input and output estimates.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated AI Ops lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

Understand the pattern

A token cost estimate multiplies each token count by its corresponding per-token rate. Convert per-million rates before summing input and output estimates.

Interpret the evidence

Record the fictional case estimate of 0.0016 units, not 1.6 or 1600.

A tempting mistake

Use per-million rates as if they were prices for a single token.

All names, measurements, prices, versions, and thresholds in this exercise are fictional training data. The evidence supports this bounded scenario, not a claim about a live provider.

Worked example and expected result
$ cat /opt/ai-lab/cases/aiops-cost-reliability-002.json
{
  "fixture": "Fictional training data; not a live measurement.",
  "input_tokens": 1000,
  "output_tokens": 200,
  "input_rate_per_million": 1,
  "output_rate_per_million": 3,
  "estimated_cost": 0.0016
}

Exit status: 0. The command completed successfully in the training fixture.

$ jq .estimated_cost /opt/ai-lab/cases/aiops-cost-reliability-002.json
0.0016

Exit status: 0. The command completed successfully in the training fixture.

$ printf '%s\n' 'record-estimate-0-0016' > /home/learner/lab/aiops-cost-reliability-002-decision.txt
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

Try a variation

Name the assumption that would have to change for “record-estimate-0-0016” to stop being the justified action. Do not silently replace missing evidence with a guess.

Explain it

What does the evidence in “Estimate request cost” justify?

Apply it elsewhere

A colleague concludes: “Use per-million rates as if they were prices for a single token.” What should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Compare model cost profilesTry an incident drill

Anonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.

Keep learning

  1. 01Read token cost inputsToken cost inputs separate input and output rates, their units and the model revision. This case uses fictional training rates, not a provider price quote.Practice
  2. 02Compare model cost profilesModel cost comparison should use the same workload and required quality. A cheaper request that repeatedly fails the task may not be the better operating choice.Practice
  3. 03Inspect cache effectivenessCache effectiveness depends on hit rate, eligible work and correctness. A high hit rate is harmful when responses come from stale or improperly shared entries.Practice