AI courses in English and Dutch, with certificate AI literacy you can evidence under the EU AI Act Invoice in your employer's name, also for teams
Black Friday33% off every e-learning and team plan, from 4 to 30 November (Cyber Monday)33% off until 30 Novends in 0d 0h 0mView the e-learnings

Claude API: what it is and what you can do with it

Claude API: what it is and what you can do with it

The Claude API is programmatic access to Anthropic’s Claude models: your software sends a request and gets the model’s answer back, without a chat window. The chat, the desktop app and Claude Code each have their own place in the Claude guide; the API is the route for building Claude into your own software. You set up access in the Claude Console, separately from any claude.ai subscription.

You use the API for tasks that come up too often to prompt by hand, such as extracting data from documents, sorting tickets or summarising reports, and for integrations with software you already use.

Every integration starts with an API key: a secret key that you create in the Console, see only once and then store securely yourself. With that key, you make your first call through an official SDK or a no-code tool; the Playground in the Console works without a key.

In production, three things determine whether an integration keeps running reliably: rate limits, error codes and varying results from identical prompts. If you use the API for business, you will also want to know how safe company data is and whether you can manage without programming skills.

What is the Claude API?

The Claude API is an application programming interface from Anthropic that gives software direct access to the Claude models: a program sends a request to api.anthropic.com and receives the model’s answer as JSON.

An API has no chat window and no memory between two calls. With each request, your software sends the conversation history the model needs, plus an optional system prompt with a role and instructions.

AI knowledge base
How a Claude API call works
Your software
  • System prompt
  • Conversation history
  • Settings
  • API key
api.anthropic.com
The chosen Claude model processes the request.
Response as JSON
Your software receives the answer and processes it further.

The API keeps no memory between calls, so each request carries the history it needs.

The API runs the same models as the Claude AI chat. What differs is how you call them and the settings you pass along yourself, such as the maximum length of an answer.

Besides the direct API from Anthropic, Claude is available through Amazon Bedrock, Google Cloud and Microsoft Foundry. Billing and access management there run through the cloud provider.

How does the Claude API relate to other Claude products?

The Claude API is a separate product alongside claude.ai and Claude Code, with its own account, its own keys and its own billing. Which of the three you need depends on what you want to do: chat, have code written or build Claude into your own software.

How does the Claude API differ from claude.ai?

The Claude API differs from claude.ai in how you access it: claude.ai is the chat environment with a subscription, while the API runs through a separate organisation in the Claude Console.

A Pro or Enterprise subscription does not include API usage. According to Anthropic’s help documentation, Max, Ultra and Team subscriptions do include a monthly API credit, which you link to one Console organisation and which expires at the end of each billing period. You use that credit for the API and the Playground, not for interactive use of Claude Code.

Beyond that credit, you pay in advance in the Console and Anthropic charges per token, with Claude API pricing varying by model and output costing more than input. A token is a piece of text, often part of a word.

What works in claude.ai does not always work identically through the API. In my Python scripts that call the Claude API, the context that the interface adds automatically is missing. So when I move a prompt from the chat to the API, I tune it separately to the system prompt and max_tokens. You no longer send a temperature setting, because Anthropic removed that parameter in API version 2026-10-21.

How does the Claude API differ from Claude Code?

Claude Code differs from the Claude API in purpose: Claude Code is a coding assistant that reads and edits files and runs commands in the terminal and the code editor. The API is the building block you use to call Claude yourself from a script, an application or an automation tool.

If you mainly want code written for you, Claude Code is the direct route and your own API integration is unnecessary.

What do you use the Claude API for?

You use the Claude API for tasks that come up too often to prompt by hand, and in places where Claude works inside other software. Five common uses:

  • Sorting incoming email or tickets by topic and urgency, so that an employee only reviews the exceptions.
  • Extracting data from invoices, contracts or forms and passing it on as fixed fields to an accounting or CRM system.
  • Summarising long reports, minutes or client briefings in a fixed format, so that every summary has the same structure.
  • Running content and analysis workflows, such as a draft text based on a fixed brief or a periodic analysis of exported data.
  • Building integrations in n8n, Make or Zapier, where Claude is a step between two other applications.

On my VPS, I run a workflow in which Claude analyses Search Console data through the API. With the Claude API, I also built a content pipeline and a script that generates course updates as SQL statements and checks them in advance. Each of these applications carries out the same task on varying input, with a checking step before the result is saved or published.

How do you create a Claude API key?

You create a Claude API key in the Claude Console at platform.claude.com, under Settings > API keys, after adding credit under Billing. Which type of key suits a production integration and how to store it securely is covered in the guide to creating a Claude API key.

For my own automations, I start with three questions: what data goes in, where it ends up and who can access it.

Which Claude model do you use through the API?

Through the Claude API, you choose a model for each call from three model lines: Haiku, Sonnet and Opus. Anthropic positions Haiku as the fastest and cheapest model, Opus as the model for complex tasks and Sonnet in between. Above Opus sits Claude Fable, a heavier model with extra safety measures.

You decide which Claude model to use for each task, not for each project. A single workflow often uses a light model for sorting and a heavier model for the exceptions.

When moving from Claude Opus 4.6 to 4.7, I noticed that existing prompts had to be retested and partly rewritten to reach the same quality. So before I use a new model in a production workflow, I first test it on a small sample.

How do you make your first Claude API call?

To make your first call to the Claude API, you choose one of three routes: the Playground in the Console, an official SDK or a direct HTTP request.

The Playground is the easiest place to start. You type a system prompt and a message, choose a model and see the answer, without a line of code.

Anthropic provides official SDKs for languages including Python, TypeScript, Java, Go, C#, PHP and Ruby. A minimal call in Python, after pip install anthropic and with the key set as an environment variable:

import anthropic

client = anthropic.Anthropic()

message = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1000,
    messages=[{"role": "user", "content": "Summarise this complaint in three sentences: ..."}],
)

print(message.content[0].text)

Three fields are required: model, max_tokens and messages. You pass a system prompt through the system field, separately from the messages.

What problems does the Claude API run into in production?

In production, the Claude API has four sticking points that rarely show up in a one-off test:

  • Rate limits and usage tiers: for each usage tier, Anthropic caps the number of requests and tokens per minute and the monthly spend. I ran into this myself during bulk analyses; batch processing or waiting between calls solves it.
  • Error codes: 429 means a limit has been reached, 529 a temporarily overloaded API and 500 an internal error at Anthropic. The official SDKs retry 429 and 5xx errors twice by default; a custom script without retry logic stops at the first disruption.
  • Varying results: the same prompt does not always produce the same answer, and since API version 2026-10-21 you can no longer set temperature to limit that. In my workflows, I deal with this through strict validation of the output, such as a check on the expected JSON format.
  • Testing costs: while building, you iterate more often than in production, so costs during the build phase turn out higher than expected. A spending limit per workspace and a test run on a small sample keep that manageable.

Is the Claude API safe for company data?

Yes, the Claude API is suitable for company data, because according to its Privacy Center, Anthropic does not use API inputs and outputs to train models by default. Anthropic acts as a processor under its commercial terms. The data processing agreement (Data Processing Addendum) is automatically part of those terms and does not need to be signed separately.

Suitable does not automatically mean permitted. For personal data, the GDPR requires a legal basis and a data processing agreement, and the office decides for itself which data goes to an external service. Removing names, addresses and identifying numbers from the input before a request is sent reduces the risk.

Can you use the Claude API without coding?

Yes, you can use the Claude API without programming skills, because the Playground and no-code tools such as n8n, Make and Zapier handle the technical side of the request. In such a tool, you paste the API key into a connection, choose a model and place Claude as a step between, for example, a mailbox and a spreadsheet.

A custom script does require code. I build my own automations with AI as a building partner, and I see a clear limit: simple to medium-sized automations work, extensive software with many interconnected parts does not.

Frequently asked questions about the Claude API

If you are going to build with the Claude API, you will often also want to know which input the model can handle and what happens to the data you send.

Can the Claude API process PDFs and images?

Yes, the Claude API processes PDFs and images, and according to Anthropic all active models support PDF input. Each page is converted into an image plus the extracted text, so charts and tables are taken into account in the answer. A request to Anthropic may be at most 128 MB and contain up to 600 pages, or 100 pages for models with a context window below one million tokens. For each page, expect roughly 1,500 to 3,000 text tokens, plus the tokens for the image.

Can the Claude API search the web?

Yes, the Claude API can search the web with the web search tool, where the model determines when a search is needed and the answer includes citations. Anthropic charges $10 per 1,000 searches for this, on top of the normal token costs. An administrator can switch the feature off in the Claude Console or restrict it to certain domains.

How long does Anthropic keep data you send through the Claude API?

According to its Privacy Center, Anthropic deletes Claude API inputs and outputs within 30 days of receipt or generation by default. If the automated safety systems flag a request as a breach of the usage policy, Anthropic may keep that data for up to two years. A different period, such as zero data retention, only applies if you agree it separately, and files in the Files API fall under a longer retention period that you manage yourself.

How do you learn to automate with the Claude API?

You learn to automate with the Claude API by choosing one recurring task, working it out in the Playground first and only then building an integration with a checking step. One task with predictable input teaches you more about prompts, limits and costs than a broad automation that fails in ten places at once.

With an API key, some credit and a clear task, you have everything you need to start. The AI Automation Course takes you through that route step by step, to a working automation for your own work, with no programming skills needed in advance.

Related articles