跳到导航

Getusagesummary

以 Markdown 格式查看

Daily-aggregate KPIs for the window plus an equal-length previous window for comparison.

Success data: preset, window, previousWindow, current, previous (rollup rows).

Example data (shape):

{
"preset": "30d",
"window": { "startDate": "2026-01-01", "endDate": "2026-01-30" },
"previousWindow": { "startDate": "2025-12-02", "endDate": "2025-12-31" },
"current": { "request_count": "...", "cost_sum": "..." },
"previous": { "request_count": "...", "cost_sum": "..." }
}

身份验证

AuthorizationBearer
Bearer credential containing a JWT, Virtual Key, or PAT.

请求头

X-Workspace-Idstring可选格式: "uuid"

Required for a normal JWT, Virtual Key, or PAT. A JWT may instead send X-Openmodel-User-Id. Not used by the public health endpoint.

X-Openmodel-User-Idstring可选格式: "uuid"

JWT-only alternative to X-Workspace-Id. Must be a UUID equal to the JWT subject; the server uses it as the workspace id. Not valid as the sole workspace header for Virtual Key or PAT authentication.

查询参数

presetenum可选默认为 30d

UTC calendar preset when start+end are not both set. Allowed: mtd, 7d, 30d, 3m, 6m, 12m. Omitted → 30d.

startstring可选

Inclusive start date YYYY-MM-DD (UTC). Must be paired with end; overrides preset.

endstring可选

Inclusive end date YYYY-MM-DD (UTC). Must be paired with start.

响应

codeinteger
messagestring
dataany