Claude Code CLI

Configure Claude Code CLI to use Bitdeer AI models

Claude Code is a command-line tool that brings Anthropic's Claude directly into your terminal. You can configure it to route requests through Bitdeer AI's models using custom API keys and base URL settings.

Prerequisites

Configuration steps

Set environment variables

For temporary session configuration, export the variables directly in your current terminal session:

unset ANTHROPIC_API_KEY # Ensures Claude Code routes through Bitdeer AI
export ANTHROPIC_BASE_URL="https://api-inference.bitdeer.ai"
export ANTHROPIC_AUTH_TOKEN="BITDEER_API_KEY" # Replace with your API key

export ANTHROPIC_DEFAULT_OPUS_MODEL="zai-org/GLM-5.3"
export ANTHROPIC_DEFAULT_SONNET_MODEL="zai-org/GLM-5.3"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="zai-org/GLM-5.3-Flash"

For persistent setup, append the commands above to your shell profile (~/.zshrc for macOS/zsh or ~/.bashrc for Linux/bash), then apply the changes:

source ~/.zshrc  # Or source ~/.bashrc

Run the standard launch command to start coding:

claude
ModelBitdeer Model MappingBest for
Opus & Sonnetzai-org/GLM-5.3Complex reasoning & debugging
Haikuzai-org/GLM-5.3-FlashFast budget coding

On this page