Foundations · Start here

What is the Claude API?

Before any code: what actually is this thing? Is it a program you install? A website? A command? And why does everyone keep mentioning Python, an SDK, and Claude Code as if they're the same thing — they're not. This page draws the whole map so nothing later feels like magic.

API = the doorwaySDK = a helper library CLI = a separate appHTTP request one concept, three layers
Explain like I'm 10
Imagine Claude is a brilliant chef who only works in one restaurant far away — you can never bring the chef home. To get a meal you send an order slip to the restaurant, and a plate comes back. The API is that order-slip system: a fixed way to ask and receive. An SDK is a friendly helper who fills out the order slip for you in your own handwriting. And Claude Code is a whole different restaurant chain that happens to send order slips to the same chef. Same chef, different ways of ordering.

The one sentence to remember

Claude runs on Anthropic's servers. You never run Claude on your machine. Everything you build is just different ways of sending a request to those servers and reading the reply.

That's the whole thing. "The Claude API" is the doorway to those servers: you send it an HTTP request (exactly like calling any REST endpoint you've used before), and it sends back a JSON reply. If you've ever called a web service from Java, you already understand 80% of this.

The three layers — click to see the SAME request at each

Here's the key that untangles your confusion: curl, the Python SDK, a Java HTTP call, and Claude Code all do the same underlying thing — send one HTTP request to api.anthropic.com. They just sit at different heights above the metal. Click each layer:


    

So which do I use?

LayerWhat it isUse it when…
Raw HTTP (curl)The API itself. A plain HTTP POST. No library.you want to see exactly what the API is, debug, or call from a language with no SDK.
SDK (Python / TS / …)A library that builds that HTTP request for you and parses the reply into objects.you're writing an app — 99% of the time. Less boilerplate, fewer mistakes. ← our main path.
Your own HTTP client (Java)You build the same POST by hand with your language's HTTP tools.you're in a language without an official SDK, or you like full control. Same doorway.
Claude Code (CLI)A separate application (a coding agent) that calls the API for you under the hood.you want an agent in your terminal, not to build your own. It's a product, not the API. (Its own exam domain.)
Why the earlier confusion? The API, the SDK, and Claude Code all get called "using Claude," but they're different heights on this stack. The API is the doorway (HTTP). The SDK is a helper that fills out the request in your language. Claude Code is a separate CLI app that uses the doorway. When you read "call the Claude API," picture the HTTP request — everything else is a convenience on top of it.
Takeaways: Claude lives on Anthropic's servers; you only ever send a request and read a reply. The API = the HTTP doorway (send JSON, get JSON). The SDK = an optional library that writes that HTTP for you in your language (we'll use Python). Claude Code = a separate CLI app that also uses the doorway. Same chef, three ways to order — pick the SDK for building apps.

Next: see this same idea show up in claude.ai and VS Code — you're using this API far more often than you think.