support

ZenthrexApi at a glance

A unified proxy to the Claude model family from Anthropic with a dollar-based wallet. One API key serves both the native Anthropic Messages API and the OpenAI-compatible Chat Completions mirror — pick whichever format your tool already speaks.

The most common 404 across all integrations below is an incorrect base URL. The rule:

  • Anthropic clients (Claude Code, anthropic-py, @anthropic-ai/sdk) want the bare host: https://api.zentherixapi.xyz. They append /v1/messages themselves.
  • OpenAI clients (Cursor, Cline, openai-py) want the base with /v1: https://api.zentherixapi.xyz/v1. They append /chat/completions.

Quick Start

Three minutes from key to first token.

1. Get your key

Open the dashboard and paste your key. The dashboard calls /v1/whoami and shows your dollar balance, request history and per-model spend.

2. Pick a format

Both formats work on the same key and share one wallet. Use whichever your tool already understands — conversion between them is free.

bash
curl https://api.zentherixapi.xyz/v1/messages \
  -H "x-api-key: $ZENTHREX_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-fable-5",
    "max_tokens": 1024,
    "messages": [{"role":"user","content":"hello"}]
  }'

3. Connect your tool

Jump to the integration you need: Claude Code, OpenCode, Cursor, Cline. Or use the SDK directly: Anthropic.

Authentication

One bearer token, two header names — depending on which format you call.

Format Header Value
/v1/messagesx-api-keysk-ant-api03-...
/v1/messagesAuthorization: Bearersk-ant-api03-...
/v1/messagesanthropic-version2023-06-01
/v1/chat/completionsAuthorizationBearer sk-ant-api03-...

Treat your keys like passwords. The dashboard stores the pasted key in cookies for convenience — on a shared device, clear it before leaving.

Models

All Claude models from Anthropic, available in both API formats.

ID Tier Context Notes
claude-opus-4-8flagship200KLatest-gen Opus — strongest reasoning, tool use, vision
claude-fable-5flagship200KNewest flagship — top reasoning and agentic coding
claude-opus-4-7flagship200KStrongest reasoning, tool use, vision
claude-opus-4-7-1mflagship · 1M1,000KSame model, extended input, same per-token rate
claude-haiku-4-5fast200K1/5 the price of Sonnet — great for classifiers
claude-opus-4-6flagship200KPrevious-gen Opus, same pricing
gpt-5.5-proflagship200KTop-tier — deepest reasoning and agentic coding
gpt-5.5flagship200KFlagship general-purpose model
gpt-5.4-proflagship200KHigh-end reasoning, tool use, vision
gpt-5.4balanced200KBalanced — great default for coding
gpt-5.4-minifast200KFast and cheap for high-volume tasks
gpt-5.4-nanofast200KSmallest — quickest replies, lowest cost

OpenAI-style aliases

The Chat Completions endpoint accepts OpenAI aliases so existing clients work without changes. gpt-4o / gpt-4 map to claude-opus-4-7; gpt-4o-mini / gpt-3.5-turbo map to claude-haiku-4-5. In new code, use the canonical Claude ID.

Streaming

Both formats support SSE. Each format mirrors its parent API exactly — no ZenthrexApi-specific frames.

Anthropic format

Set "stream": true in the body and read the response as Server-Sent Events. Frame types: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop plus periodic ping. Final usage arrives in message_delta.

OpenAI format

Set "stream": true and read SSE chunks like data: {"choices":[{"delta":{"content":"..."}}]}. Terminal frame: data: [DONE]. Optionally request "stream_options": {"include_usage": true} for final usage before [DONE].

Long SSE streams may go silent for tens of seconds between deltas during heavy reasoning — this is normal. If your client disconnects on silence, raise its timeout to at least 120s.

Claude Code

CLI Anthropic format Free plan OK

Anthropic's first-class CLI. Out of the box it knows ANTHROPIC_BASE_URL — point it to the bare host, the SDK appends /v1/messages itself.

Option A — env variables

bash
export ANTHROPIC_BASE_URL="https://api.zentherixapi.xyz"
export ANTHROPIC_API_KEY="sk-ant-api03-..."
export ANTHROPIC_MODEL="claude-fable-5"
claude

Option B — settings.json

Cross-platform, survives terminal restart. Path: ~/.claude/settings.json on macOS/Linux, %USERPROFILE%\.claude\settings.json on Windows.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.zentherixapi.xyz",
    "ANTHROPIC_AUTH_TOKEN": "sk-ant-api03-...",
    "ANTHROPIC_MODEL": "claude-fable-5"
  }
}

OpenCode

CLI Anthropic format Free plan OK

OpenCode is a terminal-based AI coding assistant. It uses the @ai-sdk/anthropic library internally, which constructs URLs as ${baseURL}/messages — so the baseURL must include /v1.

Option A — Environment variables

bash
export ANTHROPIC_BASE_URL="https://api.zentherixapi.xyz/v1"
export ANTHROPIC_API_KEY="sk-ant-api03-..."
opencode

Option B — opencode.json config

Create or edit opencode.json in your project root (or ~/.config/opencode/opencode.json for global):

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "apiKey": "sk-ant-api03-...",
        "baseURL": "https://api.zentherixapi.xyz/v1"
      }
    }
  },
  "model": "anthropic/claude-sonnet-4-6"
}

baseURL must include /v1! OpenCode uses @ai-sdk/anthropic which appends /messages to the baseURL, resulting in /v1/messages. Using the bare host (without /v1) will cause a 404 error. This is different from Claude Code, which uses the official Anthropic SDK and appends /v1/messages automatically.

API key: Use your ZenthrexApi key (starts with sk-ant-api03-). Do not use an Anthropic OAuth token or Claude Pro/Max session token — those will not work with this proxy. Get your key from the dashboard.

Available models

Use the anthropic/ prefix in OpenCode config:

Config IDDescription
anthropic/claude-fable-5Flagship — strongest reasoning
anthropic/claude-sonnet-4-6Balanced — best for coding
anthropic/claude-haiku-4-5Fast — quick answers

Cursor

Editor OpenAI format Requires Pro plan

The "Override OpenAI Base URL" setting in Cursor sends Chat-format traffic to your endpoint. Tab autocomplete and Cursor's own foundation models are not affected.

Custom endpoints are not supported on the free plan. Override is locked behind Cursor Pro ($20/mo). Tab autocomplete always runs on Cursor's proprietary stack — it cannot be redirected.

Setup

  1. Open SettingsModels.
  2. Scroll to OpenAI API section.
  3. Enable Override OpenAI Base URL, paste https://api.zentherixapi.xyz/v1/v1 is required here.
  4. Paste your key in OpenAI API Key, click Verify.
  5. Disable built-in Cursor models — otherwise they'll try to route through your endpoint and fail on unknown IDs.
  6. Click + Add custom model and add a Claude ID — e.g. claude-fable-5. Save.

Codex CLI / IDE / App

CLI OpenAI format Free plan OK

OpenAI's Codex supports custom model providers via ~/.codex/config.toml. That one file is shared by the Codex CLI, the IDE extension and the desktop app — configure it once and it works in all three. Codex speaks the Responses API, so wire_api must be "responses".

config.toml

Edit ~/.codex/config.toml (%USERPROFILE%\.codex\config.toml on Windows):

~/.codex/config.toml
model = "gpt-5.5"
model_provider = "zenthrex"

[model_providers.zenthrex]
name = "ZenthrexApi"
base_url = "https://api.zentherixapi.xyz/v1"
env_key = "ZENTHREX_KEY"
wire_api = "responses"

Set your key & run

bash
export ZENTHREX_KEY="sk-proj-..."
codex

base_url must include /v1, and wire_api must be "responses" — the older "chat" protocol is no longer supported by Codex. Use a key that allows GPT models (or a universal key).

Web Codex is not supported. The cloud version at chatgpt.com/codex runs only on OpenAI's servers with ChatGPT-account login and cannot be redirected to a custom endpoint. Use the CLI, the IDE extension or the desktop app instead.

Cline / Roo Code

Plugin OpenAI format Free plan OK

Both Cline and Roo Code provide an "OpenAI Compatible" provider; setup is identical. Use "OpenAI Compatible", not "OpenAI" — the latter lacks a Base URL field.

Setup

  1. Click ⚙ in the Cline (or Roo Code) panel.
  2. In API Provider, select OpenAI Compatible.
  3. Fill in:
    • Base URL: https://api.zentherixapi.xyz/v1
    • API Key: sk-ant-api03-...
    • Model ID: claude-fable-5
  4. Save and run a task.

Anthropic SDK

Library Anthropic format

Pass the bare host in base_url — the SDK appends /v1/messages automatically. Including /v1 will cause a 404.

Python

python
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.zentherixapi.xyz",
    api_key="sk-ant-api03-...",
)

msg = client.messages.create(
    model="claude-fable-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "hi"}],
)
print(msg.content[0].text)

TypeScript

typescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.zentherixapi.xyz",
  apiKey: process.env.ANTHROPIC_API_KEY!,
});

const msg = await client.messages.create({
  model: "claude-fable-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "hi" }],
});

curl

CLI Both formats

Handy for smoke-testing your key, debugging headers, or scripting without an SDK.

Anthropic format

curl
curl https://api.zentherixapi.xyz/v1/messages \
  -H "x-api-key: $ZENTHREX_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-fable-5",
    "max_tokens": 1024,
    "messages": [{"role":"user","content":"hi"}]
  }'

OpenAI format

curl
curl https://api.zentherixapi.xyz/v1/chat/completions \
  -H "Authorization: Bearer $ZENTHREX_KEY" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-fable-5",
    "messages": [{"role":"user","content":"hi"}]
  }'

POST /v1/messages

Anthropic-format Messages API. Identical request/response schemas to api.anthropic.com.

Headers

NameRequiredValue
x-api-keyyes
anthropic-versionyes2023-06-01
content-typeyesapplication/json

Body

FieldTypeNotes
modelstringrequired
messagesMessage[]required
max_tokensintrequired
systemstring · Block[]optional
toolsTool[]optional
temperature0..1optional, default 1
streambooloptional — emit SSE

POST /v1/chat/completions

OpenAI-compatible Chat Completions mirror. Same models; request/response form matches api.openai.com.

FieldTypeNotes
modelstringrequired
messagesMessage[]required
max_tokensintoptional
temperature0..2optional
streambooloptional — SSE with data: [DONE]
toolsTool[]optional
response_formatobjectoptional

POST /v1/responses

OpenAI Responses API mirror — the protocol used by Codex (CLI, IDE extension and desktop app). Same models and wallet; request/response form matches OpenAI's Responses API.

FieldTypeNotes
modelstringrequired
inputstring · Item[]required
instructionsstringoptional — system prompt
toolsTool[]optional — function tools
max_output_tokensintoptional
streambooloptional — emits response.* SSE events

GET /v1/whoami

Wallet introspection for the authenticated bearer. Requires a key; this is what the dashboard renders.

response
{
  "token": "sk-ant-api03-...",
  "balance_usd": 12.45,
  "total_spent_usd": 3.12,
  "total_input_tokens": 412903,
  "total_output_tokens": 29110,
  "per_model": {
    "claude-fable-5": { "input_tokens": 390210, "output_tokens": 22011, "spent_usd": 2.41 },
    "claude-haiku-4-5":  { "input_tokens": 22693,  "output_tokens": 7099,  "spent_usd": 0.07 }
  }
}

GET /v1/models

Public list of available models. No auth required.

response
{
  "data": [
    {"id": "claude-fable-5", "display_name": "Fable 5"},
    {"id": "claude-sonnet-4-6", "display_name": "Claude Sonnet 4.6"},
    {"id": "claude-haiku-4-5", "display_name": "Claude Haiku 4.5"}
  ]
}

Error Reference

Status Type Cause
401authentication_errorMissing or invalid bearer
402insufficient_creditsWallet balance hit zero
404not_foundTypically: wrong base URL
429rate_limit_exceededPer-key RPM limit reached
502upstream_errorUpstream returned 5xx
504upstream_timeoutSSE stream stalled past 600s

Rate Limits

Per-key, sliding window. Defaults are generous for interactive coding loops.

  • RPM — 600 requests/min/key on Sonnet and Haiku, 200 on Opus.
  • Concurrency — no hard ceiling; the edge holds ~10K simultaneous TLS sessions across all keys.
  • 1-min token quota — 1 million input tokens/min/key, smoothed with a leaky bucket — short bursts don't trigger.

On rejection: HTTP 429 with a retry-after header in seconds.