Integration Guide
Step-by-step setup for using Infux with Claude Code
Claude Code uses the Anthropic Messages API — not the OpenAI format. It connects via ANTHROPIC_BASE_URL, not OPENAI_BASE_URL. Infux's gateway supports the Anthropic Messages format at /v1/messages, so Claude Code works natively.
npm install -g @anthropic-ai/claude-code)Add to your shell profile (~/.zshrc or ~/.bashrc):
export ANTHROPIC_BASE_URL="https://api.infux.dev/v1" export ANTHROPIC_API_KEY="sk-infux-your_key_here"
Then reload: source ~/.zshrc
Set the environment variables in Claude Code's settings file:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.infux.dev/v1",
"ANTHROPIC_API_KEY": "sk-infux-your_key_here"
}
}Override the default model with ANTHROPIC_MODEL:
export ANTHROPIC_MODEL="kimi-k2.5" # or any Infux model ID
| Use Case | Model | Why |
|---|---|---|
| Fast edits | deepseek-v3-0324 | Fastest TTFT, great code quality |
| Complex refactors | kimi-k2.5 | Strong SWE-bench, large context |
| Hard reasoning | kimi-k2.5-thinking | Best SWE-bench score (56.5%) |
claude "Write a hello world in Python"
You should see the response streaming in real-time via the Infux gateway.
Make sure you set ANTHROPIC_BASE_URL (not OPENAI_BASE_URL). Claude Code only reads Anthropic environment variables.
Use ANTHROPIC_API_KEY (not OPENAI_API_KEY). Verify your key starts with sk-infux-.
Set ANTHROPIC_MODEL to an Infux model ID. Check available models at /models.