⌘ CodersEditor

All tools / AI tools

AI API Cost Calculator

Calculate input and output API costs using your own per-million-token prices.

Prices are user supplied in USD; caching, taxes and other charges are excluded.

How to use AI API Cost Calculator

Load the example, edit the input using the same format, and select Run. Review the output before copying or downloading.

Example input

{
  "inputTokens": 10000,
  "outputTokens": 2000,
  "inputPrice": 0.5,
  "outputPrice": 2,
  "requests": 1000
}

Example output

{
  "inputUSD": 5,
  "outputUSD": 4,
  "totalUSD": 9
}

Frequently asked questions

What does this tool do?

Calculate input and output API costs using your own per-million-token prices.

What are the limitations?

Prices are user supplied in USD; caching, taxes and other charges are excluded.

Does it call an AI API?

No. Tool processing runs in your browser. The site separately loads advertising and analytics scripts.

Related tools

AI Prompt Builder

AI System Prompt Builder

AI Prompt Template Library