Overview
Parallel AI’s/api/v0/claude endpoints are compatible with the Anthropic Messages API. Point Claude Code — or any Anthropic SDK — at Parallel AI and it works out of the box, billed against your Parallel AI credits like any other API usage.
Authentication
Authentication works exactly like the rest of the API: send your API key asAuthorization: Bearer <key> or x-api-key: <key>.
Personal Access Keys (pak_...) also work but require the X-Company-ID header, which Claude Code cannot send by default — use a Company API Key for Claude Code.
Setting up Claude Code
1
Install Claude Code
Skip this if it’s already installed.On Windows (PowerShell):Verify the install with
claude --version. See the official docs for more install options.2
Get a Company API Key
In the dashboard, go to Integrations → API Keys → Generate New Key.
3
Configure Claude Code
Either export environment variables in your shell:Or persist the settings in
~/.claude/settings.json (applies to all projects) or .claude/settings.local.json in a project. Set the model variables to any Parallel AI model names — for example:4
Verify
Run
/status inside Claude Code — it should show your custom base URL — or test the endpoint directly:Model names
Themodel field accepts any model name from GET /api/v0/models — any provider, not just Anthropic. When Claude Code sends its default Anthropic model IDs (e.g. claude-sonnet-4-5-20250929), they are routed by tier to Parallel AI models:
- Opus-class requests run on the platform’s highest-capability model
- Sonnet-class requests run on the balanced default model
- Haiku-class requests (background tasks) run on the fastest low-cost model
ANTHROPIC_MODEL and the ANTHROPIC_DEFAULT_*_MODEL variables to exact Parallel AI model names for full control over routing.
Optionally set CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1 so Claude Code lists Parallel AI’s models in its /model picker.
Using the Anthropic SDK directly
Notes and limitations
- Streaming is fully supported (Anthropic SSE event format with keep-alive pings).
- Tool use is supported: Claude Code’s client-side tools (file edits, bash, etc.) are forwarded to the model and executed locally by Claude Code — never on Parallel AI’s servers.
- Server-side Anthropic tools (web search, code execution), extended thinking blocks, and prompt caching directives are accepted but ignored.
- Usage is billed per request based on real token counts and appears in your usage dashboard under the chat feature.

