跳轉到主要內容
取得當前透過 ARouter 可用的所有提供商,包括其名稱和支援的模型數量。

端點

GET /api/v1/providers

請求範例

curl https://api.arouter.ai/api/v1/providers \
  -H "Authorization: Bearer lr_live_xxxx"

回應範例

{
  "data": [
    {
      "id": "OpenAI",
      "name": "OpenAI",
      "model_count": 24,
      "is_byok_supported": true
    },
    {
      "id": "Anthropic",
      "name": "Anthropic",
      "model_count": 12,
      "is_byok_supported": true
    },
    {
      "id": "Google",
      "name": "Google",
      "model_count": 16,
      "is_byok_supported": true
    },
    {
      "id": "Meta",
      "name": "Meta",
      "model_count": 18,
      "is_byok_supported": false
    }
  ]
}

回應欄位

欄位類型描述
dataarray提供商物件列表
data[].idstring用於路由的提供商識別碼(例如在 provider.order 中使用)
data[].namestring人類可讀的提供商名稱
data[].model_countinteger該提供商可用的模型數量
data[].is_byok_supportedboolean該提供商是否支援 BYOK

說明

  • 提供商 ID 用於聊天補全請求中的 provider.orderprovider.onlyprovider.ignore 欄位
  • 如何在請求中使用提供商 ID,請參閱提供商路由
  • BYOK 設定請參閱 BYOK