live LLM prices, USD per 1M tokens
Live LLM prices, one JSON API — refreshed hourly from LiteLLM's community price table, normalized to USD per 1M tokens.
$ curl 'https://api.lishuyu.app/llm-live-pricing/api/models?provider=anthropic&q=opus'
$ curl 'https://api.lishuyu.app/llm-live-pricing/api/models/claude-opus-5?currency=CNY'
$ curl 'https://api.lishuyu.app/llm-live-pricing/api/cost?model=claude-opus-5&input_tokens=12000&output_tokens=3000'
Filters: provider (e.g. anthropic, openai, gemini),
q (substring), mode (chat, embedding, ...),
limit/offset. currency=CNY (or any code
from /api/currencies) adds a converted block — daily
keyless FX rates, USD stays canonical. DeepSeek's v4 models carry
pricing_windows (peak = Mon-Fri 01:00-04:00 & 06:00-10:00 UTC,
off-peak = 50%); /api/cost picks the window for at
(default: now) and applies long-context tiers (e.g. Gemini above-200k) from the
prompt size. /api/meta reports snapshot freshness; when an
upstream is unreachable the last good snapshot is served with
stale: true.
Live LLM pricing across providers (Anthropic, OpenAI, Google, ...), normalized to USD per 1M tokens with optional currency conversion. Cached from LiteLLM's public price table; DeepSeek peak/off-peak windows are modeled.
Base URL: https://api.lishuyu.app/llm-live-pricing — paths below are relative to it.
| method | path | auth | purpose |
|---|---|---|---|
GET | /api/models | none | list model pricing; filters: provider, q, mode, limit, offset, currency |
GET | /api/models/{model_id} | none | one model (id may contain '/'); optional currency |
GET | /api/providers | none | providers with model counts |
GET | /api/cost | none | estimate request cost: model, input_tokens, output_tokens, cache_read_tokens, cache_write_tokens; optional currency and at (ISO time — picks DeepSeek peak/off-peak window) |
GET | /api/currencies | none | supported currency codes |
GET | /api/meta | none | upstream snapshot freshness (pricing + fx) |
Other platform services: GET https://registry.lishuyu.app/llm.txt (public how-to), or authenticate and query GET https://registry.lishuyu.app/api/services/discover/{capability} to find a capability, then call that service directly.