LLM model price lookup, token cost calculator and cheapest-model finder
llm_model_pricesUse when an agent must price an LLM call or pick the cheapest model. Input: model (up to 5, comma list) plus optional input_tokens, output_tokens, requests; or no model plus mode, provider, min_context, capabilities (vision, function_calling...). Output: JSON USD per 1M input/output tokens, cached/batch prices, context window, provider, capabilities, cost estimate or cheapest ranking, as_of + source commit. Example: ?model=gpt-4o&input_tokens=12000&output_tokens=800 Price: $0.004 USDC (Base or Solana) via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Model type for the cheapest search (default chat; chat includes responses-API models). Ignored when model is given | |
| limit | No | Max rows per model or in the ranking (default 10) | |
| model | No | Model name(s), up to 5 comma-separated (gpt-4o, claude-sonnet-4-5, gemini/gemini-2.5-flash). Also lists the same model at other providers. Omit to rank the cheapest models. Unknown → 400 with suggestions (not charged) | |
| provider | No | LiteLLM provider id filter: openai, anthropic, gemini, vertex_ai, bedrock, azure, groq, deepseek, mistral... | |
| requests | No | Number of requests to multiply the estimate by (default 1) | |
| min_context | No | Minimum context window (max input tokens) | |
| capabilities | No | Comma-separated required capabilities: vision, function_calling, reasoning, prompt_caching, response_schema, pdf_input, audio_input, audio_output, web_search, computer_use, video_input | |
| input_tokens | No | Input (prompt) tokens per request, for the cost estimate and ranking | |
| output_tokens | No | Output (completion) tokens per request | |
| include_deprecated | No | Include models past their deprecation date in the cheapest search (default false) |