1
Getting Started
Claude4Less provides affordable access to Claude API (Sonnet 4.6 and Opus 4.6) through a 3-tier performance system.
All tiers share the same balance pool — you choose between speed and cost when creating API keys.
💡 How It Works
You purchase credits (e.g., $100 for $30). When you create an API key in the dashboard, you select which tier it uses.
The tier determines how fast your credits are consumed: Mix Channel (1x), Office8 (1.98x), or Office3 (2.98x).
Performance Tiers
🌊 Mix Channel
Rate Multiplier: 1x (baseline)
Budget tier. May experience slower response times during peak weekday hours in mainland China timezone.
Best for non-urgent tasks and development.
Group ID: 3
⚡ Office8
Rate Multiplier: 1.98x
Standard tier. Balanced performance and reliability. Good for most production workloads.
Credits consumed 2x faster than Mix Channel.
Group ID: 4
🚀 Office3
Rate Multiplier: 2.98x
Premium tier. Always reliable with best performance. Recommended for critical production workloads.
Credits consumed 3x faster than Mix Channel.
Group ID: 5
⚠️ Important
The tier you select affects how quickly your balance is consumed, not the API pricing itself.
A request that costs $0.10 on Mix Channel will cost $0.20 on Office8 and $0.30 on Office3.
2
API Basics
Base URL
https://claude4less.xyz/v1
Authentication
Claude4Less uses the standard Anthropic API authentication format. Include your API key in the x-api-key header:
x-api-key: sk-your-api-key-here
anthropic-version: 2023-06-01
content-type: application/json
Getting Your API Key
🔑
Dashboard Access
1. Log in to your dashboard:
2. Navigate to the API Keys section
3. Click "Create New Key" and select your desired tier (Mix Channel, Office8, or Office3)
4. Copy your key — it starts with sk-
3
Using with Claude Code
Claude Code is Anthropic's official coding assistant. Configure it to use Claude4Less by setting environment variables.
Environment Variables (Linux/macOS)
# Add to your ~/.bashrc or ~/.zshrc
export ANTHROPIC_BASE_URL="https://claude4less.xyz/v1"
export ANTHROPIC_API_KEY="sk-your-api-key-here"
# Reload your shell
source ~/.bashrc # or source ~/.zshrc
Environment Variables (Windows PowerShell)
# Temporary (current session only)
$env:ANTHROPIC_BASE_URL = "https://claude4less.xyz/v1"
$env:ANTHROPIC_API_KEY = "sk-your-api-key-here"
# Permanent (all sessions)
[System.Environment]::SetEnvironmentVariable('ANTHROPIC_BASE_URL', 'https://claude4less.xyz/v1', 'User')
[System.Environment]::SetEnvironmentVariable('ANTHROPIC_API_KEY', 'sk-your-api-key-here', 'User')
Configuration File
Alternatively, create a configuration file for Claude Code:
{
"api_base_url": "https://claude4less.xyz/v1",
"api_key": "sk-your-api-key-here",
"default_model": "claude-sonnet-4-6"
}
✅ Verification
After configuration, run Claude Code normally. It will automatically use your Claude4Less endpoint.
Check your dashboard to confirm requests are being logged.
4
Using with OpenClaw
OpenClaw is an AI automation framework. Configure it to use Claude4Less through environment variables or configuration files.
Environment Variables
# Add to your shell profile
export ANTHROPIC_BASE_URL="https://claude4less.xyz/v1"
export ANTHROPIC_API_KEY="sk-your-api-key-here"
OpenClaw Configuration File
Edit your OpenClaw configuration (usually at ~/.openclaw/config.yml or ~/.config/openclaw/config.yml):
anthropic:
base_url: https://claude4less.xyz/v1
api_key: sk-your-api-key-here
default_model: claude-sonnet-4-6
max_tokens: 4096
Docker Environment
If running OpenClaw in Docker, pass environment variables:
docker run -d \
-e ANTHROPIC_BASE_URL="https://claude4less.xyz/v1" \
-e ANTHROPIC_API_KEY="sk-your-api-key-here" \
openclaw/openclaw:latest
5
Python SDK
Installation
Basic Usage
from anthropic import Anthropic
# Initialize client with Claude4Less
client = Anthropic(
api_key="sk-your-api-key-here",
base_url="https://claude4less.xyz/v1"
)
# Create a message
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[
{"role": "user", "content": "Hello, Claude!"}
]
)
print(message.content[0].text)
Using Environment Variables
import os
from anthropic import Anthropic
# Set environment variables first
os.environ["ANTHROPIC_BASE_URL"] = "https://claude4less.xyz/v1"
os.environ["ANTHROPIC_API_KEY"] = "sk-your-api-key-here"
# Client will automatically use environment variables
client = Anthropic()
message = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)
print(message.content[0].text)
Streaming Responses
from anthropic import Anthropic
client = Anthropic(
api_key="sk-your-api-key-here",
base_url="https://claude4less.xyz/v1"
)
with client.messages.stream(
model="claude-sonnet-4-6",
max_tokens=1024,
messages=[{"role": "user", "content": "Tell me a story"}]
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
6
JavaScript/TypeScript
Installation
npm install @anthropic-ai/sdk
Basic Usage
import Anthropic from '@anthropic-ai/sdk';
// Initialize client with Claude4Less
const client = new Anthropic({
apiKey: 'sk-your-api-key-here',
baseURL: 'https://claude4less.xyz/v1'
});
// Create a message
const message = await client.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [
{ role: 'user', content: 'Hello, Claude!' }
]
});
console.log(message.content[0].text);
Using Environment Variables
// Set in your .env file:
// ANTHROPIC_BASE_URL=https://claude4less.xyz/v1
// ANTHROPIC_API_KEY=sk-your-api-key-here
import Anthropic from '@anthropic-ai/sdk';
// Client will automatically use environment variables
const client = new Anthropic();
const message = await client.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(message.content[0].text);
Streaming Responses
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic({
apiKey: 'sk-your-api-key-here',
baseURL: 'https://claude4less.xyz/v1'
});
const stream = await client.messages.stream({
model: 'claude-sonnet-4-6',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Tell me a story' }]
});
for await (const chunk of stream) {
if (chunk.type === 'content_block_delta') {
process.stdout.write(chunk.delta.text);
}
}
7
Using curl
Test your API key with curl for quick debugging and testing.
Basic Request
curl -X POST "https://claude4less.xyz/v1/messages" \
-H "Content-Type: application/json" \
-H "x-api-key: sk-your-api-key-here" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude!"}
]
}'
With System Prompt
curl -X POST "https://claude4less.xyz/v1/messages" \
-H "Content-Type: application/json" \
-H "x-api-key: sk-your-api-key-here" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 2048,
"system": "You are a helpful coding assistant.",
"messages": [
{"role": "user", "content": "Write a Python function to calculate fibonacci"}
]
}'
Streaming Response
curl -X POST "https://claude4less.xyz/v1/messages" \
-H "Content-Type: application/json" \
-H "x-api-key: sk-your-api-key-here" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"stream": true,
"messages": [
{"role": "user", "content": "Tell me a short story"}
]
}'
8
Supported Models
Claude4Less supports the latest Claude models from Anthropic.
🧠
claude-sonnet-4-6
Balanced intelligence and speed. Best for most tasks including coding, analysis, writing, and general conversation.
Context window: 200K tokens
Best for: Development, content creation, data analysis, customer support
💎
claude-opus-4-6
Maximum intelligence. Best for complex reasoning, advanced analysis, and tasks requiring deep understanding.
Context window: 200K tokens
Best for: Research, complex problem-solving, advanced coding, strategic planning
💡 Model Selection Tips
Start with claude-sonnet-4-6 for most tasks. It offers excellent performance at a lower cost.
Use claude-opus-4-6 when you need maximum reasoning capability for complex problems.
9
Troubleshooting
Common Issues
❌
Authentication Failed (401)
Cause: Invalid or missing API key.
Solution:
- Verify your API key starts with
sk-
- Check for extra spaces or line breaks when copying
- Ensure the key hasn't expired (check dashboard)
- Confirm you're using the
x-api-key header, not Authorization
💰
Insufficient Balance
Cause: Your account balance is too low for the request.
Solution:
- Check your balance in the dashboard
- Purchase more credits via the payment bot
- Remember: higher tiers (Office8, Office3) consume credits faster
🔌
Connection Timeout
Cause: Network issues or incorrect base URL.
Solution:
- Verify base URL is exactly:
https://claude4less.xyz/v1
- Check your internet connection
- Try a simple curl test to verify connectivity
- If using Mix Channel during peak hours, try Office8 or Office3
⚠️
Rate Limit Exceeded
Cause: Too many requests in a short time.
Solution:
- Implement exponential backoff in your code
- Check your concurrency limit in the dashboard
- Spread requests over time
- Consider upgrading to a higher tier for better performance
🐛
Invalid Request Format
Cause: Malformed JSON or missing required fields.
Solution:
- Ensure
model, max_tokens, and messages are included
- Validate your JSON syntax
- Check that
anthropic-version header is set to 2023-06-01
- Verify message format:
[{"role": "user", "content": "..."}]
Testing Your Setup
Use this simple test to verify everything is working:
# Quick test
curl -X POST "https://claude4less.xyz/v1/messages" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_KEY_HERE" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 50,
"messages": [{"role": "user", "content": "Say OK"}]
}'
# Expected response:
# {"id":"msg_...","type":"message","role":"assistant","content":[{"type":"text","text":"OK"}],...}
Getting Help
💬
Support Channels
Telegram:
Twitter:
Dashboard: