# modelprices.xyz Cheapest LLM Model Finder

> modelprices.xyz Cheapest LLM Model Finder is a paid API for AI agents from modelprices.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Returns the lowest-cost AI models matching capability constraints (context window, vision, function calling, reasoning) across 2,000+ models and 70+ providers

## Facts

- Endpoint: GET https://modelprices.xyz/llm/cheapest?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/modelprices-xyz-cheapest-llm-model-finder-bf7a2897
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p--rnUIWr-vLij9-6GvYg

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-llm-model-finder-bf7a2897
```

Example prompt: What are the 5 cheapest AI models that support both vision and function calling, have at least a 64000 token context window, and cost no more than $1.00 per million input tokens?

## When to prefer this

Use this endpoint when you need to find the cheapest AI model satisfying specific capability requirements — especially when you have hard constraints like vision support, function calling, reasoning, or a minimum context window. Prefer this over the general price leaderboard when cost optimization is the primary goal and you need to filter by capability. Best for automated agent decisions about which LLM to route tasks to based on budget and feature requirements.

## Known failure modes

- No models match all constraints — returns empty list or reduced set
- max_input_per_mtok too low — filters out all models, returning empty results
- min_context too large — no models with that context window exist in dataset
- Invalid parameter types (e.g. non-integer for min_context) — 400 bad request
- Payment not processed — 402 response requiring x402 payment before retry
- Stale pricing data — model prices may lag real-time provider updates

## How this service works

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.

## Output

A ranked list of up to 25 AI models (default 5) sorted by price ascending, each with model ID, provider name, input/output token pricing, and capability flags — giving agents the cheapest option that satisfies every requested constraint

## 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": {
      "limit": {
       "type": "integer",
       "default": 5,
       "maximum": 25
      },
      "vision": {
       "type": "boolean"
      },
      "reasoning": {
       "type": "boolean"
      },
      "min_context": {
       "type": "integer",
       "description": "Minimum context window in tokens"
      },
      "expected_input": {
       "type": "number",
       "description": "Expected input tokens per request — with expected_output, ranks by blended USD per request instead of input price"
      },
      "exclude_preview": {
       "type": "boolean",
       "description": "Exclude preview/pre-release model versions"
      },
      "expected_output": {
       "type": "number",
       "description": "Expected output tokens per request"
      },
      "function_calling": {
       "type": "boolean"
      },
      "max_input_per_mtok": {
       "type": "number",
       "description": "Max input price in USD per 1M tokens"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "models": [
   {
    "id": "claude-sonnet-5",
    "provider": "anthropic",
    "input_per_mtok": 3,
    "output_per_mtok": 15,
    "cache_read_per_mtok": 0.3
   }
  ],
  "match_count": 41,
  "generated_at": "2026-07-14T02:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/modelprices-xyz-cheapest-llm-model-finder-bf7a2897/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)
