80trust / 100

Llm Cheapest

by modelprices.xyz in AI models & inference

x402 APIPassing, checked 35 min ago

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.

GET https://modelprices.xyz/llm/cheapest

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
20 ms typical, 39 ms slowest 5%
Last check
35 min ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://modelprices.xyz/llm/cheapest?expected_input=2000&expected_output=500&limit=3&min_context=200000&vision=true"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmodelprices.xyz%2Fllm%2Fcheapest
const res = await pay("https://modelprices.xyz/llm/cheapest?expected_input=2000&expected_output=500&limit=3&min_context=200000&vision=true");
console.log(await res.json());

Example input

{
  "expected_input": 2000,
  "expected_output": 500,
  "limit": 3,
  "min_context": 200000,
  "vision": true
}

Example output

{
  "generated_at": "2026-07-14T02:00:00.000Z",
  "match_count": 41,
  "models": [
    {
      "cache_read_per_mtok": 0.3,
      "confidence": "high",
      "first_observed_at": "2026-07-12T18:00:00.000Z",
      "id": "claude-sonnet-5",
      "input_per_mtok": 3,
      "output_per_mtok": 15,
      "provider": "anthropic",
      "source_url": "https://docs.claude.com/en/docs/about-claude/pricing",
      "usd_per_request": 0.0135
    }
  ],
  "ranked_by": "usd_per_request"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
35 min agoPassed4028 ms$0.01
4 h agoPassed40231 ms$0.01
8 h agoPassed40220 ms$0.01
11 h agoPassed4029 ms$0.01
15 h agoPassed40225 ms$0.01
19 h agoPassed40225 ms$0.01
23 h agoPassed402110 ms$0.01
26 h agoPassed40239 ms$0.01
29 h agoPassed4026 ms$0.01
35 h agoPassed40213 ms$0.01