docs: add GET /v1/pricing endpoint to API documentation
This commit is contained in:
parent
677ebae525
commit
d51018aeff
@ -1145,6 +1145,67 @@ curl 'https://token.opencomputing.cn/llmage/v1/models/catelog?catelogid=t2i' \
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## GET /v1/pricing
|
||||||
|
|
||||||
|
获取模型定价展示信息,根据模型名称查询其关联的定价程序并返回可读的定价文本。
|
||||||
|
|
||||||
|
### 必填参数
|
||||||
|
|
||||||
|
| 参数 | 类型 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `model` | string | 模型名称,如 `"qwen3.7-max"` |
|
||||||
|
|
||||||
|
### 可选参数
|
||||||
|
|
||||||
|
| 参数 | 类型 | 说明 |
|
||||||
|
|------|------|------|
|
||||||
|
| `catelogid` | string | 目录类型ID,默认 `"t2t"` |
|
||||||
|
|
||||||
|
### 请求示例
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /llmage/v1/pricing?model=qwen3.7-max
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl 'https://token.opencomputing.cn/llmage/v1/pricing?model=qwen3.7-max' \
|
||||||
|
-H 'Authorization: Bearer ***
|
||||||
|
```
|
||||||
|
|
||||||
|
### 响应格式
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"status": "ok",
|
||||||
|
"data": {
|
||||||
|
"ppid": "pp_xxx",
|
||||||
|
"name": "qwen3.7-max",
|
||||||
|
"pricing_type": "per_use",
|
||||||
|
"display_text": "【通义千问 qwen3.7-max】定价:\n - 输入Token: 12 元/百万 [模型=qwen3.7-max]\n - 输出Token: 48 元/百万 [模型=qwen3.7-max]",
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"factor": "输入Token",
|
||||||
|
"price": 12,
|
||||||
|
"unit": "百万",
|
||||||
|
"filters": "模型=qwen3.7-max"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### 错误响应
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"status": "error", "message": "model parameter required"}
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"status": "error", "message": "model 'xxx' not found or has no pricing"}
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 通用说明
|
## 通用说明
|
||||||
|
|
||||||
### catelogid 目录类型ID对照表
|
### catelogid 目录类型ID对照表
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user