DocsClient setupConfigure Claude Code Manually

Configure Claude Code Manually

Connect Claude Code to SoleAPI permanently through its configuration file, without CC Switch.

Configure Claude Code Manually

This guide connects Claude Code to SoleAPI permanently through its settings.json configuration file. Before you begin, create an API Key in the console.

This configuration method applies only to Claude Code. It does not work with Claude Desktop, which requires a different configuration method.

Quick configuration

Edit ~/.claude/settings.json and replace the values as needed:

json2
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://soleapi.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-sole-your-key",
    "ANTHROPIC_DEFAULT_FABLE_MODEL": "optional",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "optional",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "optional",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "optional",
    "CLAUDE_CODE_SUBAGENT_MODEL": "optional"
  }
}

Step-by-step guide

  1. Open the Claude configuration directory
  • Windows: C:\Users\your-username\.claude
  • macOS: /Users/your-username/.claude
  • Linux: /home/your-username/.claude

On Windows, press Win + R to open the Run dialog, enter explorer %userprofile%\.claude, and press Enter to open the directory in File Explorer.

On Linux/macOS, terminal users can run cd ~/.claude. Graphical file manager users can navigate to the same directory manually.

  1. Confirm that the configuration file exists

The required file is named settings.json. Create it if it does not exist. If it already exists, consider making a backup before editing it so you can recover from mistakes.

  1. Edit the configuration file

Add the following content:

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://soleapi.com",
    "ANTHROPIC_AUTH_TOKEN": "your-API-Key (sk-sole-xxx)"
  }
}

ANTHROPIC_BASE_URL must be https://soleapi.com without a trailing /. Do not use https://soleapi.com/v1.

  1. Verify the configuration

Save the file, completely quit Claude Code, and restart it. Send a message; receiving a normal response confirms that the configuration works.


Troubleshooting

  • The request path contains /v1/v1/messages: /v1 was included in the Base URL. Change it to https://soleapi.com.
  • The change did not take effect: confirm that you saved .claude/settings.json, then completely quit and restart Claude Code.
  • The server returns 401: check that ANTHROPIC_AUTH_TOKEN is complete and that the key has not been disabled.