GET /v1/models/{id}
通过 ID 或启用的别名获取一种规范模型,包括特定于关键的定价。
GET /v1/models/{id}
该标识符可以是规范模型 ID 或启用的别名。
要求
curl https://api.model-gate.com/v1/models/ch-47 \
-H "Authorization: Bearer mg_live_..."
回复
响应与返回的项目具有相同的模型对象 GET /v1/models。有条件的 batch_cost 和 batch_pricing 仅当经过身份验证的帐户定价模板的批量系数不同于 1。这 id 字段始终是规范模型 ID,而 aliases 包含接受的别名。
context_window 等于 context_length; max_input_tokens 和 max_output_tokens 公开配置的客户端限制。极限值为 0 表示该值未在 Model Gate 中配置,并且不应被解释为实际的零令牌限制。
{
"id": "claude-opus-4.7",
"object": "model",
"aliases": ["ch-47"],
"currency": "USD",
"pricing_unit": "per_1m_tokens",
"context_length": 200000,
"context_window": 200000,
"max_input_tokens": 180000,
"max_output_tokens": 20000,
"max_completion_tokens": 20000,
"cost": {"input": "0.2", "output": "1", "cache_read": "0.02", "cache_write": "0.25", "reasoning": "1"},
"usage_cost": {"input": "10", "output": "50", "cache_read": "1", "cache_write": "12.5", "reasoning": "50"},
"usage_pricing": {"basis": "official_price", "multiplier": "10", "inherited_from": "key"},
"batch_cost": {"input": "0.1", "output": "0.5", "cache_read": "0.01", "cache_write": "0.125", "reasoning": "0.5"},
"batch_pricing": {"multiplier": "0.5", "applies_to": "claude_openai_compat_batches"}
}
未找到
{
"error": {
"type": "invalid_request_error",
"code": "model_not_found",
"message": "Model not found."
}
}