Developer documentation

Claude Code Gateway Setup on macOS, Linux and Windows

Use Claude Code with Superfastcode by setting the gateway base URL, a matching gateway token and an available Claude model. Begin with one terminal session, verify the active route, and only then persist the settings.

Claude Code gateway: quick reference

Superfastcode Claude Code connection settings
SettingValue
Base URLANTHROPIC_BASE_URL=https://api.superfastcode.com, without a /v1 suffix.
CredentialA Superfastcode Claude/Anthropic-platform key in ANTHROPIC_AUTH_TOKEN.
ConfigurationStart with terminal environment variables; persist in user ~/.claude/settings.json after verification.
BillingSuperfastcode gateway usage; separate from a personal Claude subscription. Check current model token rates.

Use the shell-specific commands below and check Claude Code compatibility and limits before connecting a project.

1. Prepare Claude Code and a matching key

Install Claude Code using Anthropic’s setup instructions, then run claude --version. In Console → API Keys, create or select an active Claude/Anthropic-platform key with available credits and open its Claude Code preset.

Use a Claude model currently available to that key. The sample below uses the current Console default. Model availability can change; check Claude Code pricing and models and your generated preset before saving.

2. Set your terminal environment

Choose your shell and replace the placeholder with the full Superfastcode key. These commands apply to the current terminal and processes started from it.

macOS / Linux — Bash or Zsh
export ANTHROPIC_BASE_URL="https://api.superfastcode.com"
export ANTHROPIC_AUTH_TOKEN="REPLACE_WITH_SUPERFASTCODE_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
export CLAUDE_CODE_ATTRIBUTION_HEADER=0
Windows — PowerShell
$env:ANTHROPIC_BASE_URL="https://api.superfastcode.com"
$env:ANTHROPIC_AUTH_TOKEN="REPLACE_WITH_SUPERFASTCODE_KEY"
$env:ANTHROPIC_MODEL="claude-sonnet-5-5"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
$env:CLAUDE_CODE_ATTRIBUTION_HEADER="0"
Windows — Command Prompt
set "ANTHROPIC_BASE_URL=https://api.superfastcode.com"
set "ANTHROPIC_AUTH_TOKEN=REPLACE_WITH_SUPERFASTCODE_KEY"
set "ANTHROPIC_MODEL=claude-sonnet-5-5"
set "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1"
set "CLAUDE_CODE_ATTRIBUTION_HEADER=0"

The base URL has no /v1 suffix for this client preset. ANTHROPIC_AUTH_TOKEN supplies a bearer credential. Do not place an unrelated Anthropic API key into this field, or leave conflicting provider credentials active. The two additional flags mirror the Console preset; they are not a guarantee that the client makes no other network requests.

3. Confirm the route and complete a request

In the same terminal
claude -p "Reply with exactly: superfastcode-ok"

Expected result: the completed reply contains superfastcode-ok, the command exits successfully, and Console usage history records the request. It consumes metered usage. Open claude interactively and run /status to check the base URL and active credential source. Do not copy a screenshot containing your key into a support message.

If a personal account login appears instead, confirm that the process inherited the variables and check existing user or managed settings. A terminal export will not necessarily reach an editor started from the dock or Start menu. Check the error guide if model requests fail after routing is confirmed.

Recorded verification: Claude Code 2.1.300 with claude-sonnet-5-5 completed 5 of 5 fixed-marker requests on October 16, 2026. See the dated results, test conditions and limitations and sanitized observation data. This verifies basic text completion in that window, not tool behavior, coding quality or a speed advantage.

4. Save settings after the test passes

For repeat use, merge the env block below into your user settings at ~/.claude/settings.json, or %USERPROFILE%\.claude\settings.json on Windows. Back up existing settings and preserve unrelated entries. Avoid duplicate JSON keys and trailing commas.

User settings.json — replace the placeholder key
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.superfastcode.com",
    "ANTHROPIC_AUTH_TOKEN": "REPLACE_WITH_SUPERFASTCODE_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
    "CLAUDE_CODE_ATTRIBUTION_HEADER": "0"
  }
}

Download the settings.json template. Keep credentials in private user settings or your approved secrets tooling. Do not commit them in a shared project’s .claude/settings.json. Managed settings may take precedence. Restart Claude Code and verify the active route again.

Restoring your earlier configuration

Remove the gateway fields from the settings file and shell profile where you added them, or restore your backup. In Bash/Zsh, the command below clears the five session variables. Open a fresh terminal after removing persistent settings. In PowerShell remove the corresponding Env: entries; in CMD set each variable to an empty value.

Bash / Zsh — clear session overrides
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC CLAUDE_CODE_ATTRIBUTION_HEADER

Reopen Claude Code and check its status before sending your next request. A saved personal login can remain on your machine while the gateway credential is active; removing gateway overrides lets the client return to its normal authentication flow.

Sources checked October 16, 2026: Anthropic’s gateway connection guide; Superfastcode Console’s current Claude Code preset.

Ready for a small test?

Review the matching client guide, create a gateway key, and verify one completed request before starting a larger task.

Open API Keys