Skip to main content
Claude Code is Anthropic’s coding agent CLI. Out of the box it talks to Anthropic’s gateway; redirecting it at ByteSpike unlocks the rest of the model catalog (Claude, plus DeepSeek-Anthropic, plus Anthropic-via-Gemini translation, etc.) under one key.

Prerequisites

  • A ByteSpike account + a key bound to the claude-default group (or any group that includes Claude/DeepSeek-Anthropic). See Register.
  • Claude Code installed:

Configure

Two environment variables. Add to your shell profile (~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish):
Reload the shell (exec $SHELL or open a new tab). That’s it — claude now sends every Messages-API call through ByteSpike.
Want it scoped to one project, not your whole shell? Drop a .envrc (with direnv) or a project-local script that exports the vars only inside the repo:

Verify

Then start a session:
In the running session, try a small task:
You should see the model self-identify (e.g. “I’m Claude Sonnet 4.6 served via ByteSpike”). If you get an auth error, double-check ANTHROPIC_API_KEY; if you get 400 model_not_allowed, your key’s group doesn’t include the model Claude Code defaulted to — switch to a group that includes it or override with --model.

Switching models

Claude Code picks the right tool per command. Override per-session:
Or per-tool inside the session:
Any model id from your claude-default group (or whatever group your key is bound to) works. See Models for the full catalog.

Common configs

Generate a separate key per project from Console → API keys with its own quota (USD lifetime cap) and rate_limit_* buckets. Wire each project’s .envrc to the right key. Spend stays attributable in /api/v1/me/usage by api_key_id.
Both work end-to-end through ByteSpike — no extra config. The gateway preserves tool_use blocks, cache_control markers, and thinking blocks (Opus / Sonnet 4.x) untouched.
Claude Code’s MCP servers (mcp__* tools) all run client-side — they don’t care which gateway sits between the CLI and the model. Just set the env vars and your existing MCP config keeps working.
Claude Code respects HTTPS_PROXY / NO_PROXY. Add llm.bytespike.ai to NO_PROXY if your proxy mangles SSE streams; otherwise set HTTPS_PROXY=https://proxy.corp:443 and proceed normally.

Troubleshooting

For the live response shape, see /v1/messages.

Next

Codex CLI

OpenAI’s coding CLI — same idea, OpenAI-side env vars.

Models

What Claude Code can actually call.

Authentication

Group binding, quota, rate limits.

DOSIA Agent mode

The agent integration that builds on top of Claude Code’s Messages shape.