https://moxus.cloud as the Anthropic Base URL and choose a model that supports Claude / Anthropic-compatible requests.
Values
Install Claude Code
Install first, then run the version check separately. Do not copy the install command and the verification command as one block. After installation, you may need to reopen the terminal beforeclaude is available.
- macOS / Linux / WSL
- Windows PowerShell
- Windows CMD
- npm
Recommended: import configuration from an API key
On the Moxus AI API keys page, each key row has an Import configuration action. Choose Claude Code to generate a terminal script for the selected key and current site address.Open the API keys page
Open Import configuration
Claude Code.Copy the script for your system
Run the script directly in your terminal
Manual setup: current terminal only
Use a temporary environment variable if you do not want to use Import configuration yet. The commands apply only to the current terminal window and skip the user-level~/.claude/settings.json, so an old setting cannot override the key you provide.
- macOS / Linux / WSL
- Windows PowerShell
ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN both use the same Moxus AI key to support different Claude Code versions and Anthropic-compatible clients.
Final request method
After configuration, Claude Code still sends Anthropic Messages requests. Moxus AI replaces the endpoint and key:https://moxus.cloud/v1/chat/completions, and it does not use the OpenAI-compatible Authorization: Bearer ... auth style.
Manual test
Use the command for your terminal to test the key, model, and Anthropic-compatible endpoint:- macOS / Linux / WSL
- Windows PowerShell
- macOS / Linux / WSL
- Windows PowerShell
Troubleshooting
Can I use the OpenAI Base URL for Claude Code?
Can I use the OpenAI Base URL for Claude Code?
https://moxus.cloud, and the tool will request /v1/messages. https://moxus.cloud/v1 is usually for OpenAI-compatible clients.Why does Import configuration set both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN?
Why does Import configuration set both ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN?
How do I remove the Moxus AI configuration for Claude Code?
How do I remove the Moxus AI configuration for Claude Code?
~/.claude/settings.json, remove only the matching env entries and keep the rest of the settings file.Claude still requests Anthropic directly
Claude still requests Anthropic directly
ANTHROPIC_BASE_URL is https://moxus.cloud. If you launch the client from a GUI, it may not read shell profiles. Start it from the terminal or use the client’s own settings surface.How can terminal variables take priority over settings.json?
How can terminal variables take priority over settings.json?
env block in ~/.claude/settings.json can override terminal variables with the same names. Choose the option that fits your use case:-
Prioritize this terminal only: Skip user settings at startup while continuing to load project and local settings:
macOS / Linux / WSL:
Windows PowerShell:This does not load
~/.claude/settings.json, so an old endpoint or empty value there cannot override the terminal. User-level preferences in that file, such as theme and model preferences, are not loaded either. -
Use Moxus AI persistently: Use Import configuration from the API keys page. If
~/.claude/settings.jsonstill contains old values, remove or update only the conflictingANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKEN, andANTHROPIC_BASE_URLentries. Keep all unrelated personal settings and runclaudenormally afterward.
--settings can override settings for one launch, but do not place an API key in that argument.Windows PowerShell says running claude.ps1 is disabled
Windows PowerShell says running claude.ps1 is disabled
claude.ps1, not a broken Claude installation. The simplest fix is to use:claude directly in the current window, temporarily allow script execution first:Why does project,local fail in Windows PowerShell?
Why does project,local fail in Windows PowerShell?
project,local must be quoted as one string. Use:~/.claude/settings.json for a temporary session, use:Which model name should I use?
Which model name should I use?
