# modelprices.xyz Million-Token-Context LLM Leaderboard

> modelprices.xyz Million-Token-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-15).

Returns a ranked list of every AI model with a 1M+ token context window, sorted by inference cost per token, with input/output/cache pricing in USD per 1M tokens.

## Facts

- Endpoint: GET https://modelprices.xyz/llm/cheapest/million-token-context
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/modelprices-xyz-million-token-context-llm-leaderboard-ade3233d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1V6XNLhusFDy0oLXLN7Mk

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-million-token-context-llm-leaderboard-ade3233d
```

Example prompt: Show me the cheapest AI models that support at least a 1 million token context window, ranked by cost per token — I want to see input, output, and cache pricing so I can pick the most affordable one for processing a huge document corpus.

## When to prefer this

Choose this endpoint when you specifically need to find and compare models with million-token-or-larger context windows ranked by cost — ideal for cost optimization of long-document, codebase, or large-corpus inference tasks. Prefer it over general LLM pricing tables when context window size is the primary constraint and you want pre-filtered, pre-ranked results rather than scanning all models manually.

## Known failure modes

- Service unavailable or timeout if the hourly refresh is in progress
- Empty result set if no models meeting the 1M-token threshold are indexed (unlikely but possible during data gaps)
- Stale pricing data if the upstream provider APIs were unreachable during the last refresh cycle
- HTTP 402 payment required if the x402 payment header is missing or the USDC balance is insufficient

## How this service works

Cheapest million-token-context LLM leaderboard: every AI model with a 1,000,000-token context window or larger, ranked by inference cost per token — Gemini 3 Pro, Gemini 3 Flash, Llama 4 Scout, GPT-5 long-context tiers and more. Input, output and cache USD per 1M tokens with exact context window and max output joined in. Answers 'what is the cheapest model that fits my whole corpus?' Refreshed hourly.

## Output

A ranked leaderboard of AI models with context windows of 1 million tokens or larger, each entry including model name, provider, exact context window size, max output tokens, and USD cost per 1M tokens for input, output, and cached 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-million-token-context-llm-leaderboard-ade3233d/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)
