GET/anthropic/v1/models
公开接口Models API
获取可用的 Anthropic 模型列表及详细信息
Models API 是公开接口,无需认证即可访问。 可用于列出所有可用模型、按供应商筛选或获取特定模型详情。
列出所有模型
获取所有可用的 Anthropic 模型列表。
GET /anthropic/v1/models
请求示例
cURL
curl https://api.mintcloud.ai/anthropic/v1/modelsimport 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 数组,每个模型对象包含以下字段:
| 字段 | 类型 | 说明 |
|---|---|---|
| id | string | 模型 ID,带 models/ 前缀 |
| display_name | string | 模型显示名称 |
| description | string | 模型描述 |
| supported_features | object | 支持的特性 |
| context_window_size | integer | 上下文窗口大小 |
| supported_actions | array | 支持的操作列表 |
{
"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 字段 | 说明 |
|---|---|---|
| id | name (带 models/ 前缀) | 模型标识符 |
| context_length | context_window_size | 上下文窗口大小 |
| supported_parameters | supported_actions | 支持的操作 |