Skip to content

Configure Claude Code

Claude Code uses the Anthropic protocol, so you need to point the API address to this site's Anthropic-compatible endpoint.

Option 1: Environment Variables

bash
export ANTHROPIC_BASE_URL="https://kuaiapi.net"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"

Then start Claude Code:

bash
claude

Edit ~/.claude/settings.json:

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://kuaiapi.net",
"ANTHROPIC_AUTH_TOKEN": "sk-your-key"
  }
}

Option 3: Manage with CC-Switch

We recommend using CC-Switch to manage multiple provider configurations — switch in 5 seconds, and your configurations are synced to the cloud so they won't be lost.

Verify

Send a message in Claude Code. If you get a normal reply, it works.

Notes

  • The protocol must match: your key must be bound to a group on the Anthropic platform, otherwise requests will fail
  • Jailbreaking, distillation, and reverse engineering are strictly prohibited: the "Claude Max Full" and "GPT-Pro" groups are dedicated channel pools. Jailbreaking, distillation, reverse engineering, and similar behavior are strictly prohibited, and violators will be banned immediately with no refund
  • The Base URL generally does not need /v1 added (Claude Code appends /v1/messages automatically). Follow the recommended configuration.
  • If you run into not_found_error/invalid x-api-key, check against Troubleshooting

TIP

We strongly recommend using the Claude Code configuration generated by "Use Key". It fills in the endpoint for your current group automatically.

Ready to get started?

Sign up and get $0.30 in trial credit; usage is billed per token in real time, so you pay only for what you use.

Sign up freeSee model pricing

For lawful and compliant use only. Please follow our Terms of Service and your local laws and regulations.