Claude Code
Claude Code talks to Inferam over the Anthropic Messages format.
With the CLI
Section titled “With the CLI”inferam claudeAny Claude Code flags pass through, for example inferam claude -p "fix the failing test" or inferam claude --resume <id>. If Claude Code isn’t installed, the CLI offers to run its official installer (curl -fsSL https://claude.ai/install.sh | bash).
By hand
Section titled “By hand”Set these for the session. Don’t put them in your shell profile if you also use Claude Code with Anthropic.
export ANTHROPIC_BASE_URL=https://api.inferam.aiexport ANTHROPIC_AUTH_TOKEN=ifr_... # an Inferam keyunset ANTHROPIC_API_KEY # it would take precedenceexport ANTHROPIC_MODEL=DeepSeek-V4.1-Flash-1017export CLAUDE_CODE_SUBAGENT_MODEL=DeepSeek-V4.1-Flash-1017export ANTHROPIC_DEFAULT_OPUS_MODEL=DeepSeek-V4.1-Flash-1017export ANTHROPIC_DEFAULT_SONNET_MODEL=DeepSeek-V4.1-Flash-1017export ANTHROPIC_DEFAULT_HAIKU_MODEL=DeepSeek-V4.1-Flash-1017export CLAUDE_CODE_MAX_CONTEXT_TOKENS=524288claudeThe ANTHROPIC_DEFAULT_*_MODEL variables make Claude Code’s model aliases and background tasks use the Inferam model instead of Claude models that Inferam doesn’t serve. If you use Bedrock, Vertex or Foundry, unset CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX and CLAUDE_CODE_USE_FOUNDRY too.
- Effort levels and thinking settings map onto the model’s reasoning effort (see The model).
- Claude Code features that need Anthropic’s own services, such as claude.ai connectors and web search, aren’t available on Inferam.