Documentation
Setup Guide
Get up and running with OpusMax in under a minute. Choose your platform and IDE below.
Prerequisites
Quick Install
The fastest way to get started. Run the interactive wizard:
npx opusmaxWhat it does
Windows (PowerShell)
Alternative: Run the PowerShell setup script directly:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://opusmax.pro/setup.ps1 | iexmacOS / Linux
Alternative: Run the shell script:
curl -fsSL https://opusmax.pro/setup.sh | bashClaude Code CLI
Configure Claude Code CLI to use OpusMax as the API gateway.
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": "Opus 4.6",
"ANTHROPIC_SMALL_FAST_MODEL": "Haiku 4.5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "Sonnet 4.5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "Opus 4.6",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "Haiku 4.5",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
},
"hasCompletedOnboarding": true
}Create or edit ~/.claude.json:
{
"mcpServers": {
"OpusMax": {
"command": "npx",
"args": [
"-y",
"opusmax-mcp"
],
"env": {
"OPUSMAX_API_KEY": "YOUR_API_KEY",
"OPUSMAX_URL": "https://api.opusmax.pro"
}
}
}
}Replace YOUR_API_KEY with your actual API key.
VS Code
The VS Code Claude extension uses the same configuration as Claude Code CLI.
Automatic (Recommended)
Run npx opusmax and select VS Code.
Manual Configuration
Same files as Claude Code CLI above. Restart VS Code after configuration.
Cursor
Configure Cursor IDE to use OpusMax for AI assistance.
Automatic (Recommended)
Run npx opusmax and select Cursor.
Manual MCP Configuration
Create or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"OpusMax": {
"command": "npx",
"args": [
"-y",
"opusmax-mcp"
],
"env": {
"OPUSMAX_API_KEY": "YOUR_API_KEY",
"OPUSMAX_URL": "https://api.opusmax.pro"
}
}
}
}API Routing
Open Cursor Settings → Models → Add OpenAI-compatible model with:
- Base URL:
https://api.opusmax.pro/v1 - API Key: Your OpusMax API key
- Model:
claude-sonnet-4-6
Windsurf
Configure Windsurf IDE to use OpusMax for AI assistance.
Automatic (Recommended)
Run npx opusmax and select Windsurf.
Manual MCP Configuration
Create or edit ~/.windsurf/mcp.json:
{
"mcpServers": {
"OpusMax": {
"command": "npx",
"args": [
"-y",
"opusmax-mcp"
],
"env": {
"OPUSMAX_API_KEY": "YOUR_API_KEY",
"OPUSMAX_URL": "https://api.opusmax.pro"
}
}
}
}API Routing
Open Windsurf Settings → AI Provider → set base URL to:
https://api.opusmax.pro/v1Cline
Configure 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 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
All proxy endpoints accept API key authentication via either header:
x-api-key: YOUR_API_KEY
# OR
Authorization: Bearer YOUR_API_KEYDashboard endpoints use JWT tokens obtained from the /auth/login endpoint.
Messages
/api/v1/messagesAPI KeyCreate a message. Supports streaming via stream: true. Anthropic-compatible request/response format.
{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Hello, Claude!" }
],
"stream": false
}{
"id": "msg_...",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-6",
"content": [
{ "type": "text", "text": "Hello! How can I help you today?" }
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 15
}
}Streaming: When stream: true, returns Server-Sent Events (SSE) with message_start, content_block_delta, and message_stop events.
Models
/api/v1/modelsNoneList all available models.
{
"data": [
{
"id": "claude-opus-4-6",
"object": "model",
"display_name": "Claude Opus 4.6",
"created_at": "2025-01-01T00:00:00Z"
},
{
"id": "claude-sonnet-4-6",
"object": "model",
"display_name": "Claude Sonnet 4.6",
"created_at": "2025-01-01T00:00:00Z"
},
{
"id": "claude-haiku-4-5-20251001",
"object": "model",
"display_name": "Claude Haiku 4.5",
"created_at": "2025-01-01T00:00:00Z"
}
]
}Token Counting
/api/v1/messages/count_tokensAPI KeyCount tokens for a message without sending it.
{
"model": "claude-sonnet-4-6",
"messages": [
{ "role": "user", "content": "How many tokens is this?" }
]
}Key Status
/api/key-status?key=NoneCheck the status, usage, and limits of an API key.
{
"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 real-time information. Use 3-5 keywords for best results.
{
"query": "latest Node.js release 2026"
}Image Analysis
/tools/understand_imageAPI KeyAnalyze images with AI. Accepts HTTP URLs, local file paths, or base64 data URLs. Max 18MB.
{
"prompt": "Describe what you see in this image",
"image_url": "https://example.com/photo.jpg"
}MCP Tools
OpusMax MCP server provides two tools for Claude Code and other MCP-compatible clients:
web_searchReal-time web search for up-to-date information.
understand_imageAI image analysis supporting JPEG, PNG, WebP.
Installed automatically by npx opusmax or manually:
npm install -g opusmax-mcpAvailable Models
Opus 4.6
Premiumclaude-opus-4-6Most capable — complex reasoning, analysis, and creative tasks.
Sonnet 4.6
Popularclaude-sonnet-4-6Best balance of speed and intelligence for everyday tasks.
Haiku 4.5
Fastclaude-haiku-4-5-20251001Fastest responses for simple queries and high-throughput use cases.
Aliases: You can also use shorthand names like opus, sonnet, haiku, or gpt-4 — all map to the same backend model.
Troubleshooting
Connection errors
Check your API key is active and not expired.
MCP tools missing
Run /mcp in Claude Code. If not listed, re-run npx opusmax.
Model not found
Use exact model IDs from the models section.
Rate limited
Your 5-hour token window may be exhausted. Check /api/key-status.
Changes not applying
Restart your IDE after any config change.
Cursor/Windsurf not routing
Make sure you're using the /v1 endpoint URL.