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

# 鉴权

> 用 API 密钥进行请求鉴权

所有请求通过 HTTP 头携带密钥：

```
Authorization: Bearer <你的 API 密钥>
```

<CodeGroup>
  ```bash curl theme={null}
  curl https://tokendog.io/v1/chat/completions \
    -H "Authorization: Bearer $TOKENDOG_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"gpt-5","messages":[{"role":"user","content":"ping"}]}'
  ```
</CodeGroup>

## 密钥管理

在 [tokendog.io](https://tokendog.io) 控制台创建、查看与吊销密钥。每个密钥可绑定额度与
模型分组；额度耗尽或密钥被吊销后请求将返回 `401/403`（见[错误码](/zh/api-reference/guide/error-codes)）。

<Warning>密钥等同账号凭证。请勿提交到代码仓库或前端暴露；建议定期轮换，泄露后立即吊销。</Warning>
