Skip to content
BENIBIX Learn

Claude API

Development🧬 AI EngineeringLLM APIs

Also known as Anthropic API, Claude Messages API, Claude Developer API

Claude's own web service. Your code sends it a chat and gets a reply.

Think of it like

It is like a phone line to one smart helper. You call, ask, and hear the answer.

Example

Lucy's note app sends each page to the Claude API and asks for a three-line summary. The usage block in each reply tells her how many tokens the page took.

Why it matters

It is the most direct way to reach Claude, with the newest models and features in one place. Clouds that also sell Claude may not have every feature.

Definition

The Claude API is Anthropic's web service for using Claude models in your code. Your app sends a request to api.anthropic.com/v1/messages. It holds a key, a model name, a limit on reply length and the messages. A header called anthropic-version must be sent too. It fixes how the API acts. The reply holds Claude's answer and a count of the tokens used.

Example code

bash
curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2026-10-21" \
  -H "content-type: application/json" \
  -d '{"model": "claude-opus-5-5", "max_tokens": 1000,
       "messages": [{"role": "user", "content": "Hello, Claude"}]}'
One call to the Messages API. The key, the version and the content type go in headers.
The Claude API, on the left, takes a key, a version header and the messages.

Common mistake

Leaving out the anthropic-version header when calling it by hand. The header is required, so the request is turned away. The official code kits add it for you.

Key takeaways

  1. 1
    One main endpoint. POST /v1/messages sends the chat.
  2. 2
    A version header. Fixes how the API behaves.
  3. 3
    Official code kits. Python, TypeScript, Go, Java and more.