Antex Documentation
Antex is a drop-in Anthropic-compatible API. Your sk_live_… key works anywhere that accepts the Anthropic API.
Overview
Antex proxies requests to Claude models and bills by credit. You never see raw credit numbers - your dashboard shows percentage bars for two rolling windows:
- 5-hour window - rolling 5h total
- Weekly window - rolling 7-day total
Base URL: https://api.antex.dev
Authentication
All API requests require your key in one of two headers:
x-api-key: sk_live_... # or Authorization: Bearer sk_live_...
Get your key from the API keys page. Keys are shown only once - save them immediately.
Claude Code
Set two environment variables and restart Claude Code:
# Linux / macOS export ANTHROPIC_BASE_URL=https://api.antex.dev export ANTHROPIC_API_KEY=sk_live_... claude
# Windows PowerShell $env:ANTHROPIC_BASE_URL = "https://api.antex.dev" $env:ANTHROPIC_API_KEY = "sk_live_..." claude
Or set permanently in Claude Code's settings file:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.antex.dev",
"ANTHROPIC_API_KEY": "sk_live_..."
}
}Windows path: %USERPROFILE%\.claude\settings.json
OpenCode
{
"providers": {
"antex": {
"type": "anthropic",
"baseURL": "https://api.antex.dev",
"apiKey": "sk_live_..."
}
}
}curl / HTTP
curl https://api.antex.dev/v1/messages \
-H "x-api-key: sk_live_..." \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "hello"}]
}'Available models
| Model ID | Tier | Notes |
|---|---|---|
| Haiku | Fast, cheap | |
| Sonnet | Latest - recommended | |
| Opus | Improved Opus | |
| Opus | Best quality (most capacity) |
Opus models use more capacity per request. Use Sonnet for most Claude Code tasks.
Sessions and credit windows
Credits are our internal billing unit. You see percentage bars, not raw numbers.
All windows are rolling - they don't reset at midnight. Your dashboard shows exactly when each window will free up capacity.
API endpoints
/v1/messagesAnthropic-format chat (Claude Code, curl)/v1/modelsList available models (requires key)/v1/usageYour current usage and remaining capacityError reference
authentication_errorip_limit_reachedpermission_errorkey_quarantinedrate_limit_error (5h)rate_limit_error (7d)payload_too_largemax_tokens_too_large