Skip to content
Fourohtwo

Cheapest-model query

modelprices.xyz/llm/cheapest

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

BaseUnchecked
GEThttps://modelprices.xyz/llm/cheapest

UptimeNot checked yet

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
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
}