Skip to main content
Developer Documentation & API Gateway

OpusZen Docs

Anthropic-compatible API gateway providing Claude API access without waitlists. Drop-in replacement for any client — set your Base URL to https://api.opuszen.shop.

Overview

OpusZen is an ultra-low latency, Anthropic-compatible API gateway providing Claude API access without waitlists or regional limits. It works with Claude Code, Cursor, Windsurf, Cline, Roo Code, and official Anthropic SDKs — simply set your Base URL to https://api.opuszen.shop and use your API key.

Zero-Latency SSE Streaming

Pass-through streaming with first-chunk delivery in milliseconds.

Automatic Gateway Failover

Built-in upstream redundancy guarantees 99.9% request uptime.

Budget & Rate Limit Control

Granular rolling 5-hour windows and per-key usage protection.

Server-Side AI Tools

Built-in real-time web search and multimodal image understanding.

Prompt Caching Enabled

Anthropic prompt cache read tokens are free and pass through directly.

CORS & Browser Ready

Full OPTIONS preflight support for local tools, Electron, and web apps.

Quick Start

Prerequisites

  • Node.js 18+ (for NPX CLI installer or Node SDK)
  • OpusZen API key (starts with sk_live_... or reseller key)
  • Target tool: Claude Code, Cursor, Windsurf, VS Code, Cline, Python, or TypeScript

1. Interactive Setup (Recommended)

Run the official interactive CLI wizard — it configures your editor, tests connectivity, and sets models:

bashClick copy to clipboard
npx opuszen

2. One-Line Platform Installers

Fast automated setup for macOS, Linux, or Windows terminals:

Windows (PowerShell):
powershellClick copy to clipboard
irm https://api.opuszen.shop/setup.ps1 | iex
macOS / Linux (Bash):
bashClick copy to clipboard
curl -fsSL https://api.opuszen.shop/setup.sh | bash

3. Manual Environment Configuration

Export these environment variables in your terminal or ~/.bashrc / ~/.zshrc:

bashClick copy to clipboard
export ANTHROPIC_BASE_URL="https://api.opuszen.shop"
export ANTHROPIC_API_KEY="YOUR_API_KEY"

IDE Configuration

Claude CodeOfficial CLI & VS Code

Add or edit your settings file located at ~/.claude/settings.json:

jsonClick copy to clipboard
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://api.opuszen.shop",
    "ANTHROPIC_MODEL": "Opus 4.8",
    "ANTHROPIC_SMALL_FAST_MODEL": "Haiku 4.5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "Sonnet 4.6",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "Opus 4.8",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "Haiku 4.5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "hasCompletedOnboarding": true
}
CursorSettings → Models → OpenAI / Anthropic

In Cursor Settings (Ctrl+, or Cmd+,) under Models, configure:

Base URLhttps://api.opuszen.shop/v1
API KeyYOUR_API_KEY
Model Namesclaude-opus-4-8, claude-sonnet-4-6

Note: Cursor requires the trailing /v1 path.

WindsurfCodeium AI Editor

In Windsurf settings, configure the Anthropic / OpenAI compatible endpoint:

textClick copy to clipboard
https://api.opuszen.shop/v1
ClineRoo Code / Roo Cline

Select API Provider Anthropic and set your base URL and key:

ProviderAnthropic
Base URLhttps://api.opuszen.shop/v1
API KeyYOUR_API_KEY

Or add to VS Code settings.json:

jsonClick copy to clipboard
{
  "cline.apiProvider": "anthropic",
  "cline.anthropicBaseUrl": "https://api.opuszen.shop/v1",
  "cline.apiKey": "YOUR_API_KEY",
  "cline.anthropicModelId": "claude-opus-4-8"
}

SDKs & Code Examples

OpusZen is a drop-in replacement for the official Anthropic API. Switch tabs to see code examples in Python, TypeScript, raw cURL, SSE streaming, and the OpenAI SDK.

Install: pip install anthropic
pythonClick copy to clipboard
import anthropic

# Initialize the client pointing to OpusZen
client = anthropic.Anthropic(
    api_key="YOUR_API_KEY",
    base_url="https://api.opuszen.shop",
)

message = client.messages.create(
    model="claude-opus-4-8",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain quantum computing in one paragraph."}
    ],
)

print(message.content[0].text)

API Reference

API Gateway Base URLhttps://api.opuszen.shop
Anthropic Compatible (v1)

Endpoints support both /v1/ and /api/v1/

Authentication Headers

Authenticate by sending your API key in either header:

httpClick copy to clipboard
x-api-key: YOUR_API_KEY
httpClick copy to clipboard
Authorization: Bearer YOUR_API_KEY

Gateway Endpoints

POST/v1/messages
https://api.opuszen.shop/v1/messages

Create a message completion. Supports text generation, multi-turn chat, system prompts, streaming, and vision.

Request Payload:
jsonClick copy to clipboard
{
  "model": "claude-opus-4-8",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Hello, Claude!" }
  ],
  "stream": false
}
Response Payload:
jsonClick copy to clipboard
{
  "id": "msg_01XyZ890OpusZenLive",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-8",
  "content": [
    {
      "type": "text",
      "text": "Hello! How can I assist you with your projects today?"
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 12,
    "output_tokens": 14
  }
}
GET/v1/models
https://api.opuszen.shop/v1/models

List all currently available models, context window specifications, and release dates.

jsonClick copy to clipboard
{
  "data": [
    {
      "id": "claude-opus-4-8",
      "display_name": "Claude Opus 4.8",
      "context_window": 1000000,
      "type": "model"
    },
    {
      "id": "claude-sonnet-4-6",
      "display_name": "Claude Sonnet 4.6",
      "context_window": 1000000,
      "type": "model"
    }
  ]
}
POST/v1/messages/count_tokens
https://api.opuszen.shop/v1/messages/count_tokens

Estimate token count for a message or prompt without invoking model generation.

jsonClick copy to clipboard
{
  "model": "claude-opus-4-8",
  "messages": [
    { "role": "user", "content": "How many tokens is this sentence?" }
  ]
}
GET/api/key-status
https://api.opuszen.shop/api/key-status?key=YOUR_API_KEY

Inspect the status of your API key, plan details, remaining balance, and rate limit reset timer.

jsonClick copy to clipboard
{
  "valid": true,
  "status": "active",
  "plan": "Pro Developer",
  "name": "Production Opus Key",
  "balance": 250.00,
  "usage": {
    "tokens_used": 154200,
    "limit": 5000000,
    "reset_in_seconds": 1800
  }
}

Error Codes & Status

Standard HTTP response status codes returned by the gateway:

StatusError NameMeaning & Resolution
200 OKSuccessRequest completed successfully or SSE streaming initiated.
400 Bad Requestinvalid_requestMalformed JSON or unsupported parameters. Check messages structure.
401 Unauthorizedauthentication_errorInvalid or missing API key. Verify key in /key-status.
429 Rate Limitrate_limit_error5-hour rolling token or request quota reached. Check reset time on Check Usage page.
502 / 503 Gatewayapi_errorUpstream provider error. OpusZen automatically triggers failover to fallback providers.

Available Models

All models are Anthropic-compatible and work with standard Anthropic or OpenAI SDK calls. Click any Model ID to copy it to your clipboard.

ModelModel IDContextTypeRelease
Claude Fable 5.1
1,000,000 tokensChat / CompletionSep 2026
Claude Fable 5
1,000,000 tokensChat / CompletionJun 2026
Claude Opus 5
1,000,000 tokensChat / CompletionJul 2026
Claude Sonnet 5
1,000,000 tokensChat / CompletionJun 2026
Claude Opus 4.8
1,000,000 tokensChat / CompletionMay 2026
Claude Opus 4.7
1,000,000 tokensChat / CompletionApr 2026
Claude Sonnet 4.6
1,000,000 tokensChat / CompletionFeb 2026
Claude Opus 4.6
1,000,000 tokensChat / CompletionFeb 2026
Claude Opus 4.5
200,000 tokensChat / CompletionNov 2025
Claude Sonnet 4.5
200,000 tokensChat / CompletionSep 2025
Claude Haiku 4.5
200,000 tokensChat / CompletionOct 2025

Built-in Tools

Web search and image analysis are available directly on the server — no client-side MCP configuration or extra API keys required.

Web Search Tool

Real-time web search powered by OpusZen. Ideal for retrieval-augmented workflows.

httpClick copy to clipboard
POST https://api.opuszen.shop/tools/web_search
jsonClick copy to clipboard
{ "query": "latest Anthropic Claude 4.8 release notes" }

Multimodal Image Analysis

Inspect image files via HTTP URL or base64-encoded payload (supports JPEG, PNG, WebP up to 18MB).

httpClick copy to clipboard
POST https://api.opuszen.shop/tools/understand_image
jsonClick copy to clipboard
{ "image": "https://example.com/screenshot.png", "prompt": "Describe this UI screenshot" }

Troubleshooting & FAQ

Connection or CORS errors in Cursor / Windsurf

Make sure the Base URL ends in /v1 (e.g. https://api.opuszen.shop/v1). Restart your editor after saving the configuration.

401 Unauthorized / Invalid API Key

Verify your key at https://api.opuszen.shop/api/key-status?key=YOUR_KEY or on the Check Usage page. Ensure there are no leading or trailing whitespace characters.

Rate Limit Exceeded (HTTP 429)

Your 5-hour rolling token window has reached capacity. Check reset_in_seconds in /api/key-status or upgrade to a higher tier plan.

Model Not Found

Use an exact ID from the Available Models list above (e.g. claude-opus-4-8 or claude-sonnet-4-6).

Web search or multimodal tools not responding

Server-side tools are enabled by default for all authenticated keys. Verify your API key has an active plan with tools enabled.

Local development with Claude Code

Confirm ANTHROPIC_BASE_URL is set in ~/.claude/settings.json pointing to https://api.opuszen.shop. Run 'claude doctor' to verify connection.

Need assistance or custom enterprise limits?

Check real-time gateway status or reach out to support for reseller keys and custom quotas.