AI platform · IDE · agents · models
Console/API

Developers · API

Console-style API docs: base URL, auth, model ids, sample requests, and CLI device login.

Model API pricing

1/3 of DeepSeek V4

List prices in ¥ / 1M tokens (CNY display). Fast = V4 Flash÷3; Standard / Flagship = V4 Pro÷3. Checkout: Alipay / WeChat only.

TierPegInputOutput
FastV4 Flash ÷ 3$0.047$0.093
Standard / FlagshipV4 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)

auto
$0.047 / $0.093
clavue
$0.145 / $0.29
clavue-2.1
$0.145 / $0.29
clavue-2.1-fast
$0.047 / $0.093
clavue-2.1-pro
$0.145 / $0.29
clavue-2.1-rev
$0.145 / $0.29

Global: 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
  1. Create a session via /account or Clavue CLI device-code login.
  2. Set base URL to https://api.clavue.com (or https://www.clavue.com same-origin paths).
  3. Header Authorization: Bearer <token>
  4. 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.

Web

Cookie imux_membership_session

CLI / API

Authorization: Bearer …

Endpoints

GET/v1/models

List 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"
POST/v1/chat/completions

Chat 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"}]
  }'
GET/api/membership/plans

Membership plans

Public plan catalog (Free / Pro / Max) and included usage.

Auth: None

curl -s https://www.clavue.com/api/membership/plans
POST/api/membership/auth/device/start

Device 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"}'
POST/api/membership/auth/device/poll

Device 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"}'
GET/api/membership/auth/api-keys

List API keys

List personal API key prefixes (web session required).

Auth: Cookie session

POST/api/membership/auth/api-keys

Create 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 token
  • 429 RPM or device-code rate limit
  • Quota exhausted: upgrade Pro/Max or buy on-demand top-ups (/pricing · /account).