Skip to main content
Claude Code can talk to NagaAI using the Anthropic Messages API. This lets you run Claude Code with your NagaAI API key and choose any NagaAI model that supports function calling (tools).
Claude Code relies on function calling (tools) for agentic actions (reading files, running commands, editing code). Choose any NagaAI model that supports tools: models with tools support.

Quick start

1

Install Claude Code

Official docs: https://code.claude.com/docs/en/overview
curl -fsSL https://claude.ai/install.sh | bash
2

Point Claude Code to NagaAI

Claude Code reads Anthropic-compatible environment variables. Configure:
  • Base URL: https://api.naga.ac
  • Auth token: your NagaAI API key
  • Ensure the default Anthropic API key is explicitly empty (prevents conflicts)
  • (Optional) Override Claude Code’s default model aliases (Haiku/Sonnet/Opus) to specific NagaAI models
Do not rely on a project-level .env file. Claude Code does not read standard .env files by default.
export ANTHROPIC_BASE_URL="https://api.naga.ac"
export ANTHROPIC_AUTH_TOKEN="YOUR_NAGAAI_API_KEY"
export ANTHROPIC_API_KEY="" # Important: must be explicitly empty

# Optional: map Claude Code tiers to NagaAI model IDs
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4.5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-4.5"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-4.5"
Need an API key? Get one from the NagaAI dashboard: https://naga.ac/dashboard (API Keys section). Also see our Quickstart.
You can replace the example model IDs above with any model that supports function calling (tools). See models with tools support.
3

Start Claude Code

In your project directory:
claude
Your requests will be routed through NagaAI’s Anthropic-compatible endpoint (Messages API at /v1/messages).
4

Verify

Inside Claude Code, run:
> /status
You should see:
Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://api.naga.ac

Try it

  • “Summarize this project: key folders, build system, and entry points.”
  • “Find where X is implemented and list the relevant files.”
  • “Run tests and fix the first failing test.”
  • “Refactor: extract helper Y and update all call sites.”