Skip to main content
Manual configuration is useful when you want to edit Claude Code’s configuration file directly. After configuration, Claude Code sends model requests through DUIAPI.

1. Open the configuration directory

Press Win + R, enter the following path, and press Enter:
%userprofile%\.claude
If settings.json does not exist, create it and open it.

2. Write settings.json

Replace <API_KEY> with your API key, such as sk-xxxxxx. Replace <MODEL> with the model you use, such as qwen3.7-max.
Write the following content to settings.json:
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "<API_KEY>",
    "ANTHROPIC_BASE_URL": "https://www.duiapi.com",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "<MODEL>",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "<MODEL>",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "<MODEL>",
    "ANTHROPIC_MODEL": "<MODEL>",
    "CLAUDE_CODE_SUBAGENT_MODEL": "<MODEL>"
  },
  "includeCoAuthoredBy": false
}

3. Test the configuration

Save settings.json, then run:
claude
Send a test message after the chat UI opens. If Claude Code replies, the configuration works.