查询模型运行状态¶
查询当前用户模型在最近 1 小时的请求量、耗时、错误率和健康状态。
GET https://billing.moi.matrixorigin.cn/api/v1/taas/dashboard/model-status
调用前准备¶
准备个人访问令牌。
查询参数¶
将示例中的 $MOI_PERSONAL_ACCESS_TOKEN 替换为实际值。
curl --get "https://billing.moi.matrixorigin.cn/api/v1/taas/dashboard/model-status" \
-H "X-API-Key: $MOI_PERSONAL_ACCESS_TOKEN" \
--data-urlencode "model_status_sort=requests1h" \
--data-urlencode "model_status_limit=8"
参数 |
类型 |
是否必填 |
说明 |
|---|---|---|---|
|
string |
否 |
降序排序: |
|
integer |
否 |
最多返回的模型数,默认 8,最大 50。 |
|
string |
否 |
模型类型。 |
|
string |
否 |
调用请求填写的模型名称。 |
|
string |
否 |
调用状态,例如 |
|
string |
否 |
调用错误类别。 |
|
string |
否 |
调用方 IP。 |
|
string |
否 |
Genesis 本地密钥 ID。 |
|
string |
否 |
Genesis 本地密钥 ID 列表。可重复传递或用逗号分隔。 |
|
string |
填写 |
凭据类别: |
|
string |
填写 |
凭据对象 ID。必须同时填写 |
|
string |
否 |
计费用量事件 ID。 |
|
string |
否 |
计费记录 ID。 |
|
string |
否 |
计价方式。 |
|
string |
否 |
结算方式:genesis 或 |
|
string |
否 |
企业方案 ID。 |
|
string |
否 |
企业合同编号。 |
|
string |
否 |
企业方案模型 ID。 |
|
string |
否 |
Responses 响应 ID。 |
|
string |
否 |
Conversation ID。 |
|
string |
否 |
请求日志 ID 列表。可重复传递或用逗号分隔。 |
|
string |
否 |
|
|
string |
否 |
供应商 ID。查询仍限定为当前用户的调用。 |
成功响应¶
{
"model_status": [
{
"model_id": "model_example",
"model_name": "Example Chat",
"latency_ms": 120,
"avg_latency_ms": 120,
"error_rate": 0,
"recent_1h_requests": 2,
"requests_1h": 2,
"health_status": "healthy"
}
],
"model_health": [
{
"model_id": "model_example",
"model_name": "Example Chat",
"latency_ms": 120,
"avg_latency_ms": 120,
"error_rate": 0,
"recent_1h_requests": 2,
"requests_1h": 2,
"health_status": "healthy"
}
],
"model_status_sort": "requests1h",
"model_status_limit": 8
}
字段 |
类型 |
说明 |
|---|---|---|
|
array of object |
模型状态列表。 |
|
string |
模型目录对象 ID。 |
|
string |
模型显示名称。 |
|
integer |
最近一小时的平均调用耗时,毫秒。 |
|
integer |
与 |
|
number |
最近一小时的失败比例,范围 0 到 1。 |
|
integer |
最近一小时的请求次数。 |
|
integer |
与 |
|
string |
最近记录的健康状态。无记录时为 |
|
array of object |
与 |
|
string |
模型目录对象 ID。 |
|
string |
模型显示名称。 |
|
integer |
最近一小时的平均调用耗时,毫秒。 |
|
integer |
与 |
|
number |
最近一小时的失败比例,范围 0 到 1。 |
|
integer |
最近一小时的请求次数。 |
|
integer |
与 |
|
string |
最近记录的健康状态。无记录时为 |
|
string |
实际使用的排序方式。 |
|
integer |
实际使用的数量上限。 |