{"openapi":"3.1.0","info":{"title":"llm-model-price-table","version":"0.1.0","description":"Ranks models cheapest first by blended USD per 1M tokens (inputShare weights input vs output). Filter by provider, mode, minContextTokens, input/output modality, function calling, vision and price caps. Skips sample_spec and models past their deprecation date.; Looks up pricing for one model by name (exact key first, then case-insensitive substring). Returns USD per 1M tokens in/out, context window, modalities and capabilities for each match, cheapest first.","x-guidance":"LLM Model Price Table compares AI model prices from the live LiteLLM registry (MIT), normalized to USD per 1M tokens. `find_cheapest_models` ranks models by blended input+output cost after filtering by provider, mode, minimum context, modalities, function calling and vision. `get_model_price` looks up one model by name. Every row carries price_in, price_out, context window and a deprecation date. Deterministic, no LLM, with source URL and asOf. Tools: `find_cheapest_models`, `get_model_price`.","contact":{"email":"contact@gratefuldevai.com"}},"servers":[{"url":"https://llm-model-price-table.x402supply.com"}],"paths":{"/mcp":{"post":{"operationId":"llm-model-price-table_call","summary":"Call llm-model-price-table via MCP tools/call","tags":["llm-model-price-table"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"find_cheapest_models"},"arguments":{"type":"object","properties":{"provider":{"type":"string","maxLength":60,"description":"LiteLLM provider id, e.g. openai, anthropic, gemini, groq. Case-insensitive exact match. Omit for all providers"},"mode":{"type":"string","enum":["chat","completion","embedding","image_generation","audio_transcription","audio_speech","rerank","moderation","responses","realtime"],"description":"Model mode. Default chat","default":"chat"},"minContextTokens":{"type":"integer","minimum":1,"maximum":100000000,"description":"Minimum max_input_tokens context window"},"inputModality":{"type":"string","enum":["text","image","audio","video"],"description":"Require this input modality"},"outputModality":{"type":"string","enum":["text","image","audio","video","code"],"description":"Require this output modality"},"requireFunctionCalling":{"type":"boolean","description":"Only models that support function/tool calling","default":false},"requireVision":{"type":"boolean","description":"Only models that accept image input","default":false},"maxInputPricePerM":{"type":"number","minimum":0,"description":"Cap on input USD per 1M tokens"},"maxOutputPricePerM":{"type":"number","minimum":0,"description":"Cap on output USD per 1M tokens"},"inputShare":{"type":"number","minimum":0,"maximum":1,"description":"Share of input tokens in your workload, 0-1. Blended = in*share + out*(1-share). Default 0.75","default":0.75},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum models to return, 1-50","default":10}},"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}},{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"method":{"const":"tools/call"},"params":{"type":"object","required":["name","arguments"],"properties":{"name":{"const":"get_model_price"},"arguments":{"type":"object","properties":{"model":{"type":"string","minLength":2,"maxLength":120,"description":"Model name or fragment, e.g. gpt-4o or claude-sonnet"},"limit":{"type":"integer","minimum":1,"maximum":25,"description":"Maximum matches to return, 1-25","default":5}},"required":["model"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}}}}}]}}}},"responses":{"200":{"description":"Tool result","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["count","totalMatched","inputShare","models","source","asOf"],"properties":{"count":{"type":"integer"},"totalMatched":{"type":"integer"},"inputShare":{"type":"number"},"models":{"type":"array","items":{"type":"object"}},"source":{"type":"array","items":{"type":"string"}},"asOf":{"type":"string"}}}},{"type":"object","description":"JSON-RPC 2.0 response envelope. `result.content[0].text` is a JSON-encoded string matching the schema in `x-mcp-result-schema`.","properties":{"jsonrpc":{"const":"2.0"},"id":{"type":["string","number"]},"result":{"type":"object","properties":{"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"text"},"text":{"type":"string"}}}}}}},"x-mcp-result-schema":{"type":"object","required":["query","count","models","source","asOf"],"properties":{"query":{"type":"string"},"count":{"type":"integer"},"models":{"type":"array","items":{"type":"object"}},"source":{"type":"array","items":{"type":"string"}},"asOf":{"type":"string"}}}}]}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/tools/find_cheapest_models":{"post":{"operationId":"llm-model-price-table_find_cheapest_models_http","summary":"Ranks models cheapest first by blended USD per 1M tokens (inputShare weights input vs output). Filter by provider, mode, minContextTokens, input/output modality, function calling, vision and price caps. Skips sample_spec and models past their deprecation date.","tags":["llm-model-price-table"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","maxLength":60,"description":"LiteLLM provider id, e.g. openai, anthropic, gemini, groq. Case-insensitive exact match. Omit for all providers"},"mode":{"type":"string","enum":["chat","completion","embedding","image_generation","audio_transcription","audio_speech","rerank","moderation","responses","realtime"],"description":"Model mode. Default chat","default":"chat"},"minContextTokens":{"type":"integer","minimum":1,"maximum":100000000,"description":"Minimum max_input_tokens context window"},"inputModality":{"type":"string","enum":["text","image","audio","video"],"description":"Require this input modality"},"outputModality":{"type":"string","enum":["text","image","audio","video","code"],"description":"Require this output modality"},"requireFunctionCalling":{"type":"boolean","description":"Only models that support function/tool calling","default":false},"requireVision":{"type":"boolean","description":"Only models that accept image input","default":false},"maxInputPricePerM":{"type":"number","minimum":0,"description":"Cap on input USD per 1M tokens"},"maxOutputPricePerM":{"type":"number","minimum":0,"description":"Cap on output USD per 1M tokens"},"inputShare":{"type":"number","minimum":0,"maximum":1,"description":"Share of input tokens in your workload, 0-1. Blended = in*share + out*(1-share). Default 0.75","default":0.75},"limit":{"type":"integer","minimum":1,"maximum":50,"description":"Maximum models to return, 1-50","default":10}},"additionalProperties":false},"example":{"provider":"openai","minContextTokens":100000,"requireFunctionCalling":true,"limit":1}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["count","totalMatched","inputShare","models","source","asOf"],"properties":{"count":{"type":"integer"},"totalMatched":{"type":"integer"},"inputShare":{"type":"number"},"models":{"type":"array","items":{"type":"object"}},"source":{"type":"array","items":{"type":"string"}},"asOf":{"type":"string"}}},"example":{"count":1,"totalMatched":59,"inputShare":0.75,"models":[{"model":"gpt-5-nano","provider":"openai","mode":"chat","priceInPerM":0.05,"priceOutPerM":0.4,"blendedPerM":0.1375,"maxInputTokens":272000,"maxOutputTokens":128000,"inputModalities":["text","image"],"outputModalities":["text"],"supportsFunctionCalling":true,"supportsVision":true,"deprecationDate":"2026-12-11"}],"source":["https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"],"asOf":"2026-10-29T13:03:43.040Z"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/tools/get_model_price":{"post":{"operationId":"llm-model-price-table_get_model_price_http","summary":"Looks up pricing for one model by name (exact key first, then case-insensitive substring). Returns USD per 1M tokens in/out, context window, modalities and capabilities for each match, cheapest first.","tags":["llm-model-price-table"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","minLength":2,"maxLength":120,"description":"Model name or fragment, e.g. gpt-4o or claude-sonnet"},"limit":{"type":"integer","minimum":1,"maximum":25,"description":"Maximum matches to return, 1-25","default":5}},"required":["model"],"additionalProperties":false},"example":{"model":"gpt-4o","limit":1}}}},"responses":{"200":{"description":"Tool result (plain JSON, not MCP-wrapped)","content":{"application/json":{"schema":{"type":"object","required":["query","count","models","source","asOf"],"properties":{"query":{"type":"string"},"count":{"type":"integer"},"models":{"type":"array","items":{"type":"object"}},"source":{"type":"array","items":{"type":"string"}},"asOf":{"type":"string"}}},"example":{"query":"gpt-4o","count":1,"totalMatched":69,"models":[{"model":"gpt-4o","provider":"openai","mode":"chat","priceInPerM":2.5,"priceOutPerM":10,"blendedPerM":4.375,"maxInputTokens":128000,"maxOutputTokens":16384,"inputModalities":["text","image"],"outputModalities":["text"],"supportsFunctionCalling":true,"supportsVision":true,"deprecationDate":null}],"source":["https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"],"asOf":"2026-10-29T13:03:43.191Z"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"accepts":{"type":"array"}}}}}}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}}}}