开发文档
模型列表
从代码读取目录。单价、上下文与模态会一并返回,适合自行构建模型选择界面时使用。
列表查询
通过 GET /models 获取全部。计划停止支持的模型默认排除,可用 include_deprecated=true 纳入。
响应字段
单价以每 100 万令牌的 USD 计。账单按调用时点汇率折算为韩元。
| Field | Type | Note |
|---|---|---|
| id | string | Request model identifier |
| provider | string | Owning provider |
| context_window | integer | Maximum input tokens |
| max_output_tokens | integer | Maximum output tokens |
| input_price | number | USD per 1M input tokens |
| output_price | number | USD per 1M output tokens |
| modalities | array | text, vision, audio, image |
| region | string | Inference region |
筛选
可按 provider 与 modality 收窄。列入组织屏蔽列表的模型根本不会返回。
缓存与长上下文单价
pricing 中除 5 分钟缓存写入单价 cache_write 外,还会返回 1 小时缓存写入单价 cache_write_1h。具有长上下文价格的模型会在 long_context 中返回阈值令牌数(threshold_tokens)与长上下文单价;提示令牌(输入 + 缓存读取 + 缓存写入)超过阈值时,整个请求按长上下文单价计费。没有该价格的模型 long_context 为 null。