API & Developers
Free, read-only JSON endpoints for live LLM and GenAI pricing data — no API key, no signup.
No API key · No signupBase URL
https://llmrates.aiEndpoints
List and filter models with their current prices, paginated.
Parameters: provider, modality, minContext, maxInputPrice, hasCaching, hasBatch, sort, order, page, pageSize, currency
/api/models/{slug}Full detail for one model, including recent price history and related models.
All active providers with their model counts.
/api/providers/{slug}One provider and its active model lineup with headline prices.
Compare up to 5 models side by side by their stable ids (sid).
Parameters: models (comma-separated sids, max 5), currency
Full dataset export — every model and provider with all price tiers. Add ?type=models|providers and ?format=csv.
Parameters: type, format
Plain-text summary of the catalog, formatted for LLMs and AI agents.
All query parameters are optional.
Quick start
curl "https://llmrates.ai/api/models?provider=openai&sort=inputPrice&order=asc"Model response shape
{
"models": [
{
"id": number,
"name": string,
"slug": string,
"family": string | null,
"contextWindow": number | null,
"maxOutput": number | null,
"supportsTools": boolean,
"supportsBatch": boolean,
"supportsCaching": boolean,
"deprecatedAt": string | null, // ISO 8601
"provider": { "name": string, "slug": string, "providerType": string, "baseUrl": string | null },
"modalities": string[], // e.g. ["text", "image"]
"price": PriceRow | null, // headline price in the requested currency
"prices": PriceRow[] // every tier / region
}
],
"pagination": { "page": number, "pageSize": number, "total": number, "totalPages": number }
}
// PriceRow (per 1M tokens unless the field name says otherwise)
{
"inputPricePerMillion": number | null,
"outputPricePerMillion": number | null,
"cachedInputPricePerMillion": number | null,
"processingTier": "standard" | "batch" | "fast",
"region": string | null,
"priceUnit": string, // currency the row was sourced in
"sourceUrl": string | null,
"verifiedAt": string | null // ISO 8601
}Caching & freshness
Endpoints are edge-cached and refreshed frequently, so responses can be up to a few minutes old. Every response includes Cache-Control headers.
Free usage
The public API is free for light usage, research, prototypes, internal tools, and open-source projects. Attribution is appreciated.
For high-volume usage, commercial redistribution, production integrations, SLA, historical data, or custom monitoring, please for a commercial plan.
Attribution
If the data helps your project, a link back to LLMRates.ai is appreciated — it keeps the data open and updated.
<a href="https://llmrates.ai" target="_blank" rel="noopener">
LLM & GenAI pricing data by LLMRates.ai
</a>Open dataset
Prefer files over an API? The same data is published daily as JSON and CSV in our open, CC BY 4.0 dataset on GitHub.
