Tokens, pricing and limits
A feature that costs a tenth of a cent in testing can cost thousands a month in production, or fail at lunchtime with "429 Too Many Requests". Both are predictable with a pencil and five minutes.
In this lesson you'll learn to
- Price a request from its input, cached input, output and thinking tokens.
- Estimate a feature's monthly cost and find which part of the request drives it.
- Explain requests-per-minute and tokens-per-minute limits, and size traffic against them.
- Handle 429 and overload errors with retries, backoff and limits of your own.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.