# TokenBudget > Current LLM API list prices (checked 2026-11-24, each with its source URL) and a cost calculator for single requests and whole multi-turn agent runs, with prompt caching, batch discounts, long-prompt surcharges and announced price changes. Hosted MCP server and JSON API, free, no sign-up. Use it when you need a price or context window you may not know (models released or repriced after your training data), or to budget an agent loop before running it. ## MCP - Endpoint: https://tokenbudget.netlify.app/mcp (Streamable HTTP, stateless, no auth) - Tools: estimate_cost, plan_agent_run, check_context_fit, count_tokens, list_models, get_model_pricing, send_feedback ## API - [OpenAPI spec](https://tokenbudget.netlify.app/openapi.json) - POST https://tokenbudget.netlify.app/api/plan: total cost of an N-turn agent loop per model; which models fit the context and the budget. Body: {"turns": 20, "system_tokens": 3000, "tools_tokens": 2000, "task_tokens": 500, "output_tokens_per_turn": 800, "tool_result_tokens_per_turn": 1500, "budget_usd": 1} - POST https://tokenbudget.netlify.app/api/estimate: price one request on many models, cheapest first. Body: {"input_tokens": 12000, "output_tokens": 1000, "models": ["claude-sonnet-5-5", "gpt-6.2-sol"]} (or "text"/"messages" instead of input_tokens) - POST https://tokenbudget.netlify.app/api/fit: which models' context windows take this input. Body: {"input_tokens": 600000, "reserve_output_tokens": 8000} - POST https://tokenbudget.netlify.app/api/count: token estimates per tokenizer family - GET https://tokenbudget.netlify.app/api/models and https://tokenbudget.netlify.app/api/models/{id}: prices and limits - GET https://tokenbudget.netlify.app/api/freshness: price check date and whether provider pages changed since - POST https://tokenbudget.netlify.app/api/feedback: {"kind": "wrong-price", "message": "...", "model": "..."} - Batch: send {"requests": [ ... ]} to any POST endpoint (free: 5 per call) ## Accuracy - Prices are copied from providers' pages; each result carries source, checked_on and source_quality. Pass exact token counts for exact costs. - Token counts from text are estimates (calibrated against OpenAI o200k_base; other tokenizers via multipliers with an error band). - Never send secrets. Text you send is counted in memory and not stored. ## Prices (USD per 1M tokens, checked 2026-11-24) - claude-fable-5-2 (Anthropic): $8.00 in / $40.00 out per 1M, cached $0.20, context 1M - claude-opus-5-5 (Anthropic): $4.00 in / $20.00 out per 1M, cached $0.20, context 1M - claude-sonnet-5-5 (Anthropic): $2.00 in / $10.00 out per 1M, cached $0.10, context 1M - claude-haiku-5-5 (Anthropic): $0.10 in / $0.50 out per 1M, cached $0.01, context 1M, over 100000 prompt tokens $0.50/$2.50 - claude-opus-5 (Anthropic): $5.00 in / $25.00 out per 1M, cached $0.50, context 1M - claude-sonnet-5 (Anthropic): $2.00 in / $10.00 out per 1M, cached $0.20, context 1M - claude-sonnet-4-6 (Anthropic): $3.00 in / $15.00 out per 1M, cached $0.30, context 1M - claude-haiku-4-5 (Anthropic): $1.00 in / $5.00 out per 1M, cached $0.10, context 200K - gpt-6.2-astra (OpenAI): $8.00 in / $40.00 out per 1M, cached $0.40, context 1.05M - gpt-6.2-sol (OpenAI): $2.00 in / $10.00 out per 1M, cached $0.10, context 1.05M - gpt-6-luna (OpenAI): $0.10 in / $0.50 out per 1M, cached $0.01, context 1.05M - gpt-6.1-sol (OpenAI): $2.00 in / $10.00 out per 1M, cached $0.10, context not stated - gpt-6-astra (OpenAI): $10.00 in / $50.00 out per 1M, cached $1.00, context not stated - gemini-4-argon (Google): $2.00 in / $10.00 out per 1M, cached $0.10, context not stated, changes 2026-12-01 to $4.00/$20.00 - gemini-3.8-flash (Google): $0.75 in / $3.75 out per 1M, cached $0.075, context not stated, changes 2027-01-01 to $1.50/$7.50 - gemini-3.6-flash (Google): $0.75 in / $3.75 out per 1M, cached $0.075, context not stated, changes 2027-01-01 to $1.50/$7.50 - gemini-3.5-flash-lite (Google): $0.30 in / $2.50 out per 1M, cached $0.03, context not stated - gemini-3.1-flash-lite (Google): $0.25 in / $1.50 out per 1M, cached $0.025, context not stated - gemini-3.1-pro-preview (Google): $2.00 in / $12.00 out per 1M, cached $0.20, context not stated, over 200000 prompt tokens $4.00/$18.00 - gemini-2.5-pro (Google): $1.25 in / $10.00 out per 1M, cached $0.125, context not stated, over 200000 prompt tokens $2.50/$15.00 - gemini-2.5-flash (Google): $0.30 in / $2.50 out per 1M, cached $0.03, context 1M - gemini-2.5-flash-lite (Google): $0.10 in / $0.40 out per 1M, cached $0.01, context not stated - deepseek-flash (DeepSeek): $0.30 in / $1.20 out per 1M, cached $0.006, context 1M - deepseek-v4-pro (DeepSeek): $1.32 in / $3.96 out per 1M, cached $0.044, context 1M - mistral-large-4 (Mistral): $0.70 in / $2.10 out per 1M, cached $0.07, context not stated - mistral-small-4 (Mistral): $0.15 in / $0.60 out per 1M, cached $0.015, context not stated - codestral-25-08 (Mistral): $0.30 in / $0.90 out per 1M, cached $0.03, context not stated - ministral-3-14b (Mistral): $0.20 in / $0.20 out per 1M, cached $0.02, context not stated - ministral-3-8b (Mistral): $0.15 in / $0.15 out per 1M, cached $0.015, context not stated - ministral-3-3b (Mistral): $0.10 in / $0.10 out per 1M, cached $0.01, context not stated - groq-gpt-oss-120b (Groq): $0.15 in / $0.60 out per 1M, cached n/a, context 131K - groq-gpt-oss-20b (Groq): $0.075 in / $0.30 out per 1M, cached n/a, context 131K - groq-qwen3.8-27b (Groq): $0.80 in / $4.00 out per 1M, cached n/a, context 131K ## More - [Full docs](https://tokenbudget.netlify.app/llms-full.txt) - [All prices as JSON](https://tokenbudget.netlify.app/prices.json) - [Model pages](https://tokenbudget.netlify.app/models/) ## Pages for people - [Model-vs-model comparisons](https://tokenbudget.netlify.app/compare/) - [Cheapest LLM APIs by tier](https://tokenbudget.netlify.app/cheapest/) - [Prices by provider](https://tokenbudget.netlify.app/providers/) - [How token pricing works](https://tokenbudget.netlify.app/guides/how-llm-token-pricing-works/) ## Tool reference ### estimate_cost Price one LLM request (input + expected output) on many models at once, cheapest first, with current list prices from each provider's own pricing page (source URL and check date included), prompt-cache and batch discounts, long-prompt surcharges and announced price changes. Also says whether the request fits each model's context window. Call this before an expensive request to pick a model or to stay inside a budget. Input schema: ```json { "type": "object", "properties": { "text": { "type": "string", "description": "Prompt text. Counted with an estimator, never stored." }, "messages": { "type": "array", "items": { "type": "object" }, "description": "Chat messages [{role, content}]. Counted with an estimator, never stored." }, "system": { "type": "string", "description": "System prompt text." }, "input_tokens": { "type": "integer", "minimum": 0, "description": "Exact input token count, if you have it. Overrides text and gives an exact cost." }, "output_tokens": { "type": "integer", "minimum": 0, "description": "Expected output tokens (or the max_tokens you will allow)." }, "cached_input_tokens": { "type": "integer", "minimum": 0, "description": "How many input tokens will be read from the prompt cache." }, "batch": { "type": "boolean", "description": "Price with the provider's batch API discount where one is listed." }, "models": { "type": "array", "items": { "type": "string" }, "description": "Model ids to compare, e.g. [\"claude-sonnet-5-5\", \"gpt-6.2-sol\", \"gemini-3.8-flash\"]. Omit to compare every listed model. list_models gives every id." }, "providers": { "type": "array", "items": { "type": "string", "enum": [ "anthropic", "openai", "google", "deepseek", "mistral", "groq" ] }, "description": "Only these providers." }, "date": { "type": "string", "description": "Price on this day (YYYY-MM-DD), to see announced price changes. Default today." } } } ``` ### plan_agent_run Estimate the total cost of an agent loop that re-sends its growing context every turn, with prompt caching, on many models. Returns total cost, peak context, how many turns fit in each model's context window, how many turns fit in a budget, and a recommended model. Use before starting a long agent task. Input schema: ```json { "type": "object", "properties": { "turns": { "type": "integer", "minimum": 1, "maximum": 500, "description": "Number of model calls in the loop." }, "system_tokens": { "type": "integer", "minimum": 0 }, "tools_tokens": { "type": "integer", "minimum": 0, "description": "Tokens of tool definitions sent every turn." }, "task_tokens": { "type": "integer", "minimum": 0, "description": "Tokens of the first user message." }, "output_tokens_per_turn": { "type": "integer", "minimum": 0, "description": "Default 800." }, "tool_result_tokens_per_turn": { "type": "integer", "minimum": 0, "description": "Default 1500." }, "cache": { "type": "boolean", "description": "Assume prompt caching of the previous turn. Default true." }, "budget_usd": { "type": "number", "exclusiveMinimum": 0 }, "models": { "type": "array", "items": { "type": "string" }, "description": "Model ids to compare, e.g. [\"claude-sonnet-5-5\", \"gpt-6.2-sol\", \"gemini-3.8-flash\"]. Omit to compare every listed model. list_models gives every id." }, "providers": { "type": "array", "items": { "type": "string", "enum": [ "anthropic", "openai", "google", "deepseek", "mistral", "groq" ] }, "description": "Only these providers." } }, "required": [ "turns" ] } ``` ### check_context_fit Say which models can take this input plus the output you want to reserve, which cannot, and which do not publish a context window. Use before sending a very large document or conversation. Input schema: ```json { "type": "object", "properties": { "text": { "type": "string", "description": "Prompt text. Counted with an estimator, never stored." }, "messages": { "type": "array", "items": { "type": "object" }, "description": "Chat messages [{role, content}]. Counted with an estimator, never stored." }, "system": { "type": "string", "description": "System prompt text." }, "input_tokens": { "type": "integer", "minimum": 0, "description": "Exact input token count, if you have it. Overrides text and gives an exact cost." }, "reserve_output_tokens": { "type": "integer", "minimum": 0 }, "models": { "type": "array", "items": { "type": "string" }, "description": "Model ids to compare, e.g. [\"claude-sonnet-5-5\", \"gpt-6.2-sol\", \"gemini-3.8-flash\"]. Omit to compare every listed model. list_models gives every id." }, "providers": { "type": "array", "items": { "type": "string", "enum": [ "anthropic", "openai", "google", "deepseek", "mistral", "groq" ] }, "description": "Only these providers." } } } ``` ### count_tokens Estimate how many tokens a text is for each tokenizer family (OpenAI o200k, Claude legacy and 2026, Gemini, DeepSeek, Mistral, Qwen), with an error band. Estimates only; for exact counts use the provider's count endpoint. Input schema: ```json { "type": "object", "properties": { "text": { "type": "string", "description": "Prompt text. Counted with an estimator, never stored." }, "messages": { "type": "array", "items": { "type": "object" }, "description": "Chat messages [{role, content}]. Counted with an estimator, never stored." }, "models": { "type": "array", "items": { "type": "string" }, "description": "Model ids to compare, e.g. [\"claude-sonnet-5-5\", \"gpt-6.2-sol\", \"gemini-3.8-flash\"]. Omit to compare every listed model. list_models gives every id." } } } ``` ### list_models List every model this tool prices, with input, output, cache and batch prices per 1M tokens, context window, max output, source URL and the day the price was checked. Input schema: ```json { "type": "object", "properties": { "providers": { "type": "array", "items": { "type": "string", "enum": [ "anthropic", "openai", "google", "deepseek", "mistral", "groq" ] }, "description": "Only these providers." }, "provider": { "type": "string", "enum": [ "anthropic", "openai", "google", "deepseek", "mistral", "groq" ], "description": "One provider (same as providers with one item)." }, "min_context": { "type": "integer", "minimum": 0 } } } ``` ### get_model_pricing Price, context window, long-prompt surcharge, announced price changes and source for one model id. Input schema: ```json { "type": "object", "properties": { "model": { "type": "string" } }, "required": [ "model" ] } ``` ### send_feedback Report a wrong price, a missing model, a bug or an idea. Read by a person. Keep it under 1000 characters and do not include prompts, secrets or personal data (they are scrubbed anyway). Input schema: ```json { "type": "object", "properties": { "kind": { "type": "string", "enum": [ "bug", "wrong-price", "missing-model", "idea", "praise", "other" ] }, "message": { "type": "string", "maxLength": 1000 }, "model": { "type": "string", "description": "Model id the feedback is about, if any." }, "endpoint": { "type": "string", "description": "Tool or endpoint the feedback is about, e.g. plan_agent_run." } }, "required": [ "message" ] } ``` ## How plan_agent_run models a loop Turn n sends system + tools + task + (n-1) x (output + tool result) tokens and produces output_tokens_per_turn. With cache on, turn n reads turn n-1's whole input from the cache and writes the new part. Anthropic charges cache writes at its listed rate; other providers are charged the input price for new tokens and their automatic cache is assumed to hit, so real costs there can be higher. Long-prompt pricing (Claude Haiku 5.5 over 100K, Gemini Pro over 200K) is applied per request. ## Example response (POST /api/estimate, trimmed) ```json { "priced_on": "2026-11-24", "prices_checked_on": "2026-11-24", "cheapest": "gemini-3.8-flash", "cheapest_that_fits": "claude-sonnet-5-5", "results": [ { "model": "gemini-3.8-flash", "cost_usd": 0.01275, "context": { "fits": null }, "source": "https://aistudio.google.com/docs/pricing", "checked_on": "2026-11-24" }, { "model": "claude-sonnet-5-5", "cost_usd": 0.034, "context": { "fits": true }, "source": "https://platform.claude.com/docs/en/about-claude/pricing", "checked_on": "2026-11-24" }, { "model": "gpt-6.2-sol", "cost_usd": 0.034, "context": { "fits": true }, "source": "https://developers.openai.com/api/docs/pricing", "checked_on": "2026-11-24" } ], "notes": [] } ```