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 newerDownload from nodejs.org

An OpusMax API keyIssued by your admin or reseller

A supported clientClaude 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.

terminal
npx opusmax

What it does

  1. 01Asks for your API key
  2. 02Lets you choose which clients to configure
  3. 03Writes the correct settings for each one
  4. 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:

powershell (administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://opusmax.pro/setup.ps1 | iex

macOS and Linux

The shell equivalent:

terminal
curl -fsSL https://opusmax.pro/setup.sh | bash

Claude 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:

~/.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:

Base URL
https://api.opusmax.pro/v1

Cline

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:

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:

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:

header options
x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY

Dashboard endpoints are separate — they use a JWT from the /auth/login endpoint.

Messages

POST/v1/messagesAPI key

Create a message. Anthropic-compatible request and response shapes. Set stream: true for SSE.

Request
{
  "model": "claude-sonnet-5",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Hello, Claude!" }
  ],
  "stream": false
}
Response
{
  "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

GET/v1/modelsNone

List every available model. Public — no key required.

Response
{
  "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

POST/v1/messages/count_tokensAPI key

Count the tokens a message would use, without sending it.

Request
{
  "model": "claude-sonnet-5",
  "messages": [
    { "role": "user", "content": "How many tokens is this?" }
  ]
}

Key status

GET/api/key-status?key=None

Read a key's status, window usage and limits. This is what the Check a key page calls.

Response
{
  "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
  }
}

Image analysis

POST/tools/understand_imageAPI key

Analyse an image. Accepts an HTTP URL, a local path, or a base64 data URL. 18MB maximum.

Request
{
  "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.

Web search

Live web results for up-to-date information. Available automatically in every connected client.

Image analysis

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 5Newclaude-fable-51M
Claude Opus 5Newclaude-opus-51M
Claude Sonnet 5Newclaude-sonnet-51M
Claude Opus 4.8claude-opus-4-81M
Claude Opus 4.7claude-opus-4-71M
Claude Opus 4.6claude-opus-4-61M
Claude Sonnet 4.6claude-sonnet-4-61M
Claude Opus 4.5claude-opus-4-5200K
Claude Sonnet 4.5claude-sonnet-4-5-20250929200K
Claude Haiku 4.5claude-haiku-4-5-20251001200K
Claude Opus 4.1claude-opus-4-1-20250805200K
Claude Opus 4claude-opus-4-20250514200K
Claude Sonnet 4claude-sonnet-4-20250514200K

Context 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.