Deploy Claude Code
Claude Code is Anthropic's official command-line AI coding assistant. With NewtCode, you can use Claude Code without a direct Anthropic subscription.
Prerequisites
- Node.js v20+ installed (Windows | macOS | Linux)
- A NewtCode account with credits
- An API key from NewtCode
Installation
bash
npm install -g @anthropic-ai/claude-codeConfiguration
Set the following environment variables to point Claude Code to NewtCode:
macOS / Linux
Add to your ~/.bashrc or ~/.zshrc:
bash
export ANTHROPIC_BASE_URL=https://newtcode.cc
export ANTHROPIC_API_KEY=your_api_key_hereThen reload:
bash
source ~/.bashrc
# or
source ~/.zshrcWindows (PowerShell)
powershell
$env:ANTHROPIC_BASE_URL = "https://newtcode.cc"
$env:ANTHROPIC_API_KEY = "your_api_key_here"To set permanently, add to your system environment variables.
Windows (CMD)
cmd
set ANTHROPIC_BASE_URL=https://newtcode.cc
set ANTHROPIC_API_KEY=your_api_key_hereLaunch Claude Code
bash
claudeClaude Code should now connect through NewtCode and be ready to use.
Troubleshooting
Connection errors
- Verify your API key is correct
- Check that your account has sufficient credits
- Ensure the base URL does not include a trailing slash
Model not found
- NewtCode supports the latest Claude models
- Check the dashboard for available model names
WARNING
Make sure you have enough credits in your account. Claude Code can consume tokens quickly during coding sessions.