开发者 · API
对标 xAI / OpenAI 控制台文档结构:Base URL、鉴权、模型 ID、示例请求、CLI 设备登录。
模型 API 定价
DeepSeek V4 × 1/3标价单位 ¥ / 1M tokens(人民币展示)。Fast 对标 V4 Flash÷3;Standard / Flagship 对标 V4 Pro÷3。结算仅支付宝 / 微信。
| 档位 | 锚定 | 输入 | 输出 |
|---|---|---|---|
| Fast | V4 Flash ÷ 3 | ¥0.34 | ¥0.67 |
| Standard / Flagship | V4 Pro ÷ 3 | ¥1.04 | ¥2.09 |
对标 DeepSeek V4 ÷ 3。Flash 参考 $0.14/$0.28 · Pro $0.435/$0.87(USD)。Clavue:¥0.34 / ¥0.67 per 1M(Fast)· ¥1.04 / ¥2.09 per 1M(Pro 档)
autoclavueclavue-2.1clavue-2.1-fastclavue-2.1-proclavue-2.1-rev四档:Free · 付费(×1,首月免费) · ×5 · ×20。支持包月 / 包年(约等于送 2 个月)。人民币结算,支付宝 / 微信。额度按 ×1 基准线性放大,价格低于线性。
快速开始
OpenAI-compatible- 在 /account 登录,或使用 Clavue CLI 设备码登录。
- Base URL 使用
https://api.clavue.com(也可用https://www.clavue.com同源路径)。 - 请求头
Authorization: Bearer <token> - 模型字段使用产品 ID:auto · clavue · clavue-2.1 · clavue-2.1-fast · clavue-2.1-pro · clavue-2.1-rev
鉴权
Web 使用 HttpOnly Cookie;CLI / 脚本使用 Bearer sessionToken(设备码授权后下发)。用量计入会员 Free/Pro/Max 的 day·week·month 池。
Cookie imux_membership_session
Authorization: Bearer …
端点
/v1/models列出模型
返回当前账号可用的产品模型 ID 列表。
Auth: Bearer session or membership token
curl -s https://api.clavue.com/v1/models \
-H "Authorization: Bearer $CLAVUE_TOKEN"/v1/chat/completions对话补全
OpenAI 兼容对话。使用产品模型 ID(如 clavue-2.1)。用量计入会员额度池。
Auth: Bearer session or membership token
curl -s https://api.clavue.com/v1/chat/completions \
-H "Authorization: Bearer $CLAVUE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "clavue-2.1",
"messages": [{"role":"user","content":"Review this diff"}]
}'/api/membership/plans会员套餐
公开套餐目录(Free / Pro / Max)与 Included 额度。
Auth: None
curl -s https://www.clavue.com/api/membership/plans/api/membership/auth/device/start设备码登录 · 开始
CLI 设备码流程(类 RFC 8628)。打开浏览器授权页。
Auth: None (rate-limited)
curl -s https://www.clavue.com/api/membership/auth/device/start \
-H "Content-Type: application/json" \
-d '{"client":"clavue-cli"}'/api/membership/auth/device/poll设备码登录 · 轮询
轮询直到用户在浏览器授权;返回 sessionToken。
Auth: None (rate-limited)
curl -s https://www.clavue.com/api/membership/auth/device/poll \
-H "Content-Type: application/json" \
-d '{"device_code":"$DEVICE_CODE"}'/api/membership/auth/api-keys列出 API Keys
列出个人 API Key 前缀(需网页会话)。
Auth: Cookie session
/api/membership/auth/api-keys创建 API Key
生成 cv_live_… token(仅显示一次)。作为 /v1/* 的 Authorization Bearer。
Auth: Cookie session
curl -s https://www.clavue.com/api/membership/auth/api-keys \
-H "Content-Type: application/json" \
-H "Cookie: imux_membership_session=…" \
-d '{"name":"production"}'Clavue CLI 设备登录
终端调用 device/start → 打开 verification_uri_complete → 浏览器登录并授权 → CLI poll 拿到 sessionToken。
# 1) start
curl -s https://www.clavue.com/api/membership/auth/device/start \
-H "Content-Type: application/json" \
-d '{"client":"clavue-cli"}'
# 2) open verification_uri_complete in browser
# 3) poll
curl -s https://www.clavue.com/api/membership/auth/device/poll \
-H "Content-Type: application/json" \
-d '{"device_code":"$DEVICE_CODE"}'错误与额度
401— 未登录 / token 无效429— RPM 或设备码频率限制- 额度耗尽:升级 Pro/Max 或购买 On-demand 加油包(/pricing · /account)。