Skip to content

Claude Code setup

Install from the official Claude Code setup guide. Prepare a key with access to a Messages-compatible Claude model. WuDi API credit is billed separately from a Claude subscription.

Set variables in the terminal that launches Claude Code. Replace the example model if necessary with one available to your key and confirmed to support Messages:

Terminal window
export ANTHROPIC_BASE_URL='https://wudiapi.com'
export ANTHROPIC_AUTH_TOKEN="$WUDI_API_KEY"
export ANTHROPIC_MODEL='claude-haiku-5-5'
claude

Windows PowerShell:

Terminal window
$env:WUDI_API_KEY = 'YOUR_WUDI_API_KEY'
$env:ANTHROPIC_BASE_URL = 'https://wudiapi.com'
$env:ANTHROPIC_AUTH_TOKEN = $env:WUDI_API_KEY
$env:ANTHROPIC_MODEL = 'claude-haiku-5-5'
claude

Do not append /v1/messages to ANTHROPIC_BASE_URL. Check previously configured ANTHROPIC_API_KEY or other gateway variables for conflicts, and use one explicit authentication method.

The client may choose separate models for the main conversation, fast tasks and subagents. If only some tasks fail, inspect the actual ID in the error and use the client’s supported model settings to select an available model. Do not use a friendly label or an unconfigured alias as an API model ID.

Open a new session, send a short question, and confirm the model and group in usage logs. Follow normal client permission prompts; disabling permission checks does not fix API connectivity.

Symptom Next check
401 Does the launching process read the current key?
404 or HTML Root address and duplicated version paths
No available channel Model, group and Messages support
Text works but tools fail Tool, thinking and beta-parameter compatibility

Exit the client and remove only the variables or provider settings added for WuDi. Restart it afterward and retain unrelated configuration.

Reference: official gateway configuration.