Claude Code / Use your delivered key, keep secrets local / Pick model IDs
Claude Code

Point Claude Code at CheapAI and test it fast.

The current public CheapAI examples use the same public host you already see elsewhere in the repo. Start with the values below, then prefer the exact delivery-package values if your order includes a tool-specific variant.

Prerequisites

  • Node.js installed locally
  • The Claude Code CLI installed and reachable from your terminal
  • Your CheapAI API key and the delivery details from the order you paid for

Set the environment variables

The current public CheapAI examples use the OpenAI-compatible public path for Claude Code as well. Start there unless your delivery package explicitly tells you to use a different value for your account or product.

macOS or Linux shell profile
export ANTHROPIC_API_KEY="YOUR_CHEAPAI_API_KEY"
export ANTHROPIC_BASE_URL="https://cheapai-netifly-app.up.railway.app/v1"
PowerShell
$env:ANTHROPIC_API_KEY = "YOUR_CHEAPAI_API_KEY"
$env:ANTHROPIC_BASE_URL = "https://cheapai-netifly-app.up.railway.app/v1"

Launch and verify

Start Claude Code
cd /path/to/your/project
claude

Ask a small question first, such as a quick repo summary or a one-file explanation. If Claude Code responds normally, the integration is working and you can move on to real tasks.

  • claude-sonnet-4-6-20260217 for daily coding, edits, and fast iteration
  • claude-opus-4-6-20260205 for larger reasoning-heavy or architectural tasks
  • claude-haiku-4-5-20251001 for lighter, faster utility work

Common issues

ProblemLikely causeFix
401 or unauthorized Wrong key, extra spaces, or stale shell variables Re-export the variables, open a fresh terminal, and check the key from the delivery package again.
Model not found Slug typo Copy the slug directly from Supported Models.
Connection errors Wrong base URL or local network instability Return to the exact value on this page or use the value from your delivery package if it differs.
!
Keep your real key out of repo files.

Never store real credentials in committed dotfiles, shared workspace settings, or screenshots used in support requests.

Browse docs
On this page