Anthropic Enterprise Gateway v1.0.0
Key Inspector Admin Console
Developer Documentation

Enterprise Anthropic Claude Gateway

This gateway provides 100% official Anthropic Messages API emulation (/v1/messages, /v1/models, /v1/messages/count_tokens) with real-time SSE streaming, automatic persona spoofing, and intelligent token optimization.

Enterprise Base URL: https://claude-gateway.sarimtools.com/v1

1. Claude Code CLI Integration

Configure Anthropic's official Claude Code CLI by setting the environment variables in your terminal or shell profile (~/.zshrc or ~/.bashrc):

# Configure Anthropic Enterprise Gateway Endpoint
export ANTHROPIC_BASE_URL="https://claude-gateway.sarimtools.com/v1"
export ANTHROPIC_API_KEY="sk-ant-api03-YOUR_GATEWAY_KEY"

# Launch Claude Code CLI
claude

# Or launch with a specific enterprise model
claude --model claude-fable-5-2

• Compatible with Claude Code's model discovery, token count status bar (/v1/messages/count_tokens), and multi-turn tool calling.

2. Claude Desktop App Setup

You can route your native Claude Desktop Application through this enterprise gateway using third-party inference configuration.

Add or edit your Claude Desktop configuration file:
• macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
• Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "api_endpoint": "https://claude-gateway.sarimtools.com/v1",
  "api_key": "sk-ant-api03-YOUR_GATEWAY_KEY",
  "default_model": "claude-fable-5-2"
}

3. Python Anthropic SDK

Use the official anthropic Python library with zero code refactoring by specifying base_url:

import anthropic

client = anthropic.Anthropic(
    base_url="https://claude-gateway.sarimtools.com/v1",
    api_key="sk-ant-api03-YOUR_GATEWAY_KEY"
)

# 1. Standard Synchronous Call
response = client.messages.create(
    model="claude-fable-5-2",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain quantum computing in two sentences."}
    ]
)
print(response.content[0].text)

# 2. Real-Time Streaming Call
with client.messages.stream(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Write a Python script to sort a dictionary."}]
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

4. Direct cURL & REST Integration

Execute HTTP requests directly via curl with streaming enabled:

curl -N "https://claude-gateway.sarimtools.com/v1/messages" \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-ant-api03-YOUR_GATEWAY_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-fable-5-2",
    "max_tokens": 1024,
    "stream": true,
    "messages": [
      {"role": "user", "content": "Hello Claude! What model are you?"}
    ]
  }'

5. TypeScript / Node.js SDK

Compatible with @anthropic-ai/sdk:

import Anthropic from '@anthropic-ai/sdk';

const anthropic = new Anthropic({
  baseURL: 'https://claude-gateway.sarimtools.com/v1',
  apiKey: 'sk-ant-api03-YOUR_GATEWAY_KEY',
});

async function main() {
  const message = await anthropic.messages.create({
    model: 'claude-fable-5-2',
    max_tokens: 1024,
    messages: [{ role: 'user', content: 'Say hello!' }],
  });

  console.log(message.content[0]);
}

main();

Enterprise Gateway Architecture

Dynamic Persona Spoofing
Strictly enforces Claude identity per requested model (e.g. Claude Fable 5.2). Upstream engine names and URLs are 100% masked.
Token Optimization Engine
Minifies verbose tool descriptions (capped at 220 chars) and intelligently truncates multi-turn tool results older than 4 turns.
Non-Blocking SSE Streaming
Utilizes X-Accel-Buffering: no and explicit buffer flushing for smooth, sub-millisecond real-time typing experiences.
Zero Dependency Portability
100% pure PHP 8.2+ and SQLite PDO. Compatible with Apache, cPanel, LiteSpeed, and any standard PHP hosting environment.