Skip to main content
GET
/
models
List models
curl --request GET \
  --url https://dimilinks.com/v1/models \
  --header 'Authorization: Bearer <token>'
{
  "object": "list",
  "data": [
    {
      "id": "gpt-image-2",
      "object": "model",
      "created": 1777080000,
      "owned_by": "chatgpt"
    }
  ]
}
查询当前密钥可以调用的模型列表。图片能力默认使用 gpt-image-2

请求

curl "https://dimilinks.com/v1/models" \
  -H "Authorization: Bearer $DIMILINKS_API_KEY"

响应

{
  "object": "list",
  "data": [
    {
      "id": "gpt-image-2",
      "object": "model",
      "created": 1777080000,
      "owned_by": "chatgpt"
    }
  ]
}

使用建议

  • 新接入可以默认选择 gpt-image-2
  • 如果你的产品支持多模型,请先读取该接口再展示模型选项。
  • 如果返回 403 model_not_allowed,请检查 API Key 的模型权限。

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

Available models

object
string
required
Example:

"list"

data
object[]
required