{"uid":"cap_NilCOTZ9iFXoI8vj8ow-J","slug":"modelprices-xyz-cheapest-long-context-llm-leaderboard-26f42a6e","name":"modelprices.xyz Cheapest Long-Context LLM Leaderboard","description":"Cheapest long-context LLM leaderboard: the 50 lowest-cost AI models with a 200,000-token context window or larger, ranked by inference cost per token — Claude 5, Gemini 3, GPT-5, Llama 4 Scout and more across 70+ providers. Input, output and cache USD per 1M tokens with exact context window and max output tokens joined in. Refreshed hourly.","url":"https://modelprices.xyz/llm/cheapest/long-context","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_I8GEdKhe9GqD77xdbA4kN","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the 50 lowest-cost AI models with a 200,000+ token context window, ranked by inference cost per token, with input/output/cache pricing in USD per 1M tokens.","exampleAgentPrompt":"What are the 50 cheapest AI models with at least a 200k token context window right now? I need to see input, output, and cache pricing per million tokens so I can pick the most cost-effective one for processing long documents.","exampleUseCases":[{"title":"Budget long-context model selection","prompt":"I need to process entire legal contracts and books — find me the cheapest AI models that can handle at least 200,000 tokens at once, ranked by cost per token."},{"title":"Cost comparison before switching providers","prompt":"Before I commit to a new LLM provider, show me the full leaderboard of the cheapest long-context models right now — I want to see input and output pricing side by side across providers like AWS, OpenAI, and Gemini."},{"title":"Automated cost-optimization for agent pipeline","prompt":"My agent needs to regularly pick the cheapest available model with a 200k+ context window — can you pull the current long-context price leaderboard so I can wire it into my model-selection logic?"}],"resultDescription":"A ranked list of up to 50 AI models (e.g. Claude, Gemini, GPT-5, Llama 4 Scout) with context windows of 200,000 tokens or larger, ordered by lowest inference cost. Each entry includes model name, provider, input cost (USD/1M tokens), output cost (USD/1M tokens), cache pricing, exact context window size, and max output tokens. Data is refreshed hourly.","failureModes":["HTTP 402 if payment not provided or USDC payment fails","Empty or partial results if no models currently meet the 200k context threshold","Stale pricing data (up to 1 hour old) if a provider recently changed rates","Rate limiting or timeout if the leaderboard data source is temporarily unavailable"],"whenToPreferThis":"Use this endpoint when you specifically need models with very large (200,000+ token) context windows and want them ranked by cost. Prefer this over the general cheapest-model or largest-context endpoints when your constraint is both long-context capability AND price. Ideal for agents that need to dynamically select the most affordable model for long-document tasks. If you need reasoning models or vision/multimodal models instead, use the dedicated leaderboard endpoints for those.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:51:24.981Z","isFirstParty":false}