Skip to main content
Claude Code uses the Anthropic Messages protocol. To connect it to Moxus AI, do not use the OpenAI-compatible Base URL. Use 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 before claude is available.
Install:
Verify:
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.
1

Open the API keys page

Go to the Moxus AI console API keys page and find the key you want Claude Code to use.
2

Open Import configuration

Open the actions menu for that key, choose Import configuration, then switch to Claude Code.
3

Copy the script for your system

Use “macOS / Linux terminal” for macOS, Linux, or WSL. Use “Windows PowerShell” for Windows.
4

Run the script directly in your terminal

Open your terminal, paste the copied script directly into the same terminal window, and press Enter. The script works in both zsh and Bash, and the current terminal can use the new configuration as soon as it finishes.
The generated script does the following:
Use the “macOS / Linux terminal” script for macOS, Linux, or WSL, and the PowerShell script for Windows. Both can be pasted and run directly in their respective terminals; no temporary file or extra command is required.
The script stores your API key in a local environment file or user environment variable. Do not share terminal screenshots, shell profiles, or environment files that contain the key.

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.
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: It does not call 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:
If the request succeeds but Claude Code fails, confirm that the terminal launching Claude Code can read the variables:
Do not share the full output of the second command.

Troubleshooting

Usually no. Claude Code uses the Anthropic Messages protocol. Configure https://moxus.cloud, and the tool will request /v1/messages. https://moxus.cloud/v1 is usually for OpenAI-compatible clients.
This supports different Claude Code versions and Anthropic-compatible clients. Both variables use the same Moxus AI API key.
These commands remove the Moxus AI environment file, shell auto-load markers, and user environment variables created by Import configuration. They do not remove other Claude Code settings.macOS / Linux / WSL:
Windows PowerShell:
Close and reopen the terminal afterwards. If you manually added these values to ~/.claude/settings.json, remove only the matching env entries and keep the rest of the settings file.
Close and reopen the terminal, then confirm 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.
The 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.json still contains old values, remove or update only the conflicting ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_BASE_URL entries. Keep all unrelated personal settings and run claude normally afterward.
Claude Code does not provide a switch that makes Shell variables automatically outrank every settings file. --settings can override settings for one launch, but do not place an API key in that argument.
This is PowerShell execution policy blocking claude.ps1, not a broken Claude installation. The simplest fix is to use:
or:
If you still want to run claude directly in the current window, temporarily allow script execution first:
In PowerShell, project,local must be quoted as one string. Use:
If your current directory is your home directory and you only want to skip ~/.claude/settings.json for a temporary session, use:
Use the exact model name shown in Models and pricing. If the model does not support Anthropic Messages, use an OpenAI-compatible client or choose another model.

Next steps