Skip to content

Claude Code

Claude Code talks to Inferam over the Anthropic Messages format.

Terminal window
inferam claude

Any 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).

Set these for the session. Don’t put them in your shell profile if you also use Claude Code with Anthropic.

Terminal window
export ANTHROPIC_BASE_URL=https://api.inferam.ai
export ANTHROPIC_AUTH_TOKEN=ifr_... # an Inferam key
unset ANTHROPIC_API_KEY # it would take precedence
export ANTHROPIC_MODEL=DeepSeek-V4.1-Flash-1017
export CLAUDE_CODE_SUBAGENT_MODEL=DeepSeek-V4.1-Flash-1017
export ANTHROPIC_DEFAULT_OPUS_MODEL=DeepSeek-V4.1-Flash-1017
export ANTHROPIC_DEFAULT_SONNET_MODEL=DeepSeek-V4.1-Flash-1017
export ANTHROPIC_DEFAULT_HAIKU_MODEL=DeepSeek-V4.1-Flash-1017
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=524288
claude

The 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.