> ## 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.

# 令牌查询（by key）

```bash curl theme={"theme":{"light":"min-light","dark":"min-dark"}}
curl https://sys.poixe.com/api/tokens/lookup \
  -X POST \
  -H "Authorization: Bearer $POIXE_SYSTEM_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "sk-xxxxxxxxxxxxxxxxxxxxxxxx"}'
```

```json response theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "id": 7,
  "timestamp": 1731337200
}
```

POST
`https://sys.poixe.com/api/tokens/lookup`

通过令牌 Key（`sk-` 开头的字符串）反查令牌 ID。适用于已知令牌值、需要获取其 ID 的场景。

## 请求体

**key** `string` *required*

令牌 Key，必须以 `sk-` 开头，且属于当前账户

## 响应字段

**id** `integer`

令牌 ID

**timestamp** `integer`

响应时间戳（Unix 秒）

## 错误

| 条件 | HTTP | type |
| - | - | - |
| `key` 缺失或为空 | 400 | `invalid_request_error` |
| `key` 不以 `sk-` 开头 | 400 | `invalid_request_error` |
| Key 不存在或不属于当前账户 | 404 | `resource_not_found_error` |


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