Linux Configuration
0.35x Price - Programming tool APIs at 0.35x of the original price!
This guide will help you configure Claude Code with Fizzly API on Linux.
Prerequisites
- Popular Linux distributions (Ubuntu, Debian, CentOS, Fedora, etc.)
- Node.js 18+ installed
- Fizzly API key (Get one here)
Install Claude Code
Check Node.js Version
Open terminal and verify Node.js is installed:
node --version
npm --versionYou should see output like v18.x.x or higher. If not, install Node.js.
Install Node.js (if not installed):
# Install Node.js 18 using NodeSource
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejsInstall Claude Code CLI
Install Claude Code globally using npm:
npm install -g @anthropic-ai/claude-codeIf you encounter permission errors, use sudo:
sudo npm install -g @anthropic-ai/claude-codeOr configure npm global directory (recommended):
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g @anthropic-ai/claude-codeFirst Run (Important)
This step is very important! Running Claude Code for the first time generates the configuration directory:
claudeAfter seeing the welcome screen, press Ctrl+C to exit. This creates the configuration folder at ~/.claude.
Configure API
Recommended method - Using a config file is more stable and reliable.
- Create or edit the config file:
# Use nano editor (or your preferred editor)
nano ~/.claude/settings.json- Add the following content:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.fizzlyapi.com",
"ANTHROPIC_AUTH_TOKEN": "your-fizzly-api-key"
}
}Replace your-fizzly-api-key with your actual API key from the Fizzly Console.
- Save the file (in nano:
Ctrl+Oto save,Ctrl+Xto exit)
Verify Configuration
Run the following command to verify your setup:
# Start Claude Code
claudeIf you see the Claude Code interactive prompt, congratulations! Your setup is complete.
Expected output:
╭─────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code! │
│ │
│ /help for available commands │
│ Type your message to get started │
╰─────────────────────────────────────────────────╯
>Supported Models
| Model | Description | Best For |
|---|---|---|
anthropic/claude-sonnet-4 | Claude Sonnet 4, latest flagship | Daily coding, complex tasks |
anthropic/claude-opus-4 | Claude Opus 4, highest performance | Deep reasoning, challenging tasks |
anthropic/claude-3-7-sonnet | Claude 3.7 Sonnet | Thinking mode support |
anthropic/claude-3-7-sonnet-thinking | Extended thinking mode | Complex reasoning tasks |
anthropic/claude-3.5-sonnet | Claude 3.5 Sonnet | General purpose |
Basic Usage
# Start interactive mode
claude
# Start in current project directory
cd your-project
claude
# Run a single command
claude "Explain this code" -f ./myfile.py
# Use a specific model
claude --model anthropic/claude-sonnet-4
# Show help
claude --helpTroubleshooting
1. “claude” Command Not Found
Cause: Claude Code CLI is not installed or not in PATH.
Solution:
# Reinstall Claude Code
npm install -g @anthropic-ai/claude-code
# Or use sudo
sudo npm install -g @anthropic-ai/claude-code
# Check installation location
which claude
# Check if npm global path is in PATH
npm config get prefix2. “ANTHROPIC_API_KEY not set” Error
Cause: Environment variables or config file not set correctly.
Solution:
First check the config file:
# View config file contents
cat ~/.claude/settings.jsonIf the file doesn’t exist or is incorrect, follow the “Config File” method above.
3. Connection Timeout
Cause: Network issues or firewall blocking.
Solution:
- Check your internet connection
- Verify the API URL is correct:
https://api.fizzlyapi.com - Check firewall settings:
# Check iptables rules sudo iptables -L - If using corporate network, you may need to configure a proxy
4. Authentication Failed (401)
Cause: Invalid or expired API key.
Solution:
- Verify your API key in the Fizzly Console
- Ensure the key has not been deleted or disabled
- Copy and paste the key again (watch for extra spaces)
5. Insufficient Balance (403)
Cause: Your account balance is depleted.
Solution:
- Check your balance in the Fizzly Console
- Top up your account in Billing → Top Up
- Try again after the balance is updated
6. Permission Denied
Cause: npm global installation permission issues.
Solution:
Method 1: Use sudo
sudo npm install -g @anthropic-ai/claude-codeMethod 2: Configure npm global directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcNeed more help? Check the FAQ page.
Next Steps
- Windows Configuration - Configure Claude Code on Windows
- macOS Configuration - Configure Claude Code on macOS
- VSCode Integration - Use Claude Code in VSCode