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)
| Model | Name | Input | Output | Context | Best For |
|---|---|---|---|---|---|
claude-opus-4-7 | Opus 4.7 | $5 | $25 | 200K | Latest flagship — advanced reasoning & coding |
claude-opus-4-6 | Opus 4.6 | $5 | $25 | 200K | Research, complex reasoning, highest quality |
claude-sonnet-4-6 | Sonnet 4.6 | $3 | $15 | 200K | Coding, writing, general assistance |
claude-haiku-4-5 | Haiku 4.5 | $1 | $5 | 200K | High-volume, low-cost tasks |
claude-sonnet-4-vision | Sonnet 4 Vision | $3 | $15 | 200K | Image analysis, screenshots, documents |
Plan Tiers
5x Max
20x Max
Unlimited
Quick Install (30 Seconds)
Run the interactive setup wizard — it validates your key, configures your IDE, and installs MCP tools automatically:
npx claudmax-cliThe 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)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://claudmax.pro/setup.ps1 | iexmacOS / Linux
curl -fsSL https://claudmax.pro/setup.sh | bashFirst API Call
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!"}]
}'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:
npx claudmax-clisettings.json and .claude.json.Manual Configuration
Step 1: Configure 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
}YOUR_API_KEY with your actual ClaudMax API key.Step 2: Configure MCP server
{
"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
source ~/.zshrc # or source ~/.bashrcStep 4: Verify installation
claude --version
# Should show Claude Code version without errorsVS 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:
npx claudmax-cliManual Configuration
Same files as Claude Code CLI. Create or edit:
~/.claude/settings.json~/.claude.json
Cursor
Configure Cursor IDE to use ClaudMax for AI assistance.
Automatic Setup (Recommended)
npx claudmax-cliManual MCP Configuration
Step 1: Configure MCP server
{
"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
https://api.claudmax.proYOUR_API_KEYclaude-sonnet-4-6Windsurf
Configure Windsurf IDE to use ClaudMax for AI assistance.
Automatic Setup (Recommended)
npx claudmax-cliManual MCP Configuration
Step 1: Configure MCP server
{
"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
https://api.claudmax.proYOUR_API_KEYCline
Configure Cline (VS Code extension) to use ClaudMax.
Automatic Setup (Recommended)
npx claudmax-cliManual Configuration
Edit VS Code Settings
Open VS Code, navigate to Extensions, then Cline Settings, and edit in settings.json:
{
"cline.apiProvider": "anthropic",
"cline.anthropicBaseUrl": "https://api.claudmax.pro",
"cline.apiKey": "YOUR_API_KEY"
}Roo Code
Configure Roo Code (VS Code extension) to use ClaudMax.
Automatic Setup (Recommended)
npx claudmax-cliManual Configuration
Edit VS Code Settings
{
"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
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
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!"}]
}'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 objectssystemstringOptional 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 callingStandard Request
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
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:
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!"}
]
}'/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 ID | Name | Input | Output | Context | Best For |
|---|---|---|---|---|---|
claude-opus-4-7 | Opus 4.7 | Text | Text | 200K | 🆕 Latest — advanced reasoning, coding & analysis |
claude-opus-4-6 | Opus 4.6 | Text | Text | 200K | Complex analysis, research, long-form writing |
claude-sonnet-4-6 | Sonnet 4.6 | Text | Text | 200K | General coding, reasoning, and assistance |
claude-sonnet-4-5 | Sonnet 4.5 | Text | Text | 200K | Fast coding assistant, great for IDEs |
claude-haiku-4-5 | Haiku 4.5 | Text | Text | 200K | High-volume tasks, quick completions |
claude-haiku-3-5 | Haiku 3.5 | Text | Text | 200K | Lightweight, ultra-fast responses |
claude-sonnet-4-vision | Sonnet 4 Vision | Text+Img | Text | 200K | Image analysis, screenshots, document understanding |
claude-image-4 | Image 4 | Text | Image | 200K | High-quality image generation from text prompts |
claude-audio-4 | Audio 4 | Text | Audio | 200K | Natural text-to-speech, voice synthesis |
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
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
{
"input_tokens": 14,
"output_tokens": 0,
"total_tokens": 14
}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
curl https://api.claudmax.pro/api/v1/key-status?apiKey=YOUR_API_KEYResponse Fields
Fields
keystringInternal key IDnamestringHuman-readable key nametierstringPlan tier: free, 5x, 20x, unlimitedisActivebooleanWhether the key is activerequestsUsedintegerRequests used in the current 5h windowrequestsLimitintegerMax requests per 5h windowtokensUsedintegerTokens used (displayed, with multiplier)tokensLimitintegerMax tokens per 5h window (displayed)windowResetAtstringISO 8601 timestamp when limits resettokensUsedActualintegerActual backend token usagetokensLeftintegerTokens remaining in the windowExample 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"
}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
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:
npx claudmax-cliThe setup wizard installs the MCP server automatically. Or add it manually to your IDE MCP configuration (see Claude Code CLI, Cursor, Windsurf sections above).
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
| Tier | Requests / 5h | Tokens / 5h | Use Case |
|---|---|---|---|
| Free | 100 | 500K | Learning, experimentation |
| 5x Max | 500 | 5M | Individual developers, light workloads |
| 20x Max | 2,000 | 20M | Power users, moderate production |
| Unlimited | Infinite | Infinite | Heavy production, unlimited scale |
Rate Limit Headers
Response Headers
x-ratelimit-limitTotal requests allowed in the windowx-ratelimit-remainingRequests remaining in the current windowx-ratelimit-resetISO 8601 timestamp when the window resets429 Too Many Requests. Check the x-ratelimit-reset header for the reset timestamp.Checking Your Usage
Monitor your current usage at the usage dashboard:
curl https://api.claudmax.pro/api/v1/key-status?apiKey=YOUR_API_KEYOr 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.