API

Free JSON for the public price data. x402-paid JSON for the full offer firehose, relay medians and offer history.

Free endpoints
4
Paid price
$0.01
Network
eip155:8453
Paid API
enabled

Endpoints

TierMethodPathReturns
freeGET/api/v1/modelsEvery model in this site's slice with all price fields.
freeGET/api/v1/models/:id/historyRecorded price changes for one model, oldest first.
freeGET/api/v1/offers/:modelKeyOfficial price, recommended source, and up to 3 non-risky relay offers.
freeGET/api/v1/picksThe six home-page pick cards as data: model, official price, best relay, alternatives.
x402GET/api/v2/offers/:modelKeyEvery offer including risky groups, group names, ratio_to_list, and last_ok_at.
x402GET/api/v2/relaysEvery relay source with model count, median ratio to list, recharge price, last success.
x402GET/api/v2/history/:modelKey30-day offer_changes history plus the current offer snapshot.

Free examples

Recommended relay offer and official price

curl -s https://llmapiprice.com/api/v1/offers/claude-sonnet-5-5

Home-page picks as JSON

curl -s https://llmapiprice.com/api/v1/picks

Free responses are cached for 5 minutes and return unit: "USD per 1M tokens". More models: /api/v1/models.

Paid endpoints and x402

The v2 endpoints require an x402 payment of $0.01 per request on eip155:8453 (USDC). There is no signup and no API key: the first request returns 402 Payment Required with payment instructions in the PAYMENT-REQUIRED response header. An x402 client signs the payment, retries with the PAYMENT-SIGNATURE header, and the facilitator verifies and settles it.

The first paid request always returns 402

curl -i https://llmapiprice.com/api/v2/offers/claude-sonnet-5-5

Using an x402 buyer client (Node)

// npm i @x402/fetch @x402/core @x402/evm viem
import { wrapFetchWithPayment, x402HTTPClient } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY);
const client = new x402Client();
client.register("eip155:*", new ExactEvmScheme(signer));

const paidFetch = wrapFetchWithPayment(fetch, client);
const res = await paidFetch("https://llmapiprice.com/api/v2/offers/claude-sonnet-5-5");
const result = await new x402HTTPClient(client).processResponse(res);
console.log(result.body);

Paid responses are no-store and are not put in the edge cache. Read the x402 buyer quickstart for wallet setup, or the seller quickstart for how verification works.