HomeClaude Code
OverviewInstallCLI referencePricing & limitsAgent SDKSkills & pluginsGitHubWeb, desktop & IDEModelsErrorsOpen source?TutorialFor studentsQA automation中文指南
Last updated: September 22, 2026

Claude Code: the complete guide

Claude Code is Anthropic's agentic coding tool: a terminal program (and, since late 2025, a web app, desktop app and IDE extension) that reads your repository, plans, edits files, runs commands and opens pull requests. These guides cover installing it, driving it well, what it costs, and how to point it at a gateway so the bill stops being the thing you think about.

TLDR

  • Install with npm, the native installer, or the desktop app — five minutes on macOS, Linux, Windows or WSL.
  • It bills through the API per token, and long sessions resend the whole conversation every turn — that is why it gets expensive.
  • Two env vars (ANTHROPIC_BASE_URL + ANTHROPIC_API_KEY) point it at this gateway: same models, credits at 7.69× face value, or a flat-rate unlimited plan from $1.
  • Skills, plugins, subagents, MCP servers and the GitHub Action all keep working — the gateway sits underneath the tool, not inside it.

What Claude Code actually is

Claude Code is not a chat window with a code button. It is an agent loop: you describe an outcome, it inspects the repository, proposes a plan, edits files, runs your tests, reads the failures and iterates — asking permission before anything destructive. It ships as an npm package (@anthropic-ai/claude-code, currently 2.1.278), a native installer, a VS Code / JetBrains extension, a desktop app and a web version that runs in Anthropic-hosted sandboxes.

Under the hood every turn is a Messages API call carrying the full conversation so far. That single fact explains most of what people search for about it: why it is powerful, why it is token-hungry, why rate limits bite, and why a cheaper or flat-rate API backend changes the experience so much.

Point it at the gateway in two lines

Claude Code reads the standard Anthropic environment variables. Set the base URL to this gateway and use a key from your dashboard; nothing else changes.

export ANTHROPIC_BASE_URL=https://aiprimetech.io
export ANTHROPIC_API_KEY=your_gateway_key
claude

Run /status inside Claude Code to confirm the base URL it is talking to, and /model to pick a model. Every model the gateway serves is available — see the models guide for the current list.

The guides

Frequently asked questions

Is Claude Code free?

The tool itself is free to install. Usage is billed either through a Claude Pro/Max subscription or per token through the API. On this gateway you can run it on pay-as-you-go credits or a flat-rate unlimited plan.

Does Claude Code work with a different API endpoint?

Yes. It honours ANTHROPIC_BASE_URL, so any Anthropic-compatible endpoint works. That is exactly how it connects to this gateway — no patching, no wrapper.

Which model does Claude Code use?

By default the current Sonnet-tier model; you can switch with /model or the --model flag, and override each tier with environment variables. The models guide lists what this gateway serves right now.

Run Claude Code on the gateway

Same models, two environment variables, credits at 7.69× face value — or a flat-rate unlimited plan.

Get an API key See unlimited plans

AI Prime Tech is an independent API gateway and is not affiliated with, endorsed by, or sponsored by Anthropic. “Claude” and “Claude Code” are trademarks of Anthropic. Claude Code features described here follow Anthropic’s public documentation at the time of writing and change frequently; prices and model lists on this page are read from this gateway’s live settings.

More Claude Code guides

How to install Claude CodeClaude Code CLI documentation: commands and flagsClaude Code pricing and limits, explainedThe Claude Code SDK, now the Claude Agent SDKClaude Code skills and pluginsClaude Code in GitHub: the App, the Action and @claudeDoes Claude Code have a web interface? Web, desktop and IDE explainedWhich model Claude Code uses, and how to change itClaude Code errors and how to fix themIs Claude Code open source?Claude Code tutorial: your first real sessionClaude Code for studentsHow to use Claude Code for QA automationClaude Code 怎么用:从安装到日常使用