Claude Code
Use NeatAPI as the model backend for Claude Code by switching the Anthropic base URL. Works with every Claude model NeatAPI supports, with no code or version changes required.
Prerequisites
- Claude Code installed
- A NeatAPI API Key created in the NeatAPI Console
Setup
Set the environment variables for the current terminal session:
export ANTHROPIC_BASE_URL=https://api.neatapi.ai/v1
export ANTHROPIC_API_KEY=<your-api-key> To persist across sessions, append them to your shell config:
echo 'export ANTHROPIC_BASE_URL=https://api.neatapi.ai/v1' >> ~/.zshrc
echo 'export ANTHROPIC_API_KEY=<your-api-key>' >> ~/.zshrc
source ~/.zshrc Choosing a Model
Claude Code ships with its own Claude model selector. Once configured, pick a model the way you normally would. Claude Code sends the chosen model name to NeatAPI, which routes the request to the corresponding upstream provider.
Verification
Start Claude Code:
claude Send a message in the session. If you receive a normal response, NeatAPI is wired up correctly.