TokenLab

核心

列出模型

列出目前在 TokenLab 上可用的模型

GET
/v1/models

模型目錄是公開的,不需要 API key。每個項目都包含當前功能、價格和 API 格式的摘要。當您需要完整詳細資訊時,請檢索單一模型。

查詢參數 (Query Parameters)

categorystringquery

按 chat、image、video、audio、tts、stt、music、3d、embedding、rerank 或 translation 進行篩選。

recommended_forstringquery

返回針對特定任務的當前建議,例如 image、video、music、3d、tts、stt、embedding、rerank 或 translation。

providerstringquery

按模型製造商進行篩選,例如 openai、anthropic、google 或 deepseek。

tagstringquery

按標籤進行篩選,例如 chat、image、video、embedding 或 translation。

回應 (Response)

objectstring
始終為 list。
dataarray
包含 id、owned_by 和 tokenlab 摘要的模型列表。

tokenlab 下常見的列表欄位包括:

  • tokenlab.aliases
  • tokenlab.capabilities
  • tokenlab.pricing 和 tokenlab.pricing_unit
  • tokenlab.max_input_tokens 和 tokenlab.max_output_tokens
  • tokenlab.category
  • tokenlab.lifecycle、tokenlab.commercial 和 tokenlab.badges
  • tokenlab.request_format_summary
  • 當使用 recommended_for 時的 tokenlab.agent_preferences

當使用 recommended_for 時,結果可能還包含建議狀態和更新時間。請讀取當前回應,不要固定排序順序。

範例

curl "https://api.tokenlab.sh/v1/models?category=video"
{
  "object": "list",
  "data": [
    {
      "id": "veo3.1",
      "object": "model",
      "owned_by": "google",
      "tokenlab": {
        "category": "video",
        "capabilities": ["text-to-video", "image-to-video"]
      }
    }
  ]
}

請參閱 取得模型 以獲取完整詳細資訊。

curl -X GET "https://example.com/v1/models"
{  "object": "list",  "data": [    {      "id": "string",      "object": "model",      "created": 0,      "owned_by": "string",      "tokenlab": {        "aliases": [          "string"        ],        "deliveryAvailability": {          "verified": true,          "official": true,          "operations": {            "property1": {              "verified": true,              "official": true            },            "property2": {              "verified": true,              "official": true            }          }        },        "pricing": {},        "capabilities": [          "string"        ],        "providers": [          "string"        ],        "max_input_tokens": 0,        "max_output_tokens": 0,        "category": "string",        "pricing_unit": "string",        "cache_pricing": {},        "has_complex_pricing": true,        "pricing_summary": {},        "agent_preferences": {},        "lifecycle": {          "stage": "active",          "reason": "string",          "replacement_model": "string",          "released_at": "2019-08-24T14:15:22Z",          "deprecated_at": "2019-08-24T14:15:22Z",          "retired_at": "2019-08-24T14:15:22Z",          "sunset_at": "2019-08-24T14:15:22Z",          "latest": true,          "latest_source": "auto",          "latest_window_days": 0        },        "commercial": {          "user_charge_policy": "paid",          "free_reason": "platform",          "free_until": "2019-08-24T14:15:22Z"        },        "badges": [          {            "key": "free",            "tone": "green",            "priority": 0,            "tooltip": {              "key": "string",              "values": {                "property1": "string",                "property2": "string"              }            }          }        ],        "request_format_summary": {          "public_operations": [            "string"          ],          "request_endpoint": "string",          "request_endpoint_by_operation": {            "property1": "string",            "property2": "string"          }        }      }    }  ]}

授權

BearerAuth
AuthorizationBearer <token>

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

位置: header

查詢參數

provider?string

依公開模型提供者篩選,例如 openai、 anthropic、 google 或 minimax。

tag?string

依公開能力標籤篩選。

category?string

依模型類別篩選。

可選值

  • "chat"
  • "embedding"
  • "translation"
  • "image"
  • "video"
  • "audio"
  • "tts"
  • "stt"
  • "rerank"
  • "3d"
  • "music"
  • "decision"
recommended_for?string

為任務類別排序支援的非聊天模型,並包含推薦依據。

可選值

  • "image"
  • "video"
  • "music"
  • "3d"
  • "tts"
  • "stt"
  • "embedding"
  • "rerank"
  • "translation"
view?string

選擇精簡的模型選擇欄位或完整的 OpenAI 相容列表格式。

預設值"full"

可選值

  • "compact"
  • "full"

回應

application/json

application/json

application/json

application/json

application/json