TokenLab

核心

獲取定價

獲取模型的定價資訊

GET
/v1/pricing

這是公開端點,不需要 API 金鑰。

概覽

使用此端點可以列出目前對外可見的活躍模型定價資訊。

如需查看某個模型的完整定價詳細資料,包括結構化定價與溯源資訊,請優先使用 取得模型定價。

查詢參數

providerstringquery

選填的供應商篩選,例如 openai、anthropic 或 google。

tagstringquery

選填的模型標籤篩選,例如 chat、image、video、embedding 或 translation。

回應

objectstring

始終為 pricing。

updated_atstring

目前公開價格發布時的 ISO 時間戳。

currencystring

始終為 USD。

dataarray

定價條目陣列。每一項都包含 model、provider、is_lock_price、capabilities、aliases,以及上方互動式 schema 回傳的公開純量或結構化定價摘要欄位。

請求

curl "https://api.tokenlab.sh/v1/pricing?provider=openai&tag=chat"

回應

Response
{
  "object": "pricing",
  "updated_at": "2026-04-20T00:00:00.000Z",
  "currency": "USD",
  "data": [
    {
      "model": "gpt-4o",
      "provider": "openai",
      "is_lock_price": false,
      "input_per_1m_tokens": "2.50",
      "output_per_1m_tokens": "10.00",
      "capabilities": ["chat"],
      "aliases": ["gpt-4o-latest"]
    }
  ]
}

請使用上方的互動式 OpenAPI 面板取得確切的回應 schema。公開定價條目也可能暴露 lock_price_per_request、has_complex_pricing、supported_operations、pricing_summary 與 pricing_provenance。

授權

BearerAuth
AuthorizationBearer <token>

API Key 驗證。請在 Dashboard > API > API Keys 建立或管理 API 金鑰。

位置: header

查詢參數

provider?string

按提供者 ID 篩選。

tag?string

按模型標籤篩選。

回應

application/json

application/json

application/json

application/json