Skip to content

模型列表

模型列表 API 會回傳目前 DGrid API Key 可存取的模型清單。在發送聊天、補全或其他模型請求之前,可使用此端點探索可用的模型 ID。

取得模型列表

取得目前 API Key 可見的所有模型。回傳結果依據金鑰的存取群組進行權限過濾。

GET
https://api.dgrid.ai
GET/v1/models
Authorization
Authorization: Bearer <DGRID_API_KEY>
Response
200 · application/json

回應主體

欄位類型說明
objectstring固定為 list
successboolean請求是否成功。
dataarray目前 API Key 可見的模型物件列表。
data[].idstring用於下游 API 請求的模型 ID(例如 openai/gpt-5.4)。
data[].objectstring固定為 model
data[].createdintegerUnix 時間戳(秒)。
data[].owned_bystring擁有者識別碼。預設值:custom
data[].supported_endpoint_typesarray該模型支援的端點類型。
messagestringsuccessfalse 時的錯誤描述。

支援的端點類型

說明
openaiOpenAI 相容 API,例如 Chat Completions(/v1/chat/completions)。
openai-responseOpenAI Responses API(/v1/responses)。
image-generation圖像生成 API(/v1/images/generations)。

行為說明

  • 回傳的列表僅反映目前 API Key 可存取的模型,而非平台的完整全域目錄。
  • 回應回傳前,模型會依模型 ID 進行去重。
  • 模型列表根據 API Key 所屬存取群組中可用的供應商與模型組裝而成。
  • 若同一模型可透過多個供應商取得,回應中仍僅出現一次。