跳转到主要内容
GET
Account Usage
使用下方声明的范围与时间参数查询汇总用量。 控制台查询流程与逐笔记录请参阅用量。

请求规范

  • 方法与路径: GET /usage
  • 请求 URL 模板: https://api.aisa.one/v1/usage
  • start_time: query; 必填
  • end_time: query; 可选
完整 OpenAPI 定义 有效请求声明(包括认证和引用的 schema):

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

查询参数

start_time
integer<int64>
必填

Window start as a Unix timestamp in seconds.

end_time
integer<int64>

Window end as a Unix timestamp in seconds. Defaults to the current time.

响应

Usage totals and per-day buckets over the window.

bucket_width
string

Bucket granularity (e.g. 1d).

buckets
object[]

Per-bucket usage, ordered by time.

currency
string

ISO currency code (always USD).

end_time
integer<int64>

Echoed window end (Unix seconds).

scope
string

Aggregation scope implied by the credential (e.g. key or account).

start_time
integer<int64>

Echoed window start (Unix seconds).

totals
object

Aggregate totals across the whole window.