Claude Code CLI
Configure Anthropic's Claude Code CLI to route through Arvika Labs for unified billing and model access.
Model slugs in examples are illustrative. Confirm current availability in the live catalog and your account's /v1/models before use.
What This Does
Claude Code is Anthropic's official CLI for AI-assisted development. By configuring it to use Arvika Labs's endpoint, you can use any supported model — not just Claude — while consolidating all your AI spend under a single Arvika Labs account. Your token usage draws from your Arvika Labs balance automatically.
Setup
Step 1: Locate Your Settings File
Claude Code stores its configuration in a settings.json file. Find it based on your OS:
| OS | Path |
|---|---|
| macOS / Linux | ~/.claude/settings.json |
| Windows | %USERPROFILE%\.claude\settings.json |
If the file doesn't exist, create it.
Step 2: Configure Environment Variables
Open settings.json and add the following configuration:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.labs.arvikaconsulting.com/",
"ANTHROPIC_AUTH_TOKEN": "YOUR_Arvika Labs_API_KEY",
"ANTHROPIC_MODEL": "gpt-5.6-sol",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "kimi-k2.7-code",
"ANTHROPIC_SMALL_FAST_MODEL": "glm-5.3-flash"
}
}Replace YOUR_Arvika Labs_API_KEY with your actual key from labs.arvikaconsulting.com/keys.
Check the live model catalog and your account's /v1/models before choosing default model slugs; availability may change and tenant policies may narrow the list.
Step 3: Alternative — Environment Variables in Shell
If you prefer not to modify the settings file, set environment variables in your shell:
export ANTHROPIC_BASE_URL="https://api.labs.arvikaconsulting.com/"
export ANTHROPIC_AUTH_TOKEN="YOUR_Arvika Labs_API_KEY"Add these to your ~/.zshrc or ~/.bashrc to persist across sessions.
Step 4: Verify the Connection
Run Claude Code and start a conversation:
claudeTry a simple prompt to confirm the connection works.
Recommended Models for Claude Code
| Use Case | Model | Why |
|---|---|---|
| Complex reasoning & planning | gpt-5.6-sol | OpenAI's GPT-5.6 flagship for complex work |
| Code generation & refactoring | kimi-k2.7-code | Optimized for code |
| Large codebase analysis | minimax-m3 | Large context for substantial files |
| Quick operations | glm-5.3-flash | Low-cost coding and agent tasks |
Troubleshooting
Connection refused or timeout
- Verify the base URL is exactly
https://api.labs.arvikaconsulting.com/(with trailing slash for Claude Code) - Check that your API key is valid at labs.arvikaconsulting.com/keys
Authentication errors
- Ensure
ANTHROPIC_AUTH_TOKENis set, notANTHROPIC_API_KEY— Claude Code expects the token variant - Remove any quotes around the key if you're setting it via shell export
Model not found errors
- Use model slugs exactly as shown in the Models reference
- Claude Code may require you to specify a model explicitly if the default isn't recognized
Notes
- Claude Code was designed for Claude models but works with any OpenAI-compatible endpoint
- The
ANTHROPIC_SMALL_FAST_MODELis used for background tasks — set it to a low-cost model - All token consumption appears in your Arvika Labs dashboard in real-time