Skip to main content

Install and configure

Install Claude Code using its official method and confirm claude --version, then set:
If your Claude Code version expects ANTHROPIC_API_KEY, assign the same key to that variable. The model must support Anthropic Messages and tool use. Persist variables in your shell profile, Windows user environment, or the env object in ~/.claude/settings.json. Never commit a real key.

Troubleshooting

Not logged in or login prompt

If Claude Code shows Not logged in · Please run /login or opens the Anthropic login options, it usually has not loaded a valid Bianxie AI configuration or its first-run onboarding is incomplete. Check that ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, and ANTHROPIC_MODEL are available in the current terminal and are not overridden by stale global variables or a CC Switch profile. After confirming the key, Base URL, and model ID, you can skip first-run onboarding as follows:
  1. Locate .claude.json in the user home directory:
    • macOS / Linux: ~/.claude.json
    • Windows: C:\Users\%USERNAME%\.claude.json
  2. Set hasCompletedOnboarding to true:
  1. Save the file and run claude again.
If .claude.json already contains other fields, add or update only hasCompletedOnboarding; do not replace the entire file.

Other errors

  • 401: Do not copy the literal API_KEY placeholder into the configuration.
  • 400 Incorrect model ID: Copy the exact model ID from the live model page.
  • CC Switch and manual settings conflict: remove stale global ANTHROPIC_* variables.