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 --version

You 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 nodejs

Install Claude Code CLI

Install Claude Code globally using npm:

npm install -g @anthropic-ai/claude-code
⚠️

If you encounter permission errors, use sudo:

sudo npm install -g @anthropic-ai/claude-code

Or 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-code

First Run (Important)

This step is very important! Running Claude Code for the first time generates the configuration directory:

claude

After 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.

  1. Create or edit the config file:
# Use nano editor (or your preferred editor)
nano ~/.claude/settings.json
  1. Add the following content:
~/.claude/settings.json
{
  "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.

  1. Save the file (in nano: Ctrl+O to save, Ctrl+X to exit)

Verify Configuration

Run the following command to verify your setup:

# Start Claude Code
claude

If 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

ModelDescriptionBest For
anthropic/claude-sonnet-4Claude Sonnet 4, latest flagshipDaily coding, complex tasks
anthropic/claude-opus-4Claude Opus 4, highest performanceDeep reasoning, challenging tasks
anthropic/claude-3-7-sonnetClaude 3.7 SonnetThinking mode support
anthropic/claude-3-7-sonnet-thinkingExtended thinking modeComplex reasoning tasks
anthropic/claude-3.5-sonnetClaude 3.5 SonnetGeneral 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 --help

Troubleshooting

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 prefix

2. “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.json

If the file doesn’t exist or is incorrect, follow the “Config File” method above.

3. Connection Timeout

Cause: Network issues or firewall blocking.

Solution:

  1. Check your internet connection
  2. Verify the API URL is correct: https://api.fizzlyapi.com
  3. Check firewall settings:
    # Check iptables rules
    sudo iptables -L
  4. If using corporate network, you may need to configure a proxy

4. Authentication Failed (401)

Cause: Invalid or expired API key.

Solution:

  1. Verify your API key in the Fizzly Console
  2. Ensure the key has not been deleted or disabled
  3. Copy and paste the key again (watch for extra spaces)

5. Insufficient Balance (403)

Cause: Your account balance is depleted.

Solution:

  1. Check your balance in the Fizzly Console
  2. Top up your account in BillingTop Up
  3. 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-code

Method 2: Configure npm global directory (recommended)

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Need more help? Check the FAQ page.

Next Steps