# modelprices.xyz — LLM market data for agents Pay-per-call via x402 (USDC on Base, eip155:8453). No accounts, no API keys. All endpoints are GET. ## Pick the right endpoint (cheapest first) - Need ONE model's price → GET /llm/price/{model} — $0.003. E.g. /llm/price/claude-sonnet-5 - Need ONE model's context window / capabilities → GET /llm/limit/{model} — $0.003 - Need "cheapest model that can do X" → GET /llm/cheapest?min_context=200000&vision=true — $0.01 - 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. - Comparing MANY models or building a routing table → GET /llm/prices — $0.02 for all 2,000+ models - Capability table for all models → GET /llm/limits — $0.02 - Watching for provider repricing → GET /llm/price-changes — $0.03 (diff feed, hourly snapshots) - Only care about ONE vendor's models → buy that vendor's board for $0.01 instead of the full table: /claude-pricing, /gpt-pricing, /gemini-pricing, /llama-pricing, /deepseek-pricing, /mistral-pricing, /grok-pricing, /qwen-pricing, /kimi-pricing, /glm-pricing, /minimax-pricing, /gemma-pricing, /command-pricing, /phi-pricing, /jamba-pricing - Only care about ONE host's catalogue → GET /llm/prices/{provider} — $0.01. Providers: openai, anthropic, google, vertex-ai, bedrock, azure, fireworks, together, deepinfra, openrouter, novita, replicate, xai, mistral, cloudflare, databricks, nebius, watsonx, oracle, vercel, sambanova, snowflake - Pre-ranked shortlists (50 rows, cheapest first, capability fields joined in) — $0.01 each: /llm/cheapest/overall, /llm/cheapest/vision, /llm/cheapest/reasoning, /llm/cheapest/function-calling, /llm/cheapest/long-context (200k+), /llm/cheapest/128k-context, /llm/cheapest/million-token-context, /llm/context-windows (100 biggest context windows, ranked) ## Cost stewardship - For fewer than ~4 model checks, single lookups ($0.003) beat buying the table ($0.02). - If every model you care about is one vendor's or one host's, the matching $0.01 board is half the price of the full table and already sorted cheapest-first with context windows joined in. - Tables refresh hourly — cache a purchased table for up to 60 minutes instead of re-buying. - Lookup misses return HTTP 404 WITH suggestions (closest model ids) — retry with a suggestion rather than buying the table to search. - Free evaluation: /preview/llm/prices, /preview/llm/limits, /preview/llm/price-changes, and a /preview twin of every board (e.g. /preview/claude-pricing) — 5 sample rows each, no payment. ## Routing workflow recipe 1. GET /llm/cheapest with your constraints (context, modality, price cap) — $0.01. If your constraint is a standard one (vision, reasoning, tool use, 128k/200k/1M context), the matching pre-ranked board at /llm/cheapest/{constraint} costs the same and needs no query building. 2. GET /llm/limit/{model} on the top candidate to confirm capabilities — $0.003. 3. Use /llm/price-changes daily if your routing depends on price stability — $0.03. Total: ~$0.013 per routing decision, always against data ≤1h old. ## Response shape Tables: { generated_at, provider_count, model_count, models: [...] }. Lookups: { matched_id, generated_at, model: {...} }. Prices are USD per 1M tokens (input_per_mtok, output_per_mtok, cache_read_per_mtok, cache_write_per_mtok, batch_*). ## Provenance (verify our numbers) Every price row carries: source_url (the provider's official pricing page), first_observed_at (when our hourly aggregator first saw the model id — bounded by the table's first_observed_since, not launch date), and confidence (high = cross-verified against OpenRouter within 5%; medium = single source; low = sources disagree — check source_url yourself before relying on a low-confidence price). ## Other resources - OpenAPI contract: https://modelprices.xyz/openapi.json - MCP server (native agent tools): https://modelprices.xyz/mcp - Freshness health check: https://modelprices.xyz/healthz