Developers · API
Console-style API docs: base URL, auth, model ids, sample requests, and CLI device login.
Model API pricing
1/3 of DeepSeek V4List prices in ¥ / 1M tokens (CNY display). Fast = V4 Flash÷3; Standard / Flagship = V4 Pro÷3. Checkout: Alipay / WeChat only.
| Tier | Peg | Input | Output |
|---|---|---|---|
| Fast | V4 Flash ÷ 3 | $0.047 | $0.093 |
| Standard / Flagship | V4 Pro ÷ 3 | $0.145 | $0.29 |
Pegged to DeepSeek V4 ÷ 3. Official Flash $0.14/$0.28 · Pro $0.435/$0.87. Clavue: $0.047 / $0.093 per 1M (Fast) · $0.145 / $0.29 per 1M (Pro tier)
autoclavueclavue-2.1clavue-2.1-fastclavue-2.1-proclavue-2.1-revGlobal: Paid $9 · ×5 $19 · ×20 $39 (annual ≈ 10× monthly). API at DeepSeek V4 ÷ 3. Checkout today: Alipay / WeChat (CNY SKUs). Card billing soon.
Quickstart
OpenAI-compatible- Create a session via /account or Clavue CLI device-code login.
- Set base URL to
https://api.clavue.com(orhttps://www.clavue.comsame-origin paths). - Header
Authorization: Bearer <token> - Use product model ids: auto · clavue · clavue-2.1 · clavue-2.1-fast · clavue-2.1-pro · clavue-2.1-rev
Authentication
Web uses HttpOnly cookies; CLI/scripts use Bearer sessionToken from device approval. Usage counts against Free/Pro/Max day·week·month pools.
Cookie imux_membership_session
Authorization: Bearer …
Endpoints
/v1/modelsList models
Returns product model ids available to the authenticated account.
Auth: Bearer session or membership token
curl -s https://api.clavue.com/v1/models \
-H "Authorization: Bearer $CLAVUE_TOKEN"/v1/chat/completionsChat completions
OpenAI-compatible chat. Use product model ids (e.g. clavue-2.1). Usage counts against membership pools.
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/plansMembership plans
Public plan catalog (Free / Pro / Max) and included usage.
Auth: None
curl -s https://www.clavue.com/api/membership/plans/api/membership/auth/device/startDevice code start
CLI device-code flow (RFC 8628-ish). Opens browser approve-page.
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/pollDevice code poll
Poll until the user approves in the browser; returns 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-keysList API keys
List personal API key prefixes (web session required).
Auth: Cookie session
/api/membership/auth/api-keysCreate API key
Mint a cv_live_… token (shown once). Use as Authorization Bearer for /v1/*.
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 login
CLI calls device/start → open verification_uri_complete → sign in & approve in browser → poll returns 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"}'Errors & quotas
401— unsigned / invalid token429— RPM or device-code rate limit- Quota exhausted: upgrade Pro/Max or buy on-demand top-ups (/pricing · /account).