Claude Code

Claude Code Configuration

Connect Claude Code to Passion8 with CC Switch or settings.json. Set the gateway Base URL, API key, and enabled model, then verify the active route.

After installation, connect Claude Code with a Passion8 URL, API key, and enabled Claude model ID. Local API-key access does not require an Anthropic account or OAuth login. This page offers two methods: CC Switch for graphical configuration, or manual configuration using environment variables and settings. New users can start with CC Switch.

The Passion8 Base URL for Claude Code is https://passion8.cc, without /v1. Use ANTHROPIC_AUTH_TOKEN for your Passion8 API key.

#Before configuring

Confirm Claude Code runs locally:

claude --version

If it is not installed, see Install Claude Code.

Prepare these connection settings:

ItemValue
Base URLhttps://passion8.cc
Token variableANTHROPIC_AUTH_TOKEN, holding your complete Passion8 API key
Model IDThe exact Claude model ID enabled for your token in the Passion8 dashboard

After configuration, the test command should return a normal response. For authentication errors, check the token first. For connection errors, check whether /v1 was mistakenly added to the Base URL.

CC Switch manages Claude Code configuration graphically, without hand-editing JSON. The fields are the same on macOS and Windows.

1

Install and open CC Switch

Download the release for your system from CC Switch Releases. Open it and select Claude Code in the application list.

2

Add an application-specific configuration

Add a Claude Code provider with these settings:

FieldValue
NamePassion8 Claude Code
Endpoint / Base URLhttps://passion8.cc
API Keysk-YOUR_PASSION8_API_KEY
Environment variableANTHROPIC_AUTH_TOKEN
3

Save and test

Save and enable the configuration, then restart Claude Code. Test from Terminal on macOS or PowerShell on Windows:

claude -p "Confirm the connection in one sentence"

A normal response indicates the request worked. Check /status for the Passion8 endpoint and token source to confirm which configuration is active.

These settings configure the Claude Code CLI. IDE integrations can also use the CLI settings, but current VS Code extensions perform their own pre-launch authentication check; if the extension still asks to log in, configure claudeCode.environmentVariables in VS Code user settings as described in the official gateway guide. Claude Desktop is separate and requires its own CC Switch configuration below.

#Connect Claude Desktop as well (optional)

Claude Code and Claude Desktop are separate applications. Claude Code uses ~/.claude/settings.json; Claude Desktop has its own configuration. CC Switch exposes separate application entries, typically “Claude” and “Claude Desktop,” with a small monitor indicator on the Desktop icon. Configure the desktop application separately.

1

Select Claude Desktop

Choose Claude Desktop in the application switcher. If it is hidden, check Settings → General → Application visibility.

2

Add or import a provider

If Passion8 is already configured for Claude Code, use Import existing providers from Claude Code where available.

Alternatively, click + and enter:

FieldValue
NamePassion8 Claude Desktop
Endpoint / Base URLhttps://passion8.cc
API Keysk-YOUR_PASSION8_API_KEY

For this direct Passion8 configuration, leave Model mapping required off unless your actual route specifically requires mapping.

3

Enable and restart

Click Enable on the provider card, then fully quit and reopen Claude Desktop.

Claude Desktop does not reload this configuration in the same way as Claude Code. Fully quit and restart after switching providers.

#Manual configuration

Use this method if you do not want CC Switch or prefer direct control over environment variables and settings.json.

#1. Create the configuration directory

Use the user-level ~/.claude/settings.json to keep your key out of the project repository:

mkdir -p ~/.claude

#2. Edit settings.json

Edit ~/.claude/settings.json:

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://passion8.cc",
    "ANTHROPIC_AUTH_TOKEN": "sk-YOUR_PASSION8_API_KEY"
  }
}

#3. Test

Save, open a fresh terminal, and test from a project directory:

claude -p "Confirm the connection in one sentence"

#Alternatively, use environment variables

Adding these lines to ~/.zshrc makes them available in new terminal sessions:

echo 'export ANTHROPIC_BASE_URL="https://passion8.cc"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="sk-YOUR_PASSION8_API_KEY"' >> ~/.zshrc
source ~/.zshrc

Entering a real key in an echo command can leave it in shell history. To avoid that, open ~/.zshrc or ~/.claude/settings.json in an editor and paste it there.

#Advanced configuration template

The model IDs below were checked against the official catalog on 2026-10-11: Sonnet 5.5, Opus 5.5, Fable 5.1, and Haiku 5.5. Official availability does not mean your Passion8 key has access. Before copying, compare them with your console; remove unavailable tiers or substitute IDs you can access. The template uses only ANTHROPIC_MODEL as its default model source, avoiding a conflicting top-level model. Unverified [1M] suffixes are not included by default.

The minimal configuration above covers basic connectivity. If you understand permissions, caching, and model selection, this advanced template can be placed in ~/.claude/settings.json.

This is not a beginner default. bypassPermissions and skipDangerousModePermissionPrompt reduce confirmation prompts and increase the impact of mistakes. Use them only in a trusted local project, recoverable Git repository, container, or disposable VM.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "sk-YOUR_PASSION8_API_KEY",
    "ANTHROPIC_BASE_URL": "https://passion8.cc",
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
    "CLAUDE_CODE_EFFORT_LEVEL": "auto",
    "DISABLE_AUTOUPDATER": "1",
    "DISABLE_BUG_COMMAND": "1",
    "CLAUDE_CODE_ATTRIBUTION_HEADER": "0",
    "DISABLE_ERROR_REPORTING": "1",
    "DISABLE_TELEMETRY": "1",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL_NAME": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL_NAME": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "claude-fable-5-1",
    "ANTHROPIC_DEFAULT_FABLE_MODEL_NAME": "claude-fable-5-1",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME": "claude-haiku-5-5",
    "ANTHROPIC_MODEL": "claude-opus-5-5"
  },
  "attribution": {
    "commit": "",
    "pr": ""
  },
  "permissions": {
    "defaultMode": "bypassPermissions"
  },
  "skipDangerousModePermissionPrompt": true
}

Without ENABLE_PROMPT_CACHING_1H, ordinary API/provider requests use the default five-minute cache TTL unless another setting overrides it. Add the following only when the same large context is repeatedly reused after five minutes but within an hour:

Optional: request a one-hour prompt cache TTL
{
  "env": {
    "ENABLE_PROMPT_CACHING_1H": "1"
  }
}

#Important fields

FieldPurposeRecommendation
ANTHROPIC_BASE_URLSend Claude Code requests to Passion8Use https://passion8.cc, without /v1
ANTHROPIC_AUTH_TOKENPassion8 API keyRequired; do not leave blank or commit it
ENABLE_PROMPT_CACHING_1HRequest a one-hour cache TTLOmit by default; consider it for longer gaps between large-context requests
ENABLE_TOOL_SEARCHDefer MCP tool definitionsNot enabled by default on a custom gateway; set true only after confirming tool_reference passthrough
CLAUDE_CODE_EFFORT_LEVELDefault reasoning effortauto follows the model default; supported levels vary, and this variable overrides /effort and --effort
ANTHROPIC_DEFAULT_*_MODELPin the default model for each tierUse IDs available in Passion8
ANTHROPIC_MODEL / modelStartup modelThis template uses only the former; it overrides file-level model, while /model and --model can select another session model
attributionCommit and PR attributionReplaces deprecated includeCoAuthoredBy; do not duplicate the old setting
permissions.defaultMode = bypassPermissionsSkip most tool approval promptsUse only in trusted, recoverable or isolated environments
skipDangerousModePermissionPromptHide the dangerous-mode confirmationEnable only if you explicitly accept that behavior

#About one-hour caching

ENABLE_PROMPT_CACHING_1H=1 is not a default recommendation. It suits repeated large contexts where turns are often separated by more than five minutes but less than an hour. The five-minute default has lower write cost and is a better general starting point.

A one-hour cache generally does not transfer across accounts, models, or upstream context boundaries. Changes in upstream routing or cache scope can prevent reuse; do not treat a hit as guaranteed. Keep the five-minute default if repeated cache creation and cost variation are concerns.

See Prompt caching for details and Permissions and modes for permission implications.

#Check the active configuration

Run a test request:

claude -p "Describe the current project in one sentence"

A normal response confirms a successful request. Check /status and the Passion8 usage record to establish the route. If it fails, check:

ItemExpected value or action
Base URLhttps://passion8.cc
Token variableANTHROPIC_AUTH_TOKEN
Token valueYour Passion8 API key, without extra whitespace
TerminalOpen a new terminal after changing persistent environment variables
Project configurationDo not put personal keys in committed .claude/settings.json

For command, PATH, proxy, TLS, or login failures, see Installation and login troubleshooting. For authentication, missing models, or runtime API failures, see Troubleshooting and Error reference.

#Gateway Setup FAQ

#Do I need an Anthropic account or Claude subscription?

Local Claude Code can connect using this Passion8 API-key configuration, without Anthropic OAuth or a Claude subscription. Locally configured gateway access does not automatically enable cloud-hosted entry points.

#Why does the Claude Code URL omit /v1?

This guide uses the Anthropic-compatible entry point: set ANTHROPIC_BASE_URL to https://passion8.cc. Do not copy Codex’s https://passion8.cc/v1; clients have different protocol and URL requirements.

#How do I choose a model or switch vendors in one editor?

Use the exact model ID enabled for your token in the Passion8 dashboard, and specify it as ANTHROPIC_MODEL in the template above. For the official Claude panel, follow the VS Code extension guide. To switch Claude, GPT, Gemini, and Grok in one extension, follow Cline multi-model configuration.

#Field verification

Checked: 2026-10-11. Official model catalog, environment variables, and settings reference. Documentation verification does not establish successful live calls to every Passion8 model.

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.