Turn unpredictable API invoices into engineered unit economics with real catalog math.
Every lab runs completely client-side with copyable prompts and browser checkpoints.
Curriculum Progress
0 of 4 modules completed (0%)
Before rewriting code, inspect the balance between input tokens, output tokens, and call volume. A RAG chatbot with 8,000-token retrieved prompts is input-bound; a code or report generator is output-bound. Each responds to a different optimization lever.
Given our workload logs:
- Daily requests: {{REQUESTS_PER_DAY}}
- Avg system+tools prefix: {{PREFIX_TOKENS}} tokens
- Avg dynamic user input: {{USER_TOKENS}} tokens
- Avg completion: {{OUTPUT_TOKENS}} tokens
Compute the percentage of monthly bill from static prefix vs dynamic input vs output, and rank top 2 cost levers.Which workload benefits most dramatically from prompt caching?
Quantify the savings and SLA trade-off of moving async traffic to batch queues.
Compare 100% frontier traffic against a light → general → complex model cascade.
Start with a monthly budget and see how many tokens and requests each model allows.
Yes. Check the Prompt Caching directory for model-by-model cache read rates and the Batch API Calculator for synchronous vs batch queue monthly estimates.
Reorder prompts so static blocks sit first for cache hits, tighten output length rules, and shift offline overnight jobs to Batch APIs.
Provider billing rules differ between batch discounts and cached reads; verify the current provider pricing sheet linked in each model profile on /models before assuming stacked discounts.