Estimate the cost of an AI feature

Estimates monthly API costs for an AI feature from expected usage and token prices, and shows which levers reduce cost most.

Prompt, 3 blanks to fill
Help me estimate the monthly cost of an AI feature.

Feature: {{FEATURE}}
Expected usage (users, requests per user, peak times): {{USAGE}}
Model prices I am considering (per million input and output tokens): {{PRICING}}

1. Estimate tokens per request: system prompt, user input, retrieved context, and output. Show your assumptions.
2. Calculate monthly cost for each model, as a table.
3. Show how cost changes with: prompt caching, a lower max output tokens limit, a smaller model for easy requests, and batching where latency does not matter.
4. Flag the assumption that most affects the total.

Show your maths so I can check it. Round to sensible numbers.

Example output

Per request: 2,500 input + 400 output tokens. Monthly: 300k requests, about $1,140 at listed prices. With caching on the 2,000-token system prompt: about $610. Biggest lever: caching, then a smaller model for simple requests.

How to use

Copy current prices from each provider's pricing page into PRICING; they change often. Measure real token counts from a prototype as soon as you can and rerun the estimate.

Why it works

Breaking a request into its token parts shows where cost actually comes from, which is often the repeated system prompt or retrieved documents. Showing the maths lets you check the numbers, since models can make arithmetic slips.

Find a prompt for the task in front of you.

96 prompts in 8 categories. Copy one, fill in the blanks, paste it into any model.

Browse prompts

Promptlexity is a free library of 96 AI prompts and 8 downloadable AI skills across 8 categories, plus a glossary of 64 AI and prompting terms. Each prompt shows the exact text to paste, the variables to fill in, an example of what comes back, and why it works. Each glossary term has a plain-English definition, an example and a common mistake. 6 step-by-step guides cover the basics. No signup, works with ChatGPT, Claude, Gemini and other models.

Press Esc to close