Skip to main content

创建令牌

API Key(令牌)是您调用 QClaw Router 接口的凭证。

创建步骤

  1. 登录 QClaw Router 控制台
  2. 点击左侧菜单 「令牌」
  3. 点击 「添加令牌」
  4. 填写令牌名称(方便区分用途)
  5. 可选设置:额度限制、过期时间、可用模型范围
  6. 点击 「提交」 生成令牌
令牌只在创建时显示一次,请立即复制保存。丢失后需重新创建。

使用令牌

生成的 API Key 格式为 sk-xxxxxxxxxxxxxxxx,在调用 API 时作为 Bearer Token 使用:
curl https://api.qclawrouter.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

关键配置

配置项说明
Base URLhttps://api.qclawrouter.com/v1
API Key您创建的令牌 sk-xxxx
建议为不同的应用/工具创建不同的令牌,方便管理和追踪用量。

下一步

创建好令牌后,可以在以下工具中配置使用:

Claude Code

在 Claude Code 中使用

VSCode

在 VSCode 中使用

Cursor

在 Cursor 中使用

命令行

在命令行中使用