铸云 AI
GET/anthropic/v1/models
公开接口

Models API

获取可用的 Anthropic 模型列表及详细信息

Models API 是公开接口,无需认证即可访问。 可用于列出所有可用模型、按供应商筛选或获取特定模型详情。

列出所有模型

获取所有可用的 Anthropic 模型列表。

GET /anthropic/v1/models

请求示例

cURL
curl https://api.mintcloud.ai/anthropic/v1/models
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.mintcloud.ai/anthropic"
)

# 列出所有模型
models = client.models.list()
for model in models.data:
    print(f"{model.id}: {model.display_name}")

响应格式

响应包含 models 数组,每个模型对象包含以下字段:

字段类型说明
idstring模型 ID,带 models/ 前缀
display_namestring模型显示名称
descriptionstring模型描述
supported_featuresobject支持的特性
context_window_sizeinteger上下文窗口大小
supported_actionsarray支持的操作列表
{
  "models": [
    {
      "id": "models/claude-sonnet-4-5",
      "display_name": "Claude Sonnet 4.5",
      "description": "最新一代 Claude 模型,擅长编程和复杂推理",
      "supported_features": {
        "vision": true,
        "tool_use": true,
        "streaming": true
      },
      "context_window_size": 200000,
      "supported_actions": ["complete", "embed", "rerank"]
    }
  ]
}

按供应商过滤

获取特定供应商的所有模型。

GET /anthropic/v1/models/{provider}

Anthropic 供应商标识为 anthropic

cURL
curl https://api.mintcloud.ai/anthropic/v1/models/anthropic

获取模型详情

获取特定模型的详细信息。

GET /anthropic/v1/models/{provider}/{model_id}
cURL
curl https://api.mintcloud.ai/anthropic/v1/models/anthropic/claude-sonnet-4-5
{
  "id": "models/claude-sonnet-4-5",
  "display_name": "Claude Sonnet 4.5",
  "description": "最新一代 Claude 模型,擅长编程和复杂推理",
  "supported_features": {
    "vision": true,
    "tool_use": true,
    "streaming": true
  },
  "context_window_size": 200000,
  "supported_actions": ["complete", "embed", "rerank"]
}

与 OpenAI 协议的字段差异

Anthropic API 与 OpenAI API 在字段命名上存在一些差异:

OpenAI 字段Anthropic 字段说明
idname (带 models/ 前缀)模型标识符
context_lengthcontext_window_size上下文窗口大小
supported_parameterssupported_actions支持的操作