✏️Prompts

Estimate and optimise AI API costs Prompt

Prompt

Estimate and optimise API costs for an AI feature.

Model: [Claude Sonnet / GPT-4o / Gemini]
Pricing: [$/million input tokens · $/million output tokens]
Typical prompt: [describe or paste example]
Typical output: [length and type]

Expected usage:
- Requests per day: [number]
- Peak usage: [describe spikes]

Please:
1. Estimate monthly token usage and cost
2. Cost at 10x and 100x scale
3. Biggest cost driver (input / output / volume)
4. 3 ways to reduce cost without degrading quality
5. Caching strategy if applicable

Why it works

Estimating monthly cost before building an AI feature prevents the surprise that many teams experience when a compelling prototype turns out to cost $50k/month at production scale. The cost-per-user calculation connects infrastructure economics to pricing and margin planning. Providing specific prompt and output examples rather than abstractions produces estimates that reflect actual token consumption rather than theoretical averages.

Watch out for

AI API cost estimates are sensitive to actual prompt and output length, which often increases significantly between prototype and production as edge cases and quality improvements add tokens. Build in a 2-3x safety margin on initial cost estimates, and instrument actual token consumption from day one of production to detect cost drift early. Also confirm current model pricing before using estimates in financial planning, as pricing changes frequently.

Used by

DevelopersFinance TeamsFounders