Api Endpoint

modelprices.xyz

Cheapest-model query: returns the lowest-cost AI models matching your constraints — min_context (tokens), vision/function_calling/reasoning (true), max_input_per_mtok (USD cap), limit (default 5). Add expected_input/expected_output token counts to rank by blended USD per request instead of input price; exclude_preview=true skips pre-release models. Answers 'what is the cheapest model that can do X?' across 2,000+ models and 70+ providers.

Open interactive test console

Offering

Provider
modelprices.xyz
Method
GET
Offering type
Api Endpoint
Transport type
http
Category
Api
Delivery
Not provided
Pricing model
Not provided
x402 version
2

Endpoint context

URL
https://modelprices.xyz/llm/cheapest
MIME type
application/json
First seen
2026-10-16T01:51:40.954Z
Last seen
Tags
None supplied

Payment pricing

x402 payment terms are the authoritative price for calling this endpoint.

Payment option 1
0.01 USDC
Atomic price: 10000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "10000",
    "payTo": "0x63a20fa244d3E6a8902121E99704b7F857dc6EBB"
  }
]

Observed health

Status
Healthy
Latest latency
1162 ms
Average latency
1037 ms
HTTP status
402
Last checked
Reachability
100% over 14 checks

Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.

Input schema

{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "const": "http"
    },
    "method": {
      "type": "string",
      "enum": [
        "GET"
      ]
    },
    "queryParams": {
      "type": "object",
      "properties": {
        "min_context": {
          "type": "integer",
          "description": "Minimum context window in tokens"
        },
        "vision": {
          "type": "boolean"
        },
        "function_calling": {
          "type": "boolean"
        },
        "reasoning": {
          "type": "boolean"
        },
        "max_input_per_mtok": {
          "type": "number",
          "description": "Max input price in USD per 1M tokens"
        },
        "expected_input": {
          "type": "number",
          "description": "Expected input tokens per request — with expected_output, ranks by blended USD per request instead of input price"
        },
        "expected_output": {
          "type": "number",
          "description": "Expected output tokens per request"
        },
        "exclude_preview": {
          "type": "boolean",
          "description": "Exclude preview/pre-release model versions"
        },
        "limit": {
          "type": "integer",
          "default": 5,
          "maximum": 25
        }
      }
    }
  },
  "required": [
    "type",
    "method"
  ],
  "additionalProperties": false
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "input": {
      "additionalProperties": false,
      "properties": {
        "method": {
          "enum": [
            "GET"
          ],
          "type": "string"
        },
        "queryParams": {
          "properties": {
            "exclude_preview": {
              "description": "Exclude preview/pre-release model versions",
              "type": "boolean"
            },
            "expected_input": {
              "description": "Expected input tokens per request — with expected_output, ranks by blended USD per request instead of input price",
              "type": "number"
            },
            "expected_output": {
              "description": "Expected output tokens per request",
              "type": "number"
            },
            "function_calling": {
              "type": "boolean"
            },
            "limit": {
              "default": 5,
              "maximum": 25,
              "type": "integer"
            },
            "max_input_per_mtok": {
              "description": "Max input price in USD per 1M tokens",
              "type": "number"
            },
            "min_context": {
              "description": "Minimum context window in tokens",
              "type": "integer"
            },
            "reasoning": {
              "type": "boolean"
            },
            "vision": {
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "type": {
          "const": "http",
          "type": "string"
        }
      },
      "required": [
        "type",
        "method"
      ],
      "type": "object"
    },
    "output": {
      "properties": {
        "example": {
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}