BeginnerGetting Started

Claude.ai vs Claude Code vs Claude API — which one when?

Four front doors. The quick decision tree for picking the right one.

Anthropic ships four primary surfaces: Claude.ai, Claude Code, the Claude API, and the Agent SDK. They overlap. This is the practical decision tree for choosing.

6 min read
claudeoverviewdecision-guidebeginner

Anthropic ships several front doors to Claude. They overlap, which is why "should I use Claude.ai or the API?" is the most-asked Claude question on the internet. Here's the decision tree.

The four surfaces, briefly

Claude.ai — The web app. Browser-based chat. Best for: solo thinking, drafting, research, anything you''d open a browser tab to do. Requires no code.

Claude Code — The CLI tool that runs on your terminal. Best for: anything in a codebase. Reads files, edits files, runs tests, calls Bash. The closest thing to "Claude as a teammate sitting next to you."

Claude API — Direct programmatic access via HTTP / SDK. Best for: building products that include Claude. Chat features in your app, automation pipelines, batch processing.

Agent SDK — A higher-level SDK on top of the API for building autonomous agents. Best for: agents that loop on their own, call tools, manage memory across many turns.

The decision tree

Are you trying to think with Claude?

Use Claude.ai.

You want a conversation surface, not a build surface. Claude.ai gives you projects, multiplayer Cowork chats, file uploads, voice. Don't reach for the API to "just ask a question" — you''ll spend more time on plumbing than on the answer.

Are you trying to change code in a repo?

Use Claude Code.

The moment your task involves "edit src/foo.ts to do X" or "run the tests then fix what breaks," Claude Code is dramatically better than Claude.ai because:

  • It can read the actual files (not your copy-pastes of them)
  • It can run commands and react to output
  • It understands CLAUDE.md, hooks, slash commands, MCP

If you're tempted to use Claude.ai for repo work, you''re leaving 80% of the value on the table.

Are you trying to ship a product that talks to Claude?

Use the Claude API.

Building a chat feature, summarization tool, custom workflow? Use the API directly. Anthropic ships well-maintained Python and TypeScript SDKs. Read the prompt caching guide and the tool use patterns before you ship — they''re where the cost wins live.

Are you trying to build an autonomous agent?

Use the Agent SDK.

The Agent SDK handles the things you''d otherwise hand-roll: agent loops, tool orchestration, memory management, parallel subagent spawning. If you''re building "Claude figures out what to do across many steps without me stopping it each turn," start here instead of the bare API.

The combinations that actually work

Most serious users live across multiple surfaces:

  • Claude.ai for thinking + Claude Code for executing. Sketch the design in Claude.ai (no codebase noise). Then switch to Claude Code with that sketch as context to implement.

  • Claude.ai for solo + Cowork for team. When the work outgrows you, move it to a Cowork project so others can read along. See Cowork explained.

  • API for product features + Claude Code for the codebase that runs them. You build a customer-facing feature on the API; you maintain that codebase in Claude Code.

Common mistakes

  • "I''ll just use the API for everything." You''ll re-build the chat UI Claude.ai already has, badly. Use the right surface for the job.

  • "Claude Code is for programmers." Wrong frame. Claude Code is for anyone working inside files — including writing markdown docs, editing config, drafting CLAUDE.md. Even non-engineers get massive value from it once they realize it''s "Claude with file access."

  • "I''ll use Claude.ai because it''s free." Tier matters less than fit. Claude Code on a Pro plan + Claude.ai on the same plan is one subscription. The API and Agent SDK are a different billing model — pay-as-you-go for production usage.

Where to go next

Keep learning

Apply this with Waymaker

Get this article surfaced where you work

Inside Waymaker, this article shows up next to the right Signal page — so the lesson lands when you need it, not before.

No credit card required.