> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 计费用量

> 获取翻页的计费记录，显示每个任务的 GPU 秒数、令牌数与费用。

获取一份计费记录列表，包含每个任务的 GPU 用量、令牌数与费用。使用 `limit` 查询参数控制返回的条目数。

## 接口

**GET** `/v1/billing/usage`

认证：`Authorization: Bearer $ARIA_PIN_KEY`

## 查询参数

<ParamField query="limit" default="50" type="integer">
  返回的最大记录数。必须在 1 到 500 之间。
</ParamField>

## 响应

<ResponseField name="items" type="array">
  计费记录列表，按创建时间排序，最新的在前。

  <Expandable>
    <ResponseField name="billing_id" type="string">
      计费记录的唯一标识符。
    </ResponseField>

    <ResponseField name="job_id" type="string">
      与此费用关联的任务 ID；若无则为空。
    </ResponseField>

    <ResponseField name="kind" type="string">
      计费类型，例如 `training`。
    </ResponseField>

    <ResponseField name="gpu_seconds" type="number">
      该任务消耗的 GPU 秒数。
    </ResponseField>

    <ResponseField name="tokens" type="integer">
      处理的令牌数。
    </ResponseField>

    <ResponseField name="cost" type="number">
      以所配置币种计的已结算费用。
    </ResponseField>

    <ResponseField name="created_at" type="string">
      记录创建的 ISO 8601 时间戳。
    </ResponseField>
  </Expandable>
</ResponseField>

## 示例

```bash theme={null}
curl "http://<pin-host>:8001/v1/billing/usage?limit=10" \
  -H "Authorization: Bearer $ARIA_PIN_KEY"
```

```json theme={null}
{
  "items": [
    {
      "billing_id": "bl_abc123",
      "job_id": "job_xyz789",
      "kind": "training",
      "gpu_seconds": 7200.0,
      "tokens": 12000000,
      "cost": 4.25,
      "created_at": "2025-06-01T12:00:00Z"
    }
  ]
}
```
