The formula
cost per request = input_tokens / 1,000,000 × input_price + output_tokens / 1,000,000 × output_price
monthly cost = cost per request × requests per monthPrices per model are on the pricing page. For example, claude-sonnet-4-6 is currently $3.15 / $15.75 per 1M tokens (input / output) and claude-haiku-5-5 is $0.105 / $0.525 per 1M tokens (input / output).
Estimating tokens
- 1 token ≈ 4 characters ≈ ¾ of an English word (tokens explained).
- Count everything you send: system prompt + history + documents + the user's message.
Worked example: support chatbot
- System prompt: 400 tokens
- Help article context: 1,500 tokens
- History (average): 800 tokens
- User message: 60 tokens
- Answer: 250 tokens
Input ≈ 2,760 tokens, output ≈ 250 tokens per message. Multiply by your model's prices, then by messages per month (for example 3,000 conversations × 4 messages).
Worked example: summarising documents
1,000 documents × 3,000 input tokens and 300 output tokens each = 3M input and 0.3M output tokens. With a small model this is often only a few dollars.
Measure instead of guessing
The most accurate estimate comes from running 20 realistic requests and reading the actual cost in Usage Logs. Multiply by your expected volume and add a safety margin of 20–30%.
Then cap it
Set a monthly limit on the key that matches your budget. With prepaid billing you can never spend more than your balance anyway (how billing works).
Claude, GPT, Gemini, DeepSeek, image and video models through one OpenAI- and Anthropic-compatible endpoint. Prepaid, pay only for what you use.