🎁 New Sign up free, 10 calls on us. Up to $1, no card needed.

Claude Code

Anthropic's official terminal coding agent. It speaks the Anthropic Messages protocol, so once you point it at Synthorai with two environment variables every Claude model in your workspace is available — nothing else in your setup changes.

This is the most popular integration path for teams that want Claude in the terminal and centralised billing + rate limits on the gateway.

Before you start

Create an API key at Console → API Keys. The full key is shown once — copy it before closing the dialog.

Step 1 — Set environment variables

Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY from the environment. Add them to your shell profile (~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish) so every new terminal picks them up.

# ~/.zshrc (or equivalent)
export ANTHROPIC_BASE_URL="https://synthorai.io"
export ANTHROPIC_API_KEY="sk-..."   # your Synthorai key

The base URL does not include /v1 — the Anthropic SDK appends /v1/messages internally. If you pasted https://synthorai.io/v1, requests will hit /v1/v1/messages and 404.

Step 2 — Send your first request

# Reload env, then:
claude --model claude-sonnet-4-6 "explain this diff" < <(git diff HEAD~1)

# Or start an interactive coding session:
claude code --model claude-opus-4-6

A successful response prints model output to stdout. If you get 401 the key is wrong or disabled; if you get 404 the model name is not routable in your workspace — check /console/pricing.

Recommended models

ParameterTypeDescription
claude-opus-4-6reasoningFlagship quality. Use for deep refactors and ambiguous problems.
claude-sonnet-4-6balancedBest price/quality for day-to-day coding and long agent sessions.
claude-haiku-4-5fastCheapest, quickest. Good for chatty ad-hoc questions and short edits.

Troubleshooting

401 Unauthorized — key is wrong, disabled, or already revoked. Regenerate at /console/keys.

404 / "model not found" — the model you passed to --model is not in your workspace's channel catalog. Run curl $ANTHROPIC_BASE_URL/v1/models -H "x-api-key: $ANTHROPIC_API_KEY" to see what is available.

"Still hitting api.anthropic.com" — your shell didn't pick up the new env vars. Open a new terminal, or source ~/.zshrc.

Can I use non-Claude models through claude-code? — No. The CLI only speaks the Anthropic Messages API and Synthorai's /v1/messages endpoint only routes to Claude models. For OpenAI / Gemini / Qwen models use Codex, Aider, or the OpenAI SDK directly.

Current per-token prices for all three tiers are on the Claude model price comparison.