Getting Started with ClaudMax

ClaudMax is a high-performance Claude API gateway powered by Anthropic Enterprise API. Access Claude Opus 4.7, Opus 4.6, Sonnet 4.6, and Haiku 4.5 through a single unified endpoint.

Drop-in Compatible

Works with Claude Code CLI, Python SDK, OpenAI SDK, and any HTTP client — just change the base URL.

Per-Key Budgets

5-hour rolling window token limits per API key. Automatic resets on every request.

MCP Tools Built-in

Web search and image analysis available as native Claude tools via the MCP server.

200K Context

All models support up to 200,000 token context windows. Process entire documents in one call.

Available Models

All Claude models are accessible with up to 200K token context windows.

Model Pricing (per 1M tokens)

ModelNameInputOutputContextBest For
claude-opus-4-7Opus 4.7$5$25200KLatest flagship — advanced reasoning & coding
claude-opus-4-6Opus 4.6$5$25200KResearch, complex reasoning, highest quality
claude-sonnet-4-6Sonnet 4.6$3$15200KCoding, writing, general assistance
claude-haiku-4-5Haiku 4.5$1$5200KHigh-volume, low-cost tasks
claude-sonnet-4-visionSonnet 4 Vision$3$15200KImage analysis, screenshots, documents

Plan Tiers

5x Max

Requests500 / 5h
Tokens5M / 5h
TierAffordable

20x Max

Requests2,000 / 5h
Tokens20M / 5h
TierBest Value

Unlimited

RequestsUnlimited
TokensUnlimited
TierEnterprise
All plans use a rolling 5-hour window that resets on every API request, ensuring you always have fresh capacity when you need it.

Quick Install (30 Seconds)

Run the interactive setup wizard — it validates your key, configures your IDE, and installs MCP tools automatically:

terminal
npx claudmax-cli

The wizard will:

  • Prompt for your API key (format: sk-ant-opm-...)
  • Validate your key against the ClaudMax API
  • Let you choose which IDEs to configure (Claude Code, Cursor, VS Code, Windsurf, Cline, Goose, OpenClaw...)
  • Install the MCP server (claudmax-mcp-agent) automatically
  • Verify your connection end-to-end

Manual Setup

Windows (PowerShell)

PowerShell (Administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://claudmax.pro/setup.ps1 | iex

macOS / Linux

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

First API Call

terminal
curl -X POST https://api.claudmax.pro/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Hello, Claude!"}]
  }'
That is all you need to get started. Scroll down or use the sidebar to explore each section in detail.

Claude Code CLI

Configure Claude Code CLI to use ClaudMax as your API gateway.

Automatic Setup (Recommended)

Run the setup wizard and select Claude Code CLI:

terminal
npx claudmax-cli
The wizard automatically configures both settings.json and .claude.json.

Manual Configuration

Step 1: Configure settings.json

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://api.claudmax.pro",
    "ANTHROPIC_MODEL": "claude-opus-4-7",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-7",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "hasCompletedOnboarding": true
}
Replace YOUR_API_KEY with your actual ClaudMax API key.

Step 2: Configure MCP server

~/.claude.json
{
  "mcpServers": {
    "ClaudMax": {
      "command": "npx",
      "args": ["-y", "claudmax-mcp-agent"],
      "env": {
        "CLAUDMAX_API_KEY": "YOUR_API_KEY",
        "CLAUDMAX_URL": "https://api.claudmax.pro"
      }
    }
  }
}

Step 3: Reload your shell

terminal
source ~/.zshrc  # or source ~/.bashrc

Step 4: Verify installation

terminal
claude --version
# Should show Claude Code version without errors
Claude Code is now configured to route all requests through ClaudMax.

VS Code

The VS Code Claude extension uses the same configuration as Claude Code CLI.

Automatic Setup (Recommended)

Run the setup wizard and select VS Code:

terminal
npx claudmax-cli

Manual Configuration

Same files as Claude Code CLI. Create or edit:

  • ~/.claude/settings.json
  • ~/.claude.json
Restart VS Code after configuring the files.

Cursor

Configure Cursor IDE to use ClaudMax for AI assistance.

Automatic Setup (Recommended)

terminal
npx claudmax-cli

Manual MCP Configuration

Step 1: Configure MCP server

~/.cursor/mcp.json
{
  "mcpServers": {
    "ClaudMax": {
      "command": "npx",
      "args": ["-y", "claudmax-mcp-agent"],
      "env": {
        "CLAUDMAX_API_KEY": "YOUR_API_KEY",
        "CLAUDMAX_URL": "https://api.claudmax.pro"
      }
    }
  }
}

Step 2: Add API model in Cursor

Open Cursor Settings, navigate to Models, and add a custom OpenAI-compatible model:

Settings — Models — Add Custom Model

Base URLhttps://api.claudmax.pro
API KeyYOUR_API_KEY
Model IDclaude-sonnet-4-6
Cursor will now route Claude requests through ClaudMax.

Windsurf

Configure Windsurf IDE to use ClaudMax for AI assistance.

Automatic Setup (Recommended)

terminal
npx claudmax-cli

Manual MCP Configuration

Step 1: Configure MCP server

~/.windsurf/mcp.json
{
  "mcpServers": {
    "ClaudMax": {
      "command": "npx",
      "args": ["-y", "claudmax-mcp-agent"],
      "env": {
        "CLAUDMAX_API_KEY": "YOUR_API_KEY",
        "CLAUDMAX_URL": "https://api.claudmax.pro"
      }
    }
  }
}

Step 2: Set base URL in Windsurf

Open Windsurf Settings, navigate to AI Provider, and set the base URL:

Settings — AI Provider

Base URLhttps://api.claudmax.pro
API KeyYOUR_API_KEY

Cline

Configure Cline (VS Code extension) to use ClaudMax.

Automatic Setup (Recommended)

terminal
npx claudmax-cli

Manual Configuration

Edit VS Code Settings

Open VS Code, navigate to Extensions, then Cline Settings, and edit in settings.json:

settings.json
{
  "cline.apiProvider": "anthropic",
  "cline.anthropicBaseUrl": "https://api.claudmax.pro",
  "cline.apiKey": "YOUR_API_KEY"
}
Cline also supports the MCP server configuration. See the Windsurf section for MCP setup.

Roo Code

Configure Roo Code (VS Code extension) to use ClaudMax.

Automatic Setup (Recommended)

terminal
npx claudmax-cli

Manual Configuration

Edit VS Code Settings

settings.json
{
  "roo-cline.apiProvider": "anthropic",
  "roo-cline.anthropicBaseUrl": "https://api.claudmax.pro",
  "roo-cline.apiKey": "YOUR_API_KEY"
}

Authentication

All API requests require your ClaudMax API key passed via HTTP headers.

Passing Your API Key

Include your API key in the x-api-key header or Authorization: Bearer header.

x-api-key Header

terminal
curl -X POST https://api.claudmax.pro/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Authorization Header

terminal
curl -X POST https://api.claudmax.pro/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 512,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
Never expose your API key in client-side code. Use server-side proxies or environment variables.

Messages

POST https://api.claudmax.pro/v1/messages — Send a conversation and receive a structured response.

Request Body

Fields

modelstringClaude model ID (see Models)
messagesarrayArray of {role, content} message objects
systemstringOptional system prompt (shorthand)
max_tokensintegerMaximum tokens in the response (min 1, max 8192)
temperaturenumberSampling temperature (0.0–2.0, default: 1.0)
streambooleanEnable server-sent events streaming (default: false)
toolsarrayMCP tools array for function calling

Standard Request

terminal
curl -X POST https://api.claudmax.pro/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      {"role": "user", "content": "What is 2 + 2?"}
    ]
  }'

Streaming Response

terminal
curl -X POST https://api.claudmax.pro/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "stream": true,
    "messages": [
      {"role": "user", "content": "Write a haiku about the sea."}
    ]
  }'

Chat Completions (OpenAI-compatible)

The /v1/chat/completions endpoint accepts the OpenAI chat completions format:

terminal
curl -X POST https://api.claudmax.pro/v1/chat/completions \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: "application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ]
  }'
Both /v1/messages (native Anthropic) and /v1/chat/completions (OpenAI-compatible) are supported.

Models

All Claude models are accessible through ClaudMax with up to 200K context windows.

Available Models

Model Reference

Model IDNameInputOutputContextBest For
claude-opus-4-7Opus 4.7TextText200K🆕 Latest — advanced reasoning, coding & analysis
claude-opus-4-6Opus 4.6TextText200KComplex analysis, research, long-form writing
claude-sonnet-4-6Sonnet 4.6TextText200KGeneral coding, reasoning, and assistance
claude-sonnet-4-5Sonnet 4.5TextText200KFast coding assistant, great for IDEs
claude-haiku-4-5Haiku 4.5TextText200KHigh-volume tasks, quick completions
claude-haiku-3-5Haiku 3.5TextText200KLightweight, ultra-fast responses
claude-sonnet-4-visionSonnet 4 VisionText+ImgText200KImage analysis, screenshots, document understanding
claude-image-4Image 4TextImage200KHigh-quality image generation from text prompts
claude-audio-4Audio 4TextAudio200KNatural text-to-speech, voice synthesis
Model IDs are case-insensitive aliases: opus, sonnet, haiku all map to their respective Claude models.

Token Counting

Estimate token usage for a given input before sending to the API.

Endpoint

POST https://api.claudmax.pro/v1/messages/count_tokens

Request

terminal
curl -X POST https://api.claudmax.pro/v1/messages/count_tokens \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "messages": [
      {"role": "user", "content": "Explain quantum entanglement."}
    ]
  }'

Response

JSON Response
{
  "input_tokens": 14,
  "output_tokens": 0,
  "total_tokens": 14
}
Use this endpoint to check how many tokens a request will consume before making the actual API call.

Key Status

Check your API key usage, limits, and validity in real time.

Endpoint

GET https://api.claudmax.pro/api/v1/key-status?apiKey=YOUR_API_KEY

Request

terminal
curl https://api.claudmax.pro/api/v1/key-status?apiKey=YOUR_API_KEY

Response Fields

Fields

keystringInternal key ID
namestringHuman-readable key name
tierstringPlan tier: free, 5x, 20x, unlimited
isActivebooleanWhether the key is active
requestsUsedintegerRequests used in the current 5h window
requestsLimitintegerMax requests per 5h window
tokensUsedintegerTokens used (displayed, with multiplier)
tokensLimitintegerMax tokens per 5h window (displayed)
windowResetAtstringISO 8601 timestamp when limits reset
tokensUsedActualintegerActual backend token usage
tokensLeftintegerTokens remaining in the window

Example Response

JSON Response
{
  "key": "cmnhqfpx90000lpx5urf3rb31",
  "name": "ClaudMax Key",
  "tier": "20x",
  "isActive": true,
  "requestsUsed": 142,
  "requestsLimit": 2000,
  "tokensUsed": 3600000,
  "tokensLimit": 60000000,
  "tokensUsedActual": 1200000,
  "tokensLeft": 56400000,
  "windowResetAt": "2026-04-03T22:12:12.286Z",
  "createdAt": "2026-04-03T17:12:12.286Z",
  "lastUsedAt": "2026-04-03T19:15:00.000Z"
}
Check usage visually at claudmax.pro/check-usage.

MCP Tools

ClaudMax supports the Model Context Protocol (MCP) for tool use with Claude models.

Available Tools

Web Search

Search the web for current information. Ideal for factual queries, news, and research.

Image Analysis

Analyze images using AI vision. Upload screenshots, diagrams, or photos for detailed descriptions.

Enabling MCP Tools

MCP tools are supported on all Claude text models. Web search and image analysis are available via dedicated endpoints.

Python Example

mcp_example.py
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.claudmax.pro",
    api_key="YOUR_API_KEY"
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    tools=[
        {
            "name": "get_weather",
            "description": "Get current weather for a city",
            "input_schema": {
                "type": "object",
                "properties": {
                    "city": {"type": "string", "description": "City name"}
                },
                "required": ["city"]
            }
        }
    ],
    messages=[
        {"role": "user", "content": "What is the weather in Tokyo?"}
    ]
)

for content in message.content:
    if content.type == "tool_use":
        print(f"Tool: {content.name}, Input: {content.input}")
    elif content.type == "text":
        print(f"Response: {content.text}")

MCP Server Setup

Install the ClaudMax MCP server globally:

terminal
npx claudmax-cli

The setup wizard installs the MCP server automatically. Or add it manually to your IDE MCP configuration (see Claude Code CLI, Cursor, Windsurf sections above).

The MCP server enables web search and image analysis as native Claude tools, accessible through the standard tools API.

Rate Limits

Rate limits are enforced per API key on a 5-hour rolling window. Limits reset automatically when the window expires.

Limits by Tier

Rate Limit Table

TierRequests / 5hTokens / 5hUse Case
Free100500KLearning, experimentation
5x Max5005MIndividual developers, light workloads
20x Max2,00020MPower users, moderate production
UnlimitedInfiniteInfiniteHeavy production, unlimited scale

Rate Limit Headers

Response Headers

x-ratelimit-limitTotal requests allowed in the window
x-ratelimit-remainingRequests remaining in the current window
x-ratelimit-resetISO 8601 timestamp when the window resets
When a rate limit is hit, the API returns 429 Too Many Requests. Check the x-ratelimit-reset header for the reset timestamp.

Checking Your Usage

Monitor your current usage at the usage dashboard:

terminal
curl https://api.claudmax.pro/api/v1/key-status?apiKey=YOUR_API_KEY

Or visit claudmax.pro/check-usage in your browser.

Troubleshooting

Common issues and how to resolve them.

Invalid API key error (401)

Ensure your API key starts with sk-ant-opm-. Obtain a valid key from your administrator.

Rate limit exceeded (429)

You have hit your per-5-hour window limit. Wait for the window to reset, or upgrade your tier.

Model not found

Ensure you are using a valid Claude model ID: claude-opus-4-7, claude-opus-4-6, claude-sonnet-4-6, claude-sonnet-4-5, claude-haiku-4-5, or claude-haiku-3-5.

Streaming not working

Set "stream": true in your request body. Ensure your client handles text/event-stream content type.

403 / 500 server errors

The API gateway may be experiencing temporary issues. Check the status page and try again shortly.

Cursor/Windsurf not connecting

Double-check the base URL is set to https://api.claudmax.pro (not /v1/chat or /v1/messages). Some providers require the base URL without the path suffix.

Token usage higher than expected

Token counts include both input (prompt) and output (response) tokens. Displayed tokens include the plan multiplier. Use the check-usage page for accurate tracking.

CLI not found after installation

Ensure ~/.local/bin is in your PATH. Run: export PATH="$HOME/.local/bin:$PATH" && claudmax status.

Contact Support

Still experiencing issues? Check the status page for live service updates.