The loopGiiS Designc0d3rConnectorsFree toolsPromptsPricingEnterpriseDocs
Sign InGet Started Free

AI API Cost Calculator

Estimate what an AI feature will cost per request and per month. Enter today's prices from your provider.

The prices pre-filled above are only an example. Replace them with the current prices for your model from the provider's pricing page.

$0.0120
Per request
$12.00
For 1,000 requests
Current prices: Anthropic (Claude) · OpenAI · Google (Gemini) · xAI (Grok) · OpenRouter

Ways to lower API costs

  • Use a smaller model for simple tasks such as classification or short rewrites.
  • Cache long, repeated instructions where the provider supports prompt caching.
  • Limit output length; output tokens usually cost the most.
  • Batch non-urgent jobs if your provider offers a cheaper batch rate.

Frequently asked questions

Why do I need to enter the prices?

Providers change prices and release new models often, so built-in prices go out of date. Copy the current input and output price per million tokens from the provider's pricing page (linked on this page) for an accurate estimate.

How do I know how many tokens my prompt uses?

Paste a typical prompt into the box and the tool counts it with OpenAI's tokenizer. Other models tokenise slightly differently, so treat it as an estimate.

Why are output tokens priced higher?

Generating text costs providers more than reading it, so output (completion) tokens are usually several times the price of input (prompt) tokens. Shorter answers save the most.

Does this include caching or batch discounts?

No. Prompt caching and batch processing can cut costs considerably; enter the discounted price per million tokens if you use them.

Related free tools

AI token counter · Profit margin calculator · llms.txt generator · JSON formatter