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
| Tier | Method | Path | Returns |
|---|---|---|---|
| free | GET | /api/v1/models | Every model in this site's slice with all price fields. |
| free | GET | /api/v1/models/:id/history | Recorded price changes for one model, oldest first. |
| free | GET | /api/v1/offers/:modelKey | Official price, recommended source, and up to 3 non-risky relay offers. |
| free | GET | /api/v1/picks | The six home-page pick cards as data: model, official price, best relay, alternatives. |
| x402 | GET | /api/v2/offers/:modelKey | Every offer including risky groups, group names, ratio_to_list, and last_ok_at. |
| x402 | GET | /api/v2/relays | Every relay source with model count, median ratio to list, recharge price, last success. |
| x402 | GET | /api/v2/history/:modelKey | 30-day offer_changes history plus the current offer snapshot. |
Free examples
curl -s https://llmapiprice.com/api/v1/offers/claude-sonnet-5-5curl -s https://llmapiprice.com/api/v1/picksFree 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.
curl -i https://llmapiprice.com/api/v2/offers/claude-sonnet-5-5// 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.