Skip to documentation

// documentation

Setup guide

Everything you need to point a client at TheClaudeAPI: install, configure your IDE, and call the API. If you already have a key, it takes about a minute.

Drop-in compatible

No SDK changes

Per-key limits

5-hour, 7-day and monthly

Two formats

Anthropic + OpenAI

One base URL

aisoftdeal.com

Prerequisites

  • Node.js 18 or newer — for Claude Code (nodejs.org)
  • A TheClaudeAPI key (sk-…) — issued by your admin or reseller
  • A supported client — Claude Code, VS Code, Cursor, Windsurf, Cline, Roo Code or Continue
install Claude Code
npm install -g @anthropic-ai/claude-code

Base URLs

Anthropic-compatible (Claude Code, Cline, Roo)
https://aisoftdeal.com/api/public
OpenAI-compatible (Cursor, Windsurf, Continue, SDKs)
https://aisoftdeal.com/api/public/v1

Claude Desktop "third-party inference" (Gateway): paste exactly https://aisoftdeal.com/api/public — no trailing /v1 or /model.

Quick install

The installer asks for your key, checks it is active, writes Claude Code settings (old file is backed up), sets environment variables and tells you when it's done.

Windows — PowerShell

Open PowerShell and run:

powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
irm https://aisoftdeal.com/setup.ps1 | iex
without prompt
$env:THECLAUDEAPI_KEY = "YOUR_API_KEY"; irm https://aisoftdeal.com/setup.ps1 | iex

macOS and Linux

terminal
curl -fsSL https://aisoftdeal.com/setup.sh | bash
without prompt
curl -fsSL https://aisoftdeal.com/setup.sh | THECLAUDEAPI_KEY=YOUR_API_KEY bash

Claude Code CLI

Run the quick installer, or create / edit ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json):

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
    "ANTHROPIC_BASE_URL": "https://aisoftdeal.com/api/public",
    "ANTHROPIC_MODEL": "anthropic/claude-sonnet-5.5",
    "ANTHROPIC_SMALL_FAST_MODEL": "anthropic/claude-haiku-5.5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "hasCompletedOnboarding": true
}

Replace YOUR_API_KEY with your key. Or set it just for one session:

bash / zsh
export ANTHROPIC_BASE_URL=https://aisoftdeal.com/api/public
export ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY
claude
PowerShell
$env:ANTHROPIC_BASE_URL = "https://aisoftdeal.com/api/public"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
claude

Effort (Low · Medium · High · Extra · Max)

Choose Effort inside Claude Code (/model menu) — its menu shows exactly these five options, in this order: Low, Medium, High, Extra, Max. That menu is drawn by the Claude Code client itself, not by us. Claude Code sends your choice as output_config.effort; we pass it to the model as reasoning effort:

mapping
Low    -> low
Medium -> low   (clamped: model has no "medium")
High   -> high
Extra  -> max   (clamped: model has no "xhigh"; OpenRouter treats xhigh = max)
Max    -> max
none   -> low    (default)

Every response shows what happened in headers X-Effort-Requested, X-Effort-Applied and X-Effort-Status (honored / clamped / default / unsupported). The menu itself is drawn by Claude Code, not by us — if your Claude Code version hides it for a custom base URL, send the field yourself:

curl
curl https://aisoftdeal.com/api/public/v1/messages \
  -H "x-api-key: YOUR_API_KEY" -H "content-type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-5.5","max_tokens":1024,"output_config":{"effort":"medium"},"messages":[{"role":"user","content":"Hi"}]}'

VS Code

The Claude Code extension for VS Code reads the same ~/.claude/settings.json as the CLI. Save it, then restart VS Code.

Cursor

Settings → Models → add an OpenAI-compatible model:

settings
Base URL: https://aisoftdeal.com/api/public/v1
API key:  YOUR_API_KEY
Model:    anthropic/claude-sonnet-5.5

Windsurf

Settings → AI Provider → OpenAI-compatible:

settings
Base URL: https://aisoftdeal.com/api/public/v1
API key:  YOUR_API_KEY
Model:    anthropic/claude-sonnet-5.5

Cline

VS Code settings.json
{
  "cline.apiProvider": "anthropic",
  "cline.anthropicBaseUrl": "https://aisoftdeal.com/api/public",
  "cline.apiKey": "YOUR_API_KEY"
}

Or pick the "OpenAI Compatible" provider with base URL https://aisoftdeal.com/api/public/v1.

Roo Code

VS Code settings.json
{
  "roo-cline.apiProvider": "anthropic",
  "roo-cline.anthropicBaseUrl": "https://aisoftdeal.com/api/public",
  "roo-cline.apiKey": "YOUR_API_KEY"
}

Continue

~/.continue/config.yaml
models:
  - name: TheClaudeAPI Sonnet
    provider: openai
    model: anthropic/claude-sonnet-5.5
    apiBase: https://aisoftdeal.com/api/public/v1
    apiKey: YOUR_API_KEY

All endpoints

endpoints
POST https://aisoftdeal.com/api/public/v1/messages            API key   Anthropic / Claude format
POST https://aisoftdeal.com/api/public/v1/chat/completions    API key   OpenAI format
GET  https://aisoftdeal.com/api/public/v1/models              none      list of models
GET  https://aisoftdeal.com/api/public/v1/key-status          API key   plan, usage %, expiry
GET  https://aisoftdeal.com/setup.ps1                  none      Windows installer
GET  https://aisoftdeal.com/setup.sh                   none      macOS / Linux installer
WEB  https://aisoftdeal.com/check-key                  -         check a key in the browser

Authentication

Every API endpoint accepts your key in either header:

headers
x-api-key: YOUR_API_KEY
# or
Authorization: Bearer YOUR_API_KEY

Messages

POST/api/public/v1/messagesAPI key

Create a message. Anthropic-compatible request and response. Set stream: true for SSE.

request
{
  "model": "anthropic/claude-sonnet-5.5",
  "max_tokens": 1024,
  "messages": [
    { "role": "user", "content": "Hello, Claude!" }
  ],
  "stream": false
}
response
{
  "id": "msg_...",
  "type": "message",
  "role": "assistant",
  "model": "anthropic/claude-sonnet-5.5",
  "content": [
    { "type": "text", "text": "Hello! How can I help you today?" }
  ],
  "stop_reason": "end_turn",
  "usage": { "input_tokens": 12, "output_tokens": 15 }
}
curl
curl https://aisoftdeal.com/api/public/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-5.5","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'
PowerShell
$body = @{ model = "anthropic/claude-sonnet-5.5"; max_tokens = 1024; messages = @(@{ role = "user"; content = "Hello" }) } | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method Post -Uri "https://aisoftdeal.com/api/public/v1/messages" -Headers @{ "x-api-key" = "YOUR_API_KEY" } -ContentType "application/json" -Body $body
Python (anthropic SDK)
import anthropic
client = anthropic.Anthropic(base_url="https://aisoftdeal.com/api/public", api_key="YOUR_API_KEY")
r = client.messages.create(model="anthropic/claude-sonnet-5.5", max_tokens=1024, messages=[{"role":"user","content":"Hi"}])
print(r.content[0].text)

With "stream": true you get server-sent events — message_start, content_block_delta, message_stop.

Chat completions (OpenAI format)

POST/api/public/v1/chat/completionsAPI key

OpenAI-compatible chat completions. Supports stream: true.

curl
curl https://aisoftdeal.com/api/public/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"anthropic/claude-sonnet-5.5","messages":[{"role":"user","content":"Write a Python hello world"}]}'
PowerShell
$body = @{ model = "anthropic/claude-sonnet-5.5"; messages = @(@{ role = "user"; content = "Write a Python hello world" }) } | ConvertTo-Json -Depth 5
Invoke-RestMethod -Method Post -Uri "https://aisoftdeal.com/api/public/v1/chat/completions" -Headers @{ Authorization = "Bearer YOUR_API_KEY" } -ContentType "application/json" -Body $body
Python (openai SDK)
from openai import OpenAI
client = OpenAI(base_url="https://aisoftdeal.com/api/public/v1", api_key="YOUR_API_KEY")
r = client.chat.completions.create(model="anthropic/claude-sonnet-5.5", messages=[{"role":"user","content":"Hi"}])
print(r.choices[0].message.content)
Node.js (openai SDK)
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://aisoftdeal.com/api/public/v1", apiKey: "YOUR_API_KEY" });
const r = await client.chat.completions.create({ model: "anthropic/claude-sonnet-5.5", messages: [{ role: "user", content: "Hi" }] });
console.log(r.choices[0].message.content);

Models

GET/api/public/v1/modelsnone

List available models. Public — no key required.

curl
curl https://aisoftdeal.com/api/public/v1/models

Key status

GET/api/public/v1/key-statusAPI key

Your key's status, plan, usage percentage and expiry. The installers use this to verify your key.

curl
curl https://aisoftdeal.com/api/public/v1/key-status -H "x-api-key: YOUR_API_KEY"
PowerShell
Invoke-RestMethod -Uri "https://aisoftdeal.com/api/public/v1/key-status" -Headers @{ "x-api-key" = "YOUR_API_KEY" }
response
{
  "status": "active",
  "name": "My Key",
  "plan": "Pro",
  "window_used_percent": 12,
  "month_used_percent": 3,
  "window_resets_at": "2026-10-11T08:00:00.000Z",
  "expires_at": "2026-11-10T00:00:00.000Z"
}

Available models

anthropic/claude-fable-5.1Fable 5.1
anthropic/claude-opus-5.5Opus 5.5
anthropic/claude-sonnet-5.5Sonnet 5.5
anthropic/claude-haiku-5.5Haiku 5.5
anthropic/claude-fable-5Fable 5
anthropic/claude-opus-5Opus 5
anthropic/claude-opus-4.8Opus 4.8
anthropic/claude-opus-4.7Opus 4.7
anthropic/claude-opus-4.6Opus 4.6
anthropic/claude-opus-3Opus 3
anthropic/claude-sonnet-5Sonnet 5
anthropic/claude-sonnet-4.6Sonnet 4.6
anthropic/claude-haiku-4.5Haiku 4.5

Errors & limits

status codes
400  invalid request body
401  missing, invalid, expired or revoked API key
403  API key is paused
429  rate limit / 5-hour / 7-day / monthly limit reached
502  upstream model temporarily unavailable — retry
503  service temporarily unavailable — retry

On paid plans the 5-hour window starts with your first request and resets exactly 5 hours later. The 7-day limit is rolling, and the monthly limit resets on the 1st of each month (UTC). Check your usage and reset times anytime at https://aisoftdeal.com/check-key.

Demo keys expire 5 hours after creation, even if unused. Their usage allowance does not reset; once exhausted, the key stops accepting requests.

Troubleshooting

  • "running scripts is disabled" on Windows — run the Set-ExecutionPolicy line first.
  • Claude Code still asks to log in — open a new terminal and make sure ~/.claude/settings.json has your key.
  • 401 error — the key is wrong, expired or revoked. Check it on the Check a key page.
  • 429 error — you hit a limit; wait for the reset time shown on Check a key.

Full installer scripts

setup.ps1 — https://aisoftdeal.com/setup.ps1
# TheClaudeAPI setup for Windows PowerShell
# Usage: irm https://aisoftdeal.com/setup.ps1 | iex
function Install-TheClaudeAPI {
  $ErrorActionPreference = "Stop"
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  $Base = "https://aisoftdeal.com/api/public"
  $StatusUrl = "https://aisoftdeal.com/api/public/v1/key-status"

  Write-Host ""
  Write-Host "== TheClaudeAPI setup ==" -ForegroundColor Cyan

  $Key = $env:THECLAUDEAPI_KEY
  if (-not $Key) { $Key = Read-Host "Enter your API key (sk-...)" }
  $Key = ($Key -replace "\s", "")
  # Only letters, digits, "-" and "_" are allowed, so the key is safe to write into JSON and env vars.
  if ($Key -cnotmatch '^(sk|kx)-[A-Za-z0-9_-]{10,200}$') {
    Write-Host "Error: invalid key format. Paste the full key starting with sk-" -ForegroundColor Red; return
  }

  Write-Host "Checking your key..."
  try {
    $s = Invoke-RestMethod -Uri $StatusUrl -Headers @{ "x-api-key" = $Key } -UseBasicParsing
  } catch {
    Write-Host "Key check failed: $($_.Exception.Message)" -ForegroundColor Red; return
  }
  if ($s.status -ne "active") { Write-Host "Key is not active (status: $($s.status))" -ForegroundColor Red; return }
  Write-Host "Key OK. Plan: $($s.plan)" -ForegroundColor Green

  $Dir = Join-Path $HOME ".claude"
  $File = Join-Path $Dir "settings.json"
  New-Item -ItemType Directory -Force -Path $Dir | Out-Null
  if (Test-Path $File) { Copy-Item $File "$File.bak" -Force; Write-Host "Backed up old settings.json" }

  $Json = @"
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "$Key",
    "ANTHROPIC_BASE_URL": "$Base",
    "ANTHROPIC_MODEL": "anthropic/claude-sonnet-5.5",
    "ANTHROPIC_SMALL_FAST_MODEL": "anthropic/claude-haiku-5.5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "hasCompletedOnboarding": true
}
"@
  # UTF-8 without BOM (a BOM breaks JSON parsing in Claude Code)
  [IO.File]::WriteAllText($File, $Json, (New-Object System.Text.UTF8Encoding($false)))
  Write-Host "Wrote $File"

  foreach ($pair in @(
    @("ANTHROPIC_BASE_URL", $Base), @("ANTHROPIC_AUTH_TOKEN", $Key),
    @("OPENAI_BASE_URL", "$Base/v1"), @("OPENAI_API_KEY", $Key))) {
    [Environment]::SetEnvironmentVariable($pair[0], $pair[1], "User")
    Set-Item -Path ("Env:" + $pair[0]) -Value $pair[1]
  }
  Write-Host "Saved environment variables."
  Write-Host ""
  Write-Host "Done. Open a NEW PowerShell window (or restart VS Code) and run: claude" -ForegroundColor Green
}
Install-TheClaudeAPI
setup.sh — https://aisoftdeal.com/setup.sh
#!/usr/bin/env bash
# TheClaudeAPI setup for macOS / Linux
# Usage: curl -fsSL https://aisoftdeal.com/setup.sh | bash
set -eu
BASE="https://aisoftdeal.com/api/public"
STATUS_URL="https://aisoftdeal.com/api/public/v1/key-status"

echo ""
echo "== TheClaudeAPI setup =="

if ! command -v curl >/dev/null 2>&1; then echo "Error: curl is required."; exit 1; fi

KEY="$(printenv THECLAUDEAPI_KEY || true)"
if [ -z "$KEY" ]; then
  if [ -r /dev/tty ]; then
    printf "Enter your API key (sk-...): " > /dev/tty
    read -r KEY < /dev/tty
  else
    echo "Error: no terminal. Run: THECLAUDEAPI_KEY=sk-... bash setup.sh"; exit 1
  fi
fi
KEY="$(printf "%s" "$KEY" | tr -d '[:space:]')"
# Only letters, digits, "-" and "_" are allowed, so the key is safe to write into JSON and shell profiles.
if ! printf "%s" "$KEY" | grep -Eq '^(sk|kx)-[A-Za-z0-9_-]{10,200}$'; then
  echo "Error: invalid key format. Paste the full key starting with sk-"; exit 1
fi

echo "Checking your key..."
RESP="$(curl -sL -w "\n%{http_code}" -H "x-api-key: $KEY" "$STATUS_URL" || true)"
CODE="$(printf "%s" "$RESP" | tail -n 1)"
BODY="$(printf "%s" "$RESP" | sed '$d')"
if [ "$CODE" != "200" ]; then echo "Key check failed (HTTP $CODE): $BODY"; exit 1; fi
case "$BODY" in *'"status":"active"'*) ;; *) echo "Key is not active: $BODY"; exit 1;; esac
echo "Key OK."

DIR="$HOME/.claude"
FILE="$DIR/settings.json"
mkdir -p "$DIR"
if [ -f "$FILE" ]; then cp "$FILE" "$FILE.bak.$(date +%s)"; echo "Backed up old settings.json"; fi
cat > "$FILE" <<EOF
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "$KEY",
    "ANTHROPIC_BASE_URL": "$BASE",
    "ANTHROPIC_MODEL": "anthropic/claude-sonnet-5.5",
    "ANTHROPIC_SMALL_FAST_MODEL": "anthropic/claude-haiku-5.5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "hasCompletedOnboarding": true
}
EOF
echo "Wrote $FILE"

for RC in "$HOME/.bashrc" "$HOME/.zshrc"; do
  [ -f "$RC" ] || continue
  # remove an older block, then append a fresh one
  sed -i.bak '/# >>> theclaudeapi >>>/,/# <<< theclaudeapi <<</d' "$RC" 2>/dev/null || true
  cat >> "$RC" <<EOF
# >>> theclaudeapi >>>
export ANTHROPIC_BASE_URL="$BASE"
export ANTHROPIC_AUTH_TOKEN="$KEY"
export OPENAI_BASE_URL="$BASE/v1"
export OPENAI_API_KEY="$KEY"
# <<< theclaudeapi <<<
EOF
  echo "Updated $RC"
done

echo ""
echo "Done. Open a NEW terminal (or restart VS Code) and run: claude"