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://www.llmrates.aiEndpoints
/api/modelsList 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.
/api/providersAll active providers with their model counts.
/api/providers/{slug}One provider and its active model lineup with headline prices.
/api/compareCompare up to 5 models side by side by their stable ids (sid).
Parameters: models (comma-separated sids, max 5), currency
/llms.txtPlain-text summary of the catalog, formatted for LLMs and AI agents.
All query parameters are optional.
Quick start
curl "https://www.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
Every endpoint is edge-cached and refreshed shortly after each price scrape, so responses may be up to a few minutes old. Cache-Control headers are included on every response.
Attribution
The data is free to use. If it helps your project, a link back to LLMRates.ai is appreciated — it keeps the data open and updated.
<a href="https://www.llmrates.ai" target="_blank" rel="noopener">
LLM & GenAI pricing data by LLMRates.ai
</a>Please keep request volume reasonable. For high-volume or commercial use, get in touch.
