OpenAI-compatible API
The HTTP API is for applications, agents, and CI. Point any OpenAI-compatible client at api.clavue.com and use a membership API key. This is separate from imux's local Unix socket API.
Quick start
Create a key under Account → API keys, then:
export OPENAI_BASE_URL=https://api.clavue.com/v1
export OPENAI_API_KEY=$CLAVUE_TOKEN
curl -s $OPENAI_BASE_URL/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"clavue-2.1","messages":[{"role":"user","content":"Hello"}]}'
curl -s $OPENAI_BASE_URL/models \
-H "Authorization: Bearer $OPENAI_API_KEY"Python (OpenAI SDK)
Same pattern as other OpenAI-compatible providers.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_CLAVUE_TOKEN",
base_url="https://api.clavue.com/v1",
)
r = client.chat.completions.create(
model="clavue-2.1",
messages=[{"role": "user", "content": "Fix this bug and explain it."}],
)
print(r.choices[0].message.content)Errors & refunds
Error bodies include requestId, code, stage, and messageZh. Headers: x-imux-request-id, x-imux-error-code, x-imux-error-stage. Upstream failures that refund do not permanently burn quota. See Errors & support for the full table.
Official MCP
Hosted tools such as web_search are available via Official MCP — not free-form chat. Model id clavue-2.1-search returns agent-normalized search JSON.