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": "claude-sonnet-4-6",
      "object": "model",
      "created": 1777080000,
      "owned_by": ""
    }
  ]
}
查询当前密钥可以调用的模型列表。返回的 data[] 同时包含文本、图片、视频模型,可按 id 命名前缀区分。

请求

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

响应

{
  "object": "list",
  "data": [
    { "id": "claude-opus-4-7",       "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "claude-sonnet-4-6",     "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "claude-haiku-4-5-20251001", "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-5.5",               "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-5.4-mini",          "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "gpt-image-2",           "object": "model", "created": 1777080000, "owned_by": "" },
    { "id": "grok-imagine-video",    "object": "model", "created": 1777080000, "owned_by": "" }
  ]
}

推荐模型

用途推荐模型
通用对话、写作、长文档处理claude-sonnet-4-6claude-opus-4-7gpt-5.5
复杂推理 / 编码claude-opus-4-7gpt-5.3-codexgpt-5.4
低成本批量任务claude-haiku-4-5-20251001gpt-5.4-minideepseek-v4-flash
图片生成 / 编辑gpt-image-2
视频生成grok-imagine-video

使用建议

  • 模型清单会随线上能力调整,请把 /v1/models 作为运行时来源,不要写死硬编码。
  • 不同模型属于不同分组,分组直接决定计费倍率,详见 Model groups & pricing
  • 如果返回 403 model_not_allowed,请检查这把密钥是否被授权调用该模型;多数情况是 API Key 可用分组与目标模型 enable_groups 没有交集。
  • 文本模型默认走 /v1/chat/completions/v1/messages;图片走 /v1/images/*;视频走 /v1/videos/*

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