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:

http
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:

bash
# Linux / macOS
export ANTHROPIC_BASE_URL=https://api.antex.dev
export ANTHROPIC_API_KEY=sk_live_...
claude
powershell
# 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:

json - ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.antex.dev",
    "ANTHROPIC_API_KEY": "sk_live_..."
  }
}

Windows path: %USERPROFILE%\.claude\settings.json

OpenCode

json - opencode config
{
  "providers": {
    "antex": {
      "type": "anthropic",
      "baseURL": "https://api.antex.dev",
      "apiKey": "sk_live_..."
    }
  }
}

Codex CLI

bash
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

bash - Anthropic format
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"}]
  }'
bash - OpenAI format
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 IDTierNotes
HaikuFast, cheap
SonnetBalanced
SonnetImproved
SonnetLatest - recommended
OpusHigh reasoning (more credits)
OpusImproved Opus
OpusBest 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.

5-hour window
Rolling 5h total. Gives sustained usage throughout the day.
Weekly window
Rolling 7-day total. Safety net for heavy weeks.

All windows are rolling - they don't reset at midnight. Your dashboard shows exactly when each window will free up capacity.

API endpoints

POST/v1/messagesAnthropic-format chat (Claude Code, curl)
POST/v1/chat/completionsOpenAI-format chat (Codex, OpenCode)
GET/v1/modelsList available models (requires key)
GET/v1/usageYour current usage and remaining capacity

Error reference

401authentication_error
Invalid or revoked key. Check your key on the dashboard.
403ip_limit_reached
Request from an IP not bound to this key. Your plan allows a fixed number of IPs.
403permission_error
No active plan. Subscribe on the Plans page.
403key_quarantined
Key auto-locked due to suspicious activity. Contact support.
429rate_limit_error (5h)
5h window exhausted. Dashboard shows when it clears.
429rate_limit_error (7d)
Weekly limit exhausted.
400payload_too_large
Request body exceeds 2MB.
400max_tokens_too_large
max_tokens exceeds 64,000.

Privacy and security

No prompt logging
Requests processed in RAM only. Nothing written to disk.
No prompt hijacking
System prompts never stored or shared.
Tenant isolation
Zero data sharing between customers.
Encrypted keys
Keys stored as bcrypt hashes. Unrecoverable by design.
IP-bound keys
Keys locked to your IP(s). Stolen keys can't be used elsewhere.
No training data use
Your prompts are never used to train any model.