Documentation
Setup guide
Everything you need to point a client at OpusMax: install, configure your IDE, and call the API. If you already have a key, the whole thing takes about a minute.
Drop-in compatible
No SDK changes
Per-key budgets
5-hour rolling window
Built-in tools
Search and image analysis
13 models
One base URL
Prerequisites
Node.js 18 or newer — Download from nodejs.org
An OpusMax API key — Issued by your admin or reseller
A supported client — Claude Code, VS Code, Cursor, Windsurf, Cline, or Roo Code
Quick install
The fastest path. The wizard asks for your key, configures the clients you pick, and verifies the connection before it exits.
npx opusmaxWhat it does
- 01Asks for your API key
- 02Lets you choose which clients to configure
- 03Writes the correct settings for each one
- 04Verifies the connection
Web search and image analysis need no setup at all — they run server-side.
Windows — PowerShell
If you would rather run the script directly:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://opusmax.pro/setup.ps1 | iexmacOS and Linux
The shell equivalent:
curl -fsSL https://opusmax.pro/setup.sh | bashClaude Code CLI
Point the Claude Code CLI at OpusMax and every model in the lineup becomes selectable from the same session.
Automatic — recommended
Run npx opusmax and select Claude Code CLI.
Manual configuration
Create or edit ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_BASE_URL": "https://api.opusmax.pro",
"ANTHROPIC_MODEL": "claude-fable-5[1m]",
"ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5-20251001",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-20251001",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"hasCompletedOnboarding": true
}Replace YOUR_API_KEY with your actual key. The [1m] suffix asks for the 1M-token context tier — drop it to use the model's standard window.
VS Code
The VS Code Claude extension reads the same configuration as the CLI.
Automatic — recommended
Run npx opusmax and select VS Code.
Manual configuration
Same file as Claude Code CLI above. Restart VS Code once you have saved it.
Cursor
Route Cursor’s AI features through OpusMax.
Automatic — recommended
Run npx opusmax and select Cursor.
API routing
Open Settings → Models → add an OpenAI-compatible model with:
- Base URL:
https://api.opusmax.pro/v1 - API key: your OpusMax key
- Model:
claude-sonnet-5
Windsurf
Route Windsurf’s AI provider through OpusMax.
Automatic — recommended
Run npx opusmax and select Windsurf.
API routing
Open Settings → AI Provider → set the base URL to:
https://api.opusmax.pro/v1Cline
Configure the Cline VS Code extension to use OpusMax.
Automatic — recommended
Run npx opusmax and select Cline.
Manual configuration
Add to your VS Code settings.json:
{
"cline.apiProvider": "anthropic",
"cline.anthropicBaseUrl": "https://api.opusmax.pro",
"cline.apiKey": "YOUR_API_KEY"
}Roo Code
Configure the Roo Code VS Code extension to use OpusMax.
Automatic — recommended
Run npx opusmax and select Roo Code.
Manual configuration
Add to your VS Code settings.json:
{
"roo-cline.apiProvider": "anthropic",
"roo-cline.anthropicBaseUrl": "https://api.opusmax.pro",
"roo-cline.apiKey": "YOUR_API_KEY"
}Authentication
Every proxy endpoint accepts your key through either header:
x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEYDashboard endpoints are separate — they use a JWT from the /auth/login endpoint.
Messages
/v1/messagesAPI keyCreate a message. Anthropic-compatible request and response shapes. Set stream: true for SSE.
{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, Claude!" }
],
"stream": false
}{
"id": "msg_...",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-5",
"content": [
{ "type": "text", "text": "Hello! How can I help you today?" }
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 15
}
}Streaming. With stream: true you get server-sent events — message_start, content_block_delta and message_stop — forwarded as they arrive.
Models
/v1/modelsNoneList every available model. Public — no key required.
{
"data": [
{
"id": "claude-fable-5",
"type": "model",
"display_name": "Claude Fable 5",
"created_at": "2026-06-09T00:00:00Z",
"context_window": 1000000
},
{
"id": "claude-opus-5",
"type": "model",
"display_name": "Claude Opus 5",
"created_at": "2026-07-24T00:00:00Z",
"context_window": 1000000
},
{
"id": "claude-sonnet-5",
"type": "model",
"display_name": "Claude Sonnet 5",
"created_at": "2026-06-10T00:00:00Z",
"context_window": 1000000
},
{
"id": "claude-opus-4-8",
"type": "model",
"display_name": "Claude Opus 4.8",
"created_at": "2026-05-28T00:00:00Z",
"context_window": 1000000
}
],
"has_more": false
}Truncated above. The live endpoint returns all 13 models; see .
Token counting
/v1/messages/count_tokensAPI keyCount the tokens a message would use, without sending it.
{
"model": "claude-sonnet-5",
"messages": [
{ "role": "user", "content": "How many tokens is this?" }
]
}Key status
/api/key-status?key=NoneRead a key's status, window usage and limits. This is what the Check a key page calls.
{
"status": "found",
"name": "My Key",
"isActive": true,
"windowTokenLimit": "5000000",
"windowTokensUsed": "1234567",
"windowActive": true,
"windowResetAt": "2026-03-19T15:00:00.000Z",
"planName": "Pro",
"expiresAt": "2026-06-19T00:00:00.000Z",
"totalRequests": 142,
"last24h": {
"requests": 28,
"tokensIn": 45000,
"tokensOut": 12000,
"totalTokens": 57000,
"avgLatencyMs": 1250
}
}Web search
/tools/web_searchAPI keySearch the web for current information. Three to five keywords works best.
{
"query": "latest Node.js release 2026"
}Image analysis
/tools/understand_imageAPI keyAnalyse an image. Accepts an HTTP URL, a local path, or a base64 data URL. 18MB maximum.
{
"prompt": "Describe what you see in this image",
"image_url": "https://example.com/photo.jpg"
}Built-in tools
Both tools run server-side. There is nothing to install on your machine and no MCP server to configure.
Live web results for up-to-date information. Available automatically in every connected client.
Understands JPEG, PNG and WebP. Works out of the box with no extra configuration.
Available models
Every model below answers on the same key and the same base URL. Pass the ID exactly as written.
claude-fable-51Mclaude-opus-51Mclaude-sonnet-51Mclaude-opus-4-81Mclaude-opus-4-71Mclaude-opus-4-61Mclaude-sonnet-4-61Mclaude-opus-4-5200Kclaude-sonnet-4-5-20250929200Kclaude-haiku-4-5-20251001200Kclaude-opus-4-1-20250805200Kclaude-opus-4-20250514200Kclaude-sonnet-4-20250514200KContext tier. Append [1m] to a model ID — e.g. claude-opus-4-8[1m] — to request the 1M-token window.
Aliases. The shorthands opus, sonnet and haiku also resolve, which is handy for tools that only accept a family name.
Troubleshooting
Connection errors
Check the key is active and has not expired — the Check a key page tells you in one look.
Web search or image tools not responding
They are server-side, so there is nothing local to fix. Confirm the key is valid and retry.
Model not found
Use an exact ID from the models list above. Display names are not accepted, only IDs and the three family aliases.
Rate limited
The 5-hour token window may be spent. Check the key to see how long is left on it.
Changes not applying
Restart the IDE after any configuration change — most read their settings only at launch.
Cursor or Windsurf not routing
Those two need the /v1 endpoint URL, not the bare host.
Still stuck
Keys are issued and managed by your admin or reseller — they can see usage, reset a window, or issue a replacement.