查询模型目录¶
查询当前用户可见模型的名称、能力、报价和启用状态。
GET https://billing.moi.matrixorigin.cn/api/v1/taas/models
调用前准备¶
准备个人访问令牌。
查询参数¶
将示例中的 $MOI_PERSONAL_ACCESS_TOKEN 替换为实际值。
curl --get "https://billing.moi.matrixorigin.cn/api/v1/taas/models" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN" \
--data-urlencode "page_size=2"
将响应中的 next_page_token 保存为 $NEXT_PAGE_TOKEN,保持筛选条件不变并请求下一页。该值为空或省略时停止翻页。
curl --get "https://billing.moi.matrixorigin.cn/api/v1/taas/models" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN" \
--data-urlencode "page_size=2" \
--data-urlencode "page_token=$NEXT_PAGE_TOKEN"
参数 |
类型 |
是否必填 |
说明 |
|---|---|---|---|
|
string |
否 |
模型类型筛选。 |
|
string |
否 |
模型启用状态筛选。 |
|
string |
否 |
按名称、别名、描述、系列、类型或供应商名称搜索。 |
|
string |
否 |
未填写 |
|
string |
否 |
报价筛选: |
|
string |
否 |
按模型系列筛选。可重复传递或用逗号分隔。 |
|
string |
否 |
|
|
string |
否 |
将系列匹配加入搜索条件。可重复传递或用逗号分隔。 |
|
string |
否 |
将类型匹配加入搜索条件。可重复传递或用逗号分隔。 |
|
integer |
否 |
仅返回上下文窗口大于 0 且不超过该值的模型。 |
|
string |
否 |
健康状态筛选。 |
|
integer |
否 |
每页数量,默认 100,最大 1000。 |
|
string |
否 |
上一页返回的下一页标记。首个请求省略。 |
成功响应¶
{
"items": [
{
"id": "model_example",
"name": "example-chat-model",
"alias": "Example Chat",
"logo": "example",
"description": "Example chat model.",
"type": "chat",
"native_types": [
"chat"
],
"capabilities": [
"chat"
],
"context_window": 32768,
"input_price_per_million": "0",
"output_price_per_million": "0",
"cache_creation_price_per_million": "0",
"cache_hit_price_per_million": "0",
"ocr_price_per_page": "0",
"image_price_per_image": "0",
"image_hd_price_per_image": "0",
"video_price_per_second": "0",
"video_hd_price_per_second": "0",
"tts_price_per_10k_chars": "0",
"tts_hd_price_per_10k_chars": "0",
"asr_price_per_minute": "0",
"asr_realtime_price_per_minute": "0",
"currency": "CNY",
"parameters": "7B",
"max_output_tokens": 8192,
"visibility": "public",
"allowed_user_ids": [
"user_example"
],
"status": "enabled",
"health_status": "healthy",
"created_at": 1788710400,
"updated_at": 1788710400
}
],
"total": 1,
"next_page_token": ""
}
字段 |
类型 |
说明 |
|---|---|---|
|
array of object |
本页记录。 |
|
string |
模型目录对象 ID,用于模型健康状态等管理查询。 |
|
string |
模型调用名称。 |
|
string |
模型显示别名。未设置时省略。 |
|
string |
模型系列标识。未设置时省略。 |
|
string |
模型说明。未设置时省略。 |
|
string |
模型类型。 |
|
array of string |
模型关联的原生类型。未设置时省略。 |
|
array of string |
模型支持的调用能力。未设置时省略。 |
|
integer |
上下文窗口 Token 数。未设置时省略。 |
|
string |
每百万输入 Token 的价格。未设置时可省略。 |
|
string |
每百万输出 Token 的价格。未设置时可省略。 |
|
string |
每百万缓存写入 Token 的价格。未设置时可省略。 |
|
string |
每百万缓存读取 Token 的价格。未设置时可省略。 |
|
string |
每页 OCR 的价格。未设置时可省略。 |
|
string |
每张图片的价格。未设置时可省略。 |
|
string |
每张高清图片的价格。未设置时可省略。 |
|
string |
每秒视频的价格。未设置时可省略。 |
|
string |
每秒高清视频的价格。未设置时可省略。 |
|
string |
每万字符语音合成价格。未设置时可省略。 |
|
string |
每万字符高清语音合成价格。未设置时可省略。 |
|
string |
每分钟语音识别价格。未设置时可省略。 |
|
string |
每分钟实时语音识别价格。未设置时可省略。 |
|
string |
模型报价使用的货币。 |
|
string |
模型参数规模说明。未设置时省略。 |
|
integer |
最大输出 Token 数。未设置时省略。 |
|
string |
模型可见范围。 |
|
array of string |
私有模型允许的用户 ID。未设置时省略。 |
|
string |
模型启用状态。 |
|
string |
最近汇总的模型健康状态。 |
|
integer |
创建时间,Unix 秒。 |
|
integer |
更新时间,Unix 秒。 |
|
integer |
符合筛选条件的总记录数。 |
|
string |
下一页标记。为空或省略时已到最后一页。 |