Antex Documentation
Antex is a drop-in Anthropic-compatible API. Your sk_live_… key works anywhere that accepts an Anthropic or OpenAI-compatible endpoint.
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_..."
}
}
}Codex CLI
OPENAI_BASE_URL=https://api.antex.dev/v1 \ OPENAI_API_KEY=sk_live_... \ codex "refactor this function"
Codex uses the OpenAI-compatible endpoint at /v1/chat/completions.
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"}]
}'curl https://api.antex.dev/v1/chat/completions \
-H "Authorization: Bearer sk_live_..." \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"messages": [{"role": "user", "content": "hello"}]
}'Available models
| Model ID | Tier | Notes |
|---|---|---|
| Haiku | Fast, cheap | |
| Sonnet | Balanced | |
| Sonnet | Improved | |
| Sonnet | Latest - recommended | |
| Opus | High reasoning (more credits) | |
| Opus | Improved Opus | |
| Opus | Best quality (most credits) |
Opus models consume more credits 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/chat/completionsOpenAI-format chat (Codex, OpenCode)/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