Quiz
Subscription or API: how AI is priced, tokens, keys, and when each pays off
Check what you learned
10 questions from this lesson. Answers are checked as you go; nothing is recorded.
1 / 10
What is a token?
Hint
It is the unit on the meter.
Models read and write tokens, short chunks of text. Both prices and limits are counted in them.
2 / 10
On Anthropic's current models, how does the price of an output token compare with an input token?
Hint
Look at Sonnet 5.5: $2 in, $10 out.
Output is priced at five times input, so long written answers cost more than long documents read.
3 / 10
What do you get with a subscription instead of a per-word bill?
Hint
Heavy users feel it on lower tiers.
A flat fee buys a ceiling on usage. When you reach it, the app asks you to wait.
4 / 10
A program reads 3,000 tokens and writes 300 on Sonnet 5.5 ($2 in, $10 out per million). About how much does one answer cost?
Hint
3,000 x $2 / 1,000,000, plus 300 x $10 / 1,000,000.
$0.006 for input plus $0.003 for output comes to about $0.009.
5 / 10
Which step should come before your first API call?
Hint
Think of the key as a card number.
A spend limit caps the damage from a runaway script or a leaked key.
6 / 10
Where should an API key live?
Hint
Anywhere public is found by bots.
Keys belong in private, server-side settings. Anything a visitor can see can be copied.
7 / 10
Under Google's Gemini API terms, what is different about the free tier?
Hint
Turning on billing changes it.
On the unpaid tier, prompts may be used and reviewed; on the paid tier they are not.
8 / 10
What does a 429 error from the API mean?
Hint
It is about pace or budget.
A 429 means a limit was hit. Usually you wait and retry; a spend-cap 429 needs a different model or a higher cap.
9 / 10
Which job most clearly calls for the API rather than a subscription?
Hint
Who is at the keyboard?
Work that runs without you, on a site or a schedule, cannot use your personal login. That is what keys are for.
10 / 10
A job set to run every five minutes runs about how many times in a 30-day month?
Hint
12 an hour, 24 hours, 30 days.
12 x 24 x 30 = 8,640. Multiply by the per-answer cost before you switch a loop on.
Worth another look
After the quiz
Using AI · Working · Lesson 7 of 21
Subscription or API: how AI is priced, tokens, keys, and when each pays off
Two ways to pay for AI: a flat subscription with a usage ceiling, or an API meter billed per token. What tokens are, why output costs more, what a key is and how to keep it safe, and which jobs call for which. Prices as of November 2026.