{"openapi":"3.1.0","info":{"title":"modelprices.xyz — normalized LLM market data","version":"1.0.0","description":"Per-token prices, capability limits, and a price-change feed for 2,000+ LLMs across 70+ providers, normalized into single JSON tables and refreshed hourly.","x-guidance":"# modelprices.xyz — LLM market data for agents\n\nPay-per-call via x402 (USDC on Base, eip155:8453). No accounts, no API keys. All endpoints are GET.\n\n## Pick the right endpoint (cheapest first)\n\n- Need ONE model's price → GET /llm/price/{model} — $0.002. E.g. /llm/price/claude-sonnet-5\n- Need ONE model's context window / capabilities → GET /llm/limit/{model} — $0.002\n- Need \"cheapest model that can do X\" → GET /llm/cheapest?min_context=200000&vision=true — $0.005\n- Know your workload shape? Add expected_input=2000&expected_output=500 (tokens/request) to /llm/cheapest to rank by TOTAL blended USD per request, not input sticker price. Add exclude_preview=true to skip pre-release models.\n- Comparing MANY models or building a routing table → GET /llm/prices — $0.01 for all 2,000+ models\n- Capability table for all models → GET /llm/limits — $0.01\n- Watching for provider repricing → GET /llm/price-changes — $0.02 (diff feed, hourly snapshots)\n\n## Cost stewardship\n\n- For fewer than ~5 model checks, single lookups ($0.002) beat buying the table ($0.01).\n- Tables refresh hourly — cache a purchased table for up to 60 minutes instead of re-buying.\n- Lookup misses return HTTP 404 WITH suggestions (closest model ids) — retry with a suggestion rather than buying the table to search.\n- Free evaluation: /preview/llm/prices, /preview/llm/limits, /preview/llm/price-changes (5 sample rows, no payment).\n\n## Routing workflow recipe\n\n1. GET /llm/cheapest with your constraints (context, modality, price cap) — $0.005.\n2. GET /llm/limit/{model} on the top candidate to confirm capabilities — $0.002.\n3. Use /llm/price-changes daily if your routing depends on price stability — $0.02.\nTotal: ~$0.01 per routing decision, always against data ≤1h old.\n\n## Response shape\n\nTables: { generated_at, provider_count, model_count, models: [...] }. Lookups: { matched_id, generated_at, model: {...} }.\nPrices are USD per 1M tokens (input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok, batch_*).\n\n## Provenance (verify our numbers)\n\nEvery price row carries: source_url (the provider's official pricing page), first_observed_at (when our\nhourly aggregator first saw the model id — bounded by the table's first_observed_since, not launch date),\nand confidence (high = cross-verified against OpenRouter within 5%; medium = single source; low = sources\ndisagree — check source_url yourself before relying on a low-confidence price).","contact":{"name":"pennyforge","email":"pennyforgehq@gmail.com"}},"paths":{"/llm/price/{model}":{"get":{"operationId":"llm_price_model","summary":"Single-model price lookup","description":"Single-model price lookup: current per-token cost for one AI model by id (e.g. claude-sonnet-5, gpt-5, gemini-3-pro) — input, output, cache and batch USD per 1M tokens. The cheapest way to answer 'what does this model cost right now?' inside a routing or budgeting decision. Fuzzy-matches model ids and suggests alternatives on miss. Includes provenance: provider source URL, first_observed_at, confidence tier.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"},"example":"claude-sonnet-5","description":"Model id or unique suffix"}],"responses":{"200":{"description":"The matched model row","content":{"application/json":{"schema":{"type":"object","properties":{"matched_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"model":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}},"required":["matched_id","model"]}}}},"402":{"description":"Payment Required"},"404":{"description":"No matching model; body includes closest-id suggestions"}}}},"/llm/limit/{model}":{"get":{"operationId":"llm_limit_model","summary":"Single-model capability lookup","description":"Single-model capability lookup: context window size, max output tokens, and vision/audio/function-calling/reasoning support for one AI model by id. Answers 'can this model handle my task?' in one $0.002 call.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"},"example":"claude-sonnet-5","description":"Model id or unique suffix"}],"responses":{"200":{"description":"The matched model row","content":{"application/json":{"schema":{"type":"object","properties":{"matched_id":{"type":"string"},"generated_at":{"type":"string","format":"date-time"},"model":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}},"required":["matched_id","model"]}}}},"402":{"description":"Payment Required"},"404":{"description":"No matching model; body includes closest-id suggestions"}}}},"/llm/cheapest":{"get":{"operationId":"llm_cheapest","summary":"Cheapest-model query","description":"Cheapest-model query: returns the lowest-cost AI models matching your constraints — min_context (tokens), vision/function_calling/reasoning (true), max_input_per_mtok (USD cap), limit (default 5). Add expected_input/expected_output token counts to rank by blended USD per request instead of input price; exclude_preview=true skips pre-release models. Answers 'what is the cheapest model that can do X?' across 2,000+ models and 70+ providers.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005000"},"protocols":[{"x402":{}}]},"parameters":[{"name":"min_context","in":"query","schema":{"type":"integer"},"description":"Minimum context window (tokens)"},{"name":"vision","in":"query","schema":{"type":"boolean"}},{"name":"function_calling","in":"query","schema":{"type":"boolean"}},{"name":"reasoning","in":"query","schema":{"type":"boolean"}},{"name":"max_input_per_mtok","in":"query","schema":{"type":"number"},"description":"Max input price USD/1M tokens"},{"name":"expected_input","in":"query","schema":{"type":"number"},"description":"Expected input tokens per request; with expected_output, results are ranked by blended USD per request (usd_per_request field added)"},{"name":"expected_output","in":"query","schema":{"type":"number"},"description":"Expected output tokens per request"},{"name":"exclude_preview","in":"query","schema":{"type":"boolean"},"description":"Exclude preview/pre-release model versions"},{"name":"limit","in":"query","schema":{"type":"integer","default":5,"maximum":25}}],"responses":{"200":{"description":"Cheapest matching models, ascending by input price — or by blended usd_per_request when expected_input/expected_output are given","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"match_count":{"type":"integer"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}}},"required":["models"]}}}},"402":{"description":"Payment Required"},"404":{"description":"No matching model; body includes closest-id suggestions"}}}},"/llm/prices":{"get":{"operationId":"llm_prices","summary":"Compare AI model prices side-by-side","description":"Compare AI model prices side-by-side: a live price leaderboard of LLM token cost for GPT-5, Claude Opus 4, Claude Sonnet, Gemini 3 Pro, Llama 4, DeepSeek V4, Grok 4, Mistral Large and 2,000+ more models across 70+ providers (OpenAI, Anthropic, Google, Meta, xAI). Inference cost per token — input, output, cache and batch USD per 1M tokens — ranked, normalized into one table, cross-checked across two sources, refreshed hourly. Find the cheapest model and estimate token budgets.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The full table as JSON","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"provider_count":{"type":"integer"},"model_count":{"type":"integer"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}}},"required":["generated_at"]}}}},"402":{"description":"Payment Required"}}}},"/ai-model-pricing":{"get":{"operationId":"ai-model-pricing","summary":"AI model pricing comparison table","description":"AI model pricing comparison table: what every AI model costs right now — GPT-5, GPT-4o, Claude Opus 4, Claude Sonnet, Gemini 3 Pro, Llama 4, DeepSeek V4, Grok 4 and 2,000+ more. One normalized dataset of LLM token cost and inference pricing across OpenAI, Anthropic, Google and 70+ providers, refreshed hourly. Compare models by price, rank by cost, pick the cheapest model for any workload.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The full table as JSON","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"provider_count":{"type":"integer"},"model_count":{"type":"integer"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}}},"required":["generated_at"]}}}},"402":{"description":"Payment Required"}}}},"/llm/limits":{"get":{"operationId":"llm_limits","summary":"AI model capability, specs and limits table for 2,000+ LLMs — GPT-5, GPT-4o, Cla","description":"AI model capability, specs and limits table for 2,000+ LLMs — GPT-5, GPT-4o, Claude Opus 4, Claude Sonnet, Gemini 3 Pro, Llama 4, DeepSeek V4 and more: context window size, max output tokens, vision/audio/function-calling/reasoning support. Compare model constraints side-by-side across every provider to pick the right model for long-context, multimodal, or tool-use workloads. Refreshed hourly.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.010000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The full table as JSON","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"provider_count":{"type":"integer"},"model_count":{"type":"integer"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}}},"required":["generated_at"]}}}},"402":{"description":"Payment Required"}}}},"/llm/price-changes":{"get":{"operationId":"llm_price-changes","summary":"LLM price-change alert feed","description":"LLM price-change alert feed: track when OpenAI, Anthropic, Google or any AI provider reprices GPT, Claude, Gemini or any model's inference cost per token — old vs new price, percent delta, when it happened, plus newly launched and removed models. Structured JSON diffed from hourly snapshots; ideal for cost monitoring, repricing triggers, and AI market intelligence.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}}]},"responses":{"200":{"description":"The full table as JSON","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"provider_count":{"type":"integer"},"model_count":{"type":"integer"},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"input_per_mtok":{"type":"number"},"output_per_mtok":{"type":"number"},"cache_read_per_mtok":{"type":["number","null"]},"cache_write_per_mtok":{"type":["number","null"]},"source_url":{"type":["string","null"],"description":"Provider's official pricing page (provenance pointer; null for long-tail providers)"},"first_observed_at":{"type":"string","format":"date-time","description":"When our hourly aggregator first saw this model id — bounded by the table's first_observed_since, not the provider launch date"},"confidence":{"type":"string","enum":["high","medium","low"],"description":"high = cross-verified vs OpenRouter within 5%; medium = single source (LiteLLM); low = sources disagree"}}}}},"required":["generated_at"]}}}},"402":{"description":"Payment Required"}}}}}}