Integrations
Use Claude Code with Your Model
Configure Claude Code for Anthropic-compatible routes.
Claude Code is primarily designed for Claude models.
Your Model must provide an Anthropic-compatible Messages API route for full Claude Code support. Do not use this guide to route GPT or Grok models through Claude Code unless you have separately verified compatibility.
Claude Code compatibility is currently being verified. Use a model and route that have been validated for Anthropic-compatible Messages behavior.
Temporary shell configuration
export ANTHROPIC_BASE_URL="https://y-models.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_MODEL_API_KEY"Start Claude Code:
claudePermanent shell configuration
Back up your shell configuration before editing it. If you already have these variables, update the existing entries instead of appending duplicates.
cat >> ~/.zshrc <<'EOF'
export ANTHROPIC_BASE_URL="https://y-models.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_MODEL_API_KEY"
EOF
source ~/.zshrcSecurity reminders:
- Do not put real API keys in public scripts.
- Do not commit shell configuration containing real keys.
- Use placeholders in documentation, issues and screenshots.