What is Claude Code
Claude Code is Anthropic’s agentic coding tool for reading codebases, editing files, running commands, and integrating with development tools. This CLI setup uses Capriole AI by configuring Claude Code’s API endpoint, auth token, and model environment variables.Prerequisites
Before you begin, make sure you have:- A Capriole AI account (Sign up here)
- A Capriole AI API key (Get your key)
Installation
Configuration
Create or update~/.claude/settings.json for persistent setup:
Run Claude Code
After saving~/.claude/settings.json or exporting the variables, start Claude Code from your project directory:
Supported models
Claude Code supports Claude latest, Opus 4.8, Opus 4.7, Opus 4.6, and Sonnet 4.6 through Capriole AI. Useclaude-latest for new setups so Capriole AI can route Claude Code to our recommended flagship Claude model without changing your config.
claude-latestclaude-opus-4-8claude-opus-4-7claude-opus-4-6claude-sonnet-4-6
Troubleshooting
Why does Claude Code return an authentication error?
Confirm thatANTHROPIC_AUTH_TOKEN is exported in the same shell before launching claude. Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY, for this setup.
Why do requests fail with endpoint errors?
Confirm thatANTHROPIC_BASE_URL is https://api.caprioletech.com without /v1; Claude Code sends requests to /v1/messages and /v1/messages/count_tokens.
Why doesn’t Claude Code use Claude latest?
Confirm thatmodel, ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL, and the default model environment variables are set before launch, then check /model or /status for an active session or settings override.
Why doesn’t Claude Code use the configured effort level?
Set"effortLevel": "high" in ~/.claude/settings.json, then restart Claude Code. Claude Code settings accept low, medium, high, and xhigh; max is not accepted in effortLevel.
For the absolute maximum effort in a session, use /effort max, launch with claude --effort max, or set CLAUDE_CODE_EFFORT_LEVEL=max before launching claude.
Why can’t Claude Code select Opus 4.8?
Update Claude Code withclaude update, then run claude --version.
Why does token counting or startup model discovery fail?
Keep the model environment variables in place and confirm that the model ID isclaude-latest or a supported concrete Claude model ID. Capriole AI proxies /v1/messages/count_tokens to the selected upstream, so token-count preflight depends on that upstream supporting Anthropic token counting.
Notes
~/.claude/settings.jsonapplies to your user account across projects. UseYOUR_CAPRIOLE_AI_API_KEYas a placeholder and replace it with your actual Capriole AI API key.ANTHROPIC_BASE_URLchanges where Claude Code sends requests. The model environment variables control which model ID is sent.ANTHROPIC_SMALL_FAST_MODELshould matchclaude-latestso Claude Code helper requests use the same Capriole AI latest alias as the main conversation.- This setup uses
highas the documented default effort level. On Opus 4.8,xhighis also a persistenteffortLeveloption, whilemaxis a session-level override and can spend more thinking tokens. - Official references: Claude Code setup, environment variables, model configuration, and Claude effort.