Skip to content

Manually Configure Claude Code (settings.json) ​

Prefer manual control, or CC-Switch isn't a good fit for your environment? Just follow the steps below to create the configuration file manually.

Configuration Steps ​

1. Open the Claude Code configuration folder ​

Open a terminal and run the command for your operating system:

bat
start "" "%USERPROFILE%\.claude"
bash
open "$HOME/.claude"

2. Create settings.json and add the configuration ​

Create a new file in the opened folder, name it settings.json, and use the following content (using the official CC channel as an example):

json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "paste your ApiKey here",
    "ANTHROPIC_BASE_URL": "https://api.nexthub.cc",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

Endpoint URL

The NextHub endpoint is https://api.nexthub.cc (do not add /v1 at the end). Claude Code automatically appends /v1/messages; if you add an extra /v1, the actual request becomes /v1/v1/messages and fails with a 404.

The three items above are the minimum configuration needed to get running. If you'd like a smoother experience, you can add the following as needed (all optional, and it works without them):

Environment VariableRecommended ValuePurpose
CLAUDE_CODE_DISABLE_TERMINAL_TITLE"1"Prevent terminal title changes
DISABLE_TELEMETRY"1"Disable telemetry reporting
DISABLE_ERROR_REPORTING"1"Disable automatic error reporting
DISABLE_BUG_COMMAND"1"Disable the built-in bug feedback command
DISABLE_AUTOUPDATER"1"Disable automatic update checks

3. Fill in the ApiKey and save the file ​

Replace the value of ANTHROPIC_AUTH_TOKEN with the ApiKey you generated in ApiKey Management, then save the file.

4. Run claude to verify ​

bash
claude

Configuration successful!

Seeing Claude reply normally? Congratulations! Claude Code is now connected to NextHub. 🎉

NextHub · Direct connections to OpenAI / Anthropic via official account pools — reliable, secure, and worry-free.