Overview
OmniMux uses a single gateway Base URL:
https://api.omnimux.ai (OpenAI-compatible clients typically use https://api.omnimux.ai/v1). Console: omnimux.ai/dashboard. Model IDs in this guide are examples — confirm with the console or GET /v1/models.Prerequisites
Before configuring, make sure you have:Get OmniMux API Key
- Log in to OmniMux Console
- Find API Keys in the dashboard, click “Create New Key” button, then copy the generated Key
- API Key usually starts with
sk-
Step 1: Install Claude Code CLI
Tip: If you don’t know how to open a command line terminal, see FAQ - How to open command line terminal1. One-Command Installation
permission denied means you need to add sudo before the command.
1.1 Install Node.js and npm (Skip if installed)
First-time installation:- Visit Node.js official website to download and install (LTS version recommended)
- If you’re unfamiliar with the installation process, refer to Node.js Installation Guide
- Node.js v20 or higher is recommended
1.2 Install Claude Code CLI
Run in PowerShell or CMD:permission denied: Run PowerShell or CMD as administratornpm command not found: Node.js is not properly installed or not added to environment variables
2. Verify Installation
1.x.x).
Step 2: Configure OmniMux API
Claude Code CLI is configured viasettings.json.
CC Switch is a desktop GUI tool for managing Claude Code provider configurations through a graphical interface, without manually editing config files.
1. Install CC Switch
Download the installer for your platform from GitHub Releases.2. Configure OmniMux
- Open CC Switch
- Click the icon in the top-right corner to enter the configuration page
- Fill in the fields as shown in the image
- Click “Add”
settings.json, no manual operation needed.
CC Switch also supports system tray quick switching, MCP server management, cloud config sync, and more.
Note: If this is your first time using Claude Code CLI, we recommend starting with “Temporary” to test your configuration before using this method for permanent setup.
1. Open config directory
PressWin + R, paste the following, then press Enter:
.claude folder (press Win + R, type %userprofile%, press Enter to open user directory, then create a new folder named .claude).
In Finder, press Command + Shift + G, paste the following path, then press Enter:
mkdir ~/.claude to create the folder.
Open file manager and navigate to:
mkdir ~/.claude to create the folder.
2. Edit settings.json
In the opened folder, ifsettings.json doesn’t exist, right-click in empty space → New → Text Document → Rename to settings.json (remove .txt extension). Then double-click to open with an editor and add the following content:
- Copy completely without missing any symbols
- Replace
"your-omnimux-api-key"with actual API Key (keep quotes) - Don’t use Chinese input method for punctuation
ANTHROPIC_AUTH_TOKEN: Your OmniMux API KeyANTHROPIC_BASE_URL:https://api.omnimux.ai(OmniMux API endpoint)CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: Reduce non-essential network requests
- Right-click “This PC” → “Properties” → “Advanced system settings” → “Environment Variables”
- In “User variables” or “System variables”, create new:
- Variable name:
ANTHROPIC_BASE_URL - Variable value:
https://api.omnimux.ai
- Add
ANTHROPIC_AUTH_TOKENwith your API Key as the value - Click “OK” to save
your-omnimux-api-key with your actual API Key.
In PowerShell:
your-omnimux-api-key with your actual API Key.
Step 3: Start Using Claude Code CLI
1. Enter a safe working directory
your-working-directory with actual path
2. Interactive mode
3. Verify configuration
- See AI response text (several lines)
- No errors like
401,403,API Key invalid
401 Unauthorized: API Key not set or invalid → Check settings.json403 Forbidden: Insufficient API Key permissions → Verify API KeyNetwork error: Network issue → Check connection
FAQ
1. What is Claude Code CLI and what is it used for?
Claude Code CLI is the official command-line tool from Anthropic that allows users to interact with Claude models in the terminal. It’s primarily used for code assistance, text generation, Q&A conversations, and file analysis—especially suited for developers who need quick AI capabilities in a command-line environment.2. How do I verify installation and configuration on first use?
Run these commands in sequence:claude --version: Confirm Claude Code CLI is installedclaude "Who are you": Confirm API configuration is correct
3. What’s the difference between interactive mode and single command mode?
- Interactive mode: Run
claudeto enter continuous conversation for multi-turn interactions, ideal for complex tasks - Single command mode: Run
claude "question"to get a single response and exit, ideal for quick queries
4. Will Claude Code CLI automatically read or upload my local files and code?
No. Claude Code CLI only reads file content when you explicitly reference or authorize it, and will request confirmation before performing sensitive operations. It’s recommended to use it in a dedicated project folder.5. How do I use Claude Code CLI to analyze or process local file content?
In interactive mode, you can reference files by:- Typing the file path for Claude to read
- Dragging files into the terminal window
- Copy and pasting file content
6. Does Claude Code CLI support Chinese input and output?
Yes, fully supported. Claude Code CLI supports Chinese input and output—you can ask questions in Chinese and receive Chinese responses.7. No output after execution—what could be the cause?
Common causes include:- Network connection issues preventing API server access
- Invalid API Key or insufficient balance
- Incorrect
ANTHROPIC_BASE_URLconfiguration - Firewall or proxy blocking requests
8. Why don’t my config file or environment variable changes take effect?
- Restart your terminal or command line window
- Check that
settings.jsonhas valid JSON syntax - Verify the config file path:
- Windows:
C:\Users\{username}\.claude\settings.json - macOS / Linux:
~/.claude/settings.json
9. What causes 401/403 errors?
- 401 error:
ANTHROPIC_AUTH_TOKENnot set or invalid API Key - 403 error: Insufficient API Key permissions or expired key
- Verify
ANTHROPIC_BASE_URLis set tohttps://api.omnimux.ai
10. What scenarios is Claude Code CLI suited for? What is it not suited for?
Suited for:- Code writing, debugging, and refactoring
- Quick Q&A in command-line environments
- File content analysis and processing
- Automation script integration
- Complex interactions requiring a graphical interface
- Real-time collaborative editing
- Large-scale batch file processing
11. How do I switch models?
Type/model in interactive mode to switch models.
12. What Claude models does OmniMux support?
OmniMux supports the following Claude models:13. How do I upload images?
- Option 1: Reference the image path
- Option 2: Drag and drop an image into the terminal
- Option 3: Paste an image directly
14. How to open command line terminal?
-
Method 1: Press
Win + R, typecmdorpowershell, then press Enter - Method 2: Search for “Command Prompt” or “PowerShell” in the Start menu
- Method 3: Hold Shift and right-click in a folder, select “Open PowerShell window here”
-
Method 1: Press
Command + Spaceto open Spotlight, typeTerminal, then press Enter - Method 2: Go to “Applications” → “Utilities” → “Terminal”
-
Method 1: Press
Ctrl + Alt + Tshortcut - Method 2: Search for “Terminal” in the application menu
Notes
Run Claude Code CLI in a dedicated project folder. Avoid running it in sensitive directories (such as system folders or directories containing credentials). Claude Code CLI operates starting from the current working directory. If you previously logged in with an official account, clear theANTHROPIC_AUTH_TOKEN environment variable or override it in settings.json.