模型列表导读
如果你还没想清楚模型命名、上下文窗口和参数支持,先看这页,不要先堆路由策略。
GET/v1/models
请求示例
bash
curl https://api.therouter.ai/v1/models \
-H "Authorization: Bearer $THEROUTER_API_KEY"你最该看哪些字段
json
{
"id": "openai/gpt-4o",
"name": "GPT-4o",
"description": "General-purpose multimodal model",
"context_length": 128000,
"pricing": {
"prompt": "0.000005",
"completion": "0.000015"
},
"architecture": {
"modality": "text+image->text",
"input_modalities": ["text", "image"],
"output_modalities": ["text"]
},
"supported_parameters": ["temperature", "top_p", "stop", "tools"]
}context_length:决定你能塞多长上下文,不只是模型“贵不贵”。supported_parameters:决定 fallback 链和工具能力能不能跑通。pricing:决定 shared 路径下的成本预估和预算判断。
别过度相信筛选条件
当前这个接口并不支持文档里曾提到的
provider 或 architecture 查询过滤,所以不要把它当成实时查询语言来依赖。