API 與開發者
免費、唯讀的 JSON 介面,提供即時的 LLM 與 GenAI 價格資料 —— 無需 API key,無需註冊。
無需 API key · 無需註冊基礎 URL
https://llmrates.ai介面列表
GET/api/models
列出並篩選模型及其目前價格,支援分頁。
參數: provider, modality, minContext, maxInputPrice, hasCaching, hasBatch, sort, order, page, pageSize, currency
GET
/api/models/{slug}單一模型的完整詳情,包含近期價格歷史與相關模型。
所有使用中的供應商及其模型數量。
GET
/api/providers/{slug}單一供應商及其使用中模型列表與代表價格。
GET/llms.txt
面向 LLM 與 AI 代理的純文字目錄摘要。
所有查詢參數皆為選填。
快速開始
curl "https://llmrates.ai/api/models?provider=openai&sort=inputPrice&order=asc"Model 回應結構
{
"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
}快取與時效
每個介面都經過邊緣快取並頻繁刷新,因此回應資料可能有幾分鐘的延遲。每個回應都包含 Cache-Control 標頭。
免費使用
公開 API 對輕量使用、研究、原型、內部工具與開源專案免費開放。歡迎署名。
如需大流量使用、商業再散布、生產環境整合、SLA、歷史資料或客製化監控,請以取得商業方案。
署名
若資料對你的專案有幫助,歡迎連結回 LLMRates.ai —— 這有助於資料持續開放與更新。
<a href="https://llmrates.ai" target="_blank" rel="noopener">
LLM & GenAI pricing data by LLMRates.ai
</a>開放資料集
比起 API 更想要檔案?同樣的資料每天以 JSON 與 CSV 形式發布在我們 GitHub 上的開放資料集中(CC BY 4.0)。
