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

# 令牌列表与详情

```bash curl theme={"theme":{"light":"min-light","dark":"min-dark"}}
curl "https://sys.poixe.com/api/tokens?page=1&page_size=20&status=enabled" \
  -H "Authorization: Bearer $POIXE_SYSTEM_TOKEN"
```

```json response theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "total": 5,
  "page": 1,
  "page_size": 20,
  "items": [
    {
      "id": 7,
      "name": "my-key",
      "key_mask": "sk-...wxyz",
      "status": "enabled",
      "created_at": 1731000000,
      "unlimited_quota": false,
      "usage": {
        "remain_cash": 8.000,
        "used_cash": 2.000,
        "used_quota": 0.002,
        "request_count": 312
      }
    }
  ],
  "timestamp": 1731337200
}
```

GET
`https://sys.poixe.com/api/tokens`

分页获取当前账户的令牌列表。

## 查询参数

**page** `integer` (default: 1)

页码（从 1 开始）

**page\_size** `integer` (default: 20)

每页条数，最大 100

**status** `string`

按状态过滤，可选值：`enabled` · `disabled` · `expired` · `exhausted` · `compromised`

## 响应字段

**total** `integer`

令牌总数

**page** `integer`

当前页码

**page\_size** `integer`

每页条数

**items** `array`

令牌列表，每项字段如下：

**令牌对象字段**

**id** `integer`

令牌 ID

**name** `string`

令牌名称

**key\_mask** `string`

令牌 Key 的脱敏展示，格式如 `sk-...wxyz`

**status** `string`

令牌状态：`enabled` · `disabled` · `expired` · `exhausted` · `compromised` · `unknown`

**created\_at** `integer`

创建时间戳（Unix 秒）

**unlimited\_quota** `boolean`

是否为无限额度令牌。为 `true` 时，`remain_cash` 不受消耗限制，不应作为上限展示

**usage** `object`

用量统计：

**usage 字段**

**remain\_cash** `number`

剩余余额，单位 USD。充值的钱减去已消耗金额后的余额

**used\_cash** `number`

已消耗金额，单位 USD。从账户余额中扣减的实际费用

**used\_quota** `number`

上游额度消耗，单位 USD。按官方计费价格计算的上游实际调用消耗量。Poixe 以折扣价转售官方额度，此字段反映真实的官方上游消耗

**request\_count** `integer`

累计请求次数

**timestamp** `integer`

响应时间戳（Unix 秒）

## 获取单个令牌详情

```bash curl theme={"theme":{"light":"min-light","dark":"min-dark"}}
curl https://sys.poixe.com/api/tokens/7 \
  -H "Authorization: Bearer $POIXE_SYSTEM_TOKEN"
```

```json response theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "id": 7,
  "name": "my-key",
  "key_mask": "sk-...wxyz",
  "status": "enabled",
  "created_at": 1731000000,
  "unlimited_quota": false,
  "usage": {
    "remain_cash": 8.000,
    "used_cash": 2.000,
    "used_quota": 0.002,
    "request_count": 312
  },
  "timestamp": 1731337200
}
```

GET
`https://sys.poixe.com/api/tokens/:tokenID`

获取单个令牌的详情。

## 路径参数

**tokenID** `integer` *required*

令牌 ID

## 响应

返回单个令牌对象，字段与列表中的令牌对象相同，另附 `timestamp`。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.