端點(Endpoint): GET /v1/models

  • 有用戶登入獲取用戶分組下的可用列表,無用戶登入獲取 default 分組下的可用列表。
  • header 中有 Authorization 欄位 則查詢 key 對應的 token 下配置的模型列表。

返回示例:

{
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 1626777600,
      "owned_by": "OpenAI",
      "permission": [
        {
          "id": "modelperm-LwHkVFn8AcMItP432fKKDIKJ",
          "object": "model_permission",
          "created": 1626777600,
          "allow_create_engine": true,
          "allow_sampling": true,
          "allow_logprobs": true,
          "allow_search_indices": false,
          "allow_view": true,
          "allow_fine_tuning": false,
          "organization": "*",
          "group": null,
          "is_blocking": false
        }
      ],
      "root": "gpt-4o-mini",
      "parent": null
    }
  ]
}

返回結果

狀態碼狀態碼含義說明資料模型
200OKnoneInline

返回資料結構

狀態碼 200

名稱類型必選約束中文名說明
» data[object]truenonenone
»» idstringtruenone模型 IDnone
»» objectstringtruenonemodelnone
»» createdintegertruenone創建時間none
»» owned_bystringtruenone開發者none
»» permission[object]¦nulltruenonenone
»»» idstringtruenonenone
»»» objectstringtruenonenone
»»» createdintegertruenonenone
»»» allow_create_enginebooleantruenonenone
»»» allow_samplingbooleantruenonenone
»»» allow_logprobsbooleantruenonenone
»»» allow_search_indicesbooleantruenonenone
»»» allow_viewbooleantruenonenone
»»» allow_fine_tuningbooleantruenonenone
»»» organizationstringtruenonenone
»»» groupnulltruenonenone
»»» is_blockingbooleantruenonenone
»» rootstringtruenone模型名稱none
»» parentnulltruenone父節點none