# modelprices.xyz Cheapest Long-Context LLM Leaderboard

> modelprices.xyz Cheapest Long-Context LLM Leaderboard is a paid API for AI agents from modelprices.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

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.

## Facts

- Endpoint: GET https://modelprices.xyz/llm/cheapest/long-context
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/modelprices-xyz-cheapest-long-context-llm-leaderboard-26f42a6e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NilCOTZ9iFXoI8vj8ow-J

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability modelprices-xyz-cheapest-long-context-llm-leaderboard-26f42a6e
```

Example prompt: 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.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/modelprices-xyz-cheapest-long-context-llm-leaderboard-26f42a6e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from modelprices.xyz](https://www.zero.xyz/host/modelprices.xyz/llms.txt)
