LLM API cost calculator for AI agents
Updated 1 November 2026 (live prices, same numbers as /v1/models).
Short answer: on the most-used open models an agent step (20k input + 1k output tokens) costs a fraction of a cent; 1,000 steps cost from about $1 to about $12 depending on the model (table below, live). Prices are at most 2% above the model maker's list price. Every call has a $0.001 minimum. Check any request before paying with GET /v1/quote (no key, never charges).
Cost per call, most-used models
| Model id | $/1M in · out | Chat turn 2k in · 500 out | RAG answer 8k in · 800 out | Agent step 20k in · 1k out | 1,000 agent steps |
|---|---|---|---|---|---|
deepseek-v4.1-flash | $0.15 · $0.6 | $0.0010 | $0.0017 | $0.0036 | $3.60 |
glm-5.3-flash | $0.15 · $0.5 | $0.0010 | $0.0016 | $0.0035 | $3.50 |
gpt-oss-120b | $0.1 · $0.5 | $0.0010 | $0.0012 | $0.0025 | $2.50 |
deepseek-v3.2-thinking | $0.28 · $0.42 | $0.0010 | $0.0026 | $0.0060 | $6.02 |
qwen3.7-flash | $0.03 · $0.13 | $0.0010 | $0.0010 | $0.0010 | $1.00 |
glm-4.7-flash | $0.07 · $0.4 | $0.0010 | $0.0010 | $0.0018 | $1.80 |
kimi-k2-thinking | $0.47 · $2 | $0.0019 | $0.0054 | $0.011 | $11.40 |
llama-4-scout | $0.1 · $0.3 | $0.0010 | $0.0010 | $0.0023 | $2.30 |
claude-haiku-5.5 | $0.1 · $0.5 | $0.0010 | $0.0012 | $0.0025 | $2.50 |
gpt-5.6-luna | $0.2 · $1.2 | $0.0010 | $0.0026 | $0.0052 | $5.20 |
grok-4.1-fast-non-reasoning | $0.2 · $0.5 | $0.0010 | $0.0020 | $0.0045 | $4.50 |
mistral-nemo | $0.15 · $0.15 | $0.0010 | $0.0013 | $0.0032 | $3.15 |
Billed amounts, computed with the same formula as billing: input tokens × input price + output tokens × output price, at least $0.001 per call. Prepaid keys pay the tokens actually used; x402 pays the worst case for max_tokens.
Calculator
Runs /v1/quote live.
Pick a model and press Quote.
Do it from an agent
curl "https://pay.trustai.center/v1/quote?model=deepseek-v4.1-flash&input_tokens=20000&max_tokens=1000" # -> worst_case_usd, x402.amount_atomic (USDC, 6 decimals), cheaper_alternatives
Same thing over MCP: tool quote on https://pay.trustai.center/mcp. Or POST /v1/quote with your messages to price the exact prompt (upper-bound token estimate, same as the x402 price).
Tips to pay less
- Set
max_tokensclose to what you need: x402 charges the worst case for it. - Use a prepaid tai_ key for many small calls: you pay tokens actually used, not the worst case.
- Reasoning models bill hidden thinking tokens as output; use a non-thinking model for simple steps.
- Check
cheaper_alternativesin the quote.
FAQ
How can an agent know the price before paying?
GET /v1/quote?model=<id>&input_tokens=<n>&max_tokens=<n> returns the worst-case USD cost, the exact x402 amount in USDC and up to 3 cheaper alternatives. No key, never charges. Also available as the MCP tool quote.
Is there a minimum per call?
Yes, $0.001 per request. Small calls on cheap models are billed at that minimum.
What is the difference between x402 and a prepaid key?
x402 charges the worst case for max_tokens, settled only after a successful completion. A prepaid tai_ key is charged the tokens actually used (at least the minimum). Fund one with USDC or pay per call with x402.