← Blog

What Is an Anthropic API Endpoint? A Developer Guide

2026-09-03 · 5 min read · SubToAPI Team

An Anthropic API endpoint is a specific URL path that accepts HTTP requests and performs one action — like sending a message to Claude, listing available models, or checking a batch job. Each endpoint has a fixed structure: a method (usually POST or GET), a path (like /v1/messages), required headers, and a defined request/response format.

If you're asking "what is an Anthropic API endpoint," you probably want two things: a clear definition of what an endpoint is in this context, and a practical rundown of the endpoints you'll actually use. This article covers both.

Endpoint vs. Base URL vs. API

These three terms get used loosely, so here's the distinction:

So the endpoint is the most granular piece — it's the exact door you knock on to get a specific job done.

The Core Anthropic API Endpoints

/v1/messages

This is the endpoint you'll use for almost everything: sending a prompt, getting a completion, running multi-turn conversations, using tool calling, and streaming responses.

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-4-20250514",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Explain what an API endpoint is."}]
  }'

The response comes back as a JSON object containing the generated content, stop reason, and token usage — or as a stream of server-sent events if you set "stream": true.

/v1/messages/batches

For non-interactive, large-volume workloads. You submit many message requests at once, Anthropic processes them asynchronously, and you poll for results. Useful for bulk classification, summarization, or evaluation jobs where you don't need a response in real time.

/v1/models

Returns the list of available models and their identifiers. Handy for building UIs that let users pick a model, or for validating a model string before sending a request.

Deprecated: /v1/complete

Older integrations may still reference the legacy Text Completions endpoint. It's deprecated in favor of /v1/messages, which supports structured multi-turn conversations, system prompts, tool use, and vision input. New projects should not use /v1/complete.

What a Request to an Endpoint Actually Looks Like

Every call to an Anthropic API endpoint needs:

  1. The correct HTTP method — almost all functional endpoints use POST; listing resources uses GET.
  2. Authentication headers — an API key passed via x-api-key, plus an anthropic-version header specifying the API version you're targeting.
  3. A JSON body — matching the schema for that specific endpoint (model, messages, max_tokens, etc. for /v1/messages).
  4. Content-Type headerapplication/json for standard requests.

Miss any of these and you'll get a 4xx error, not a silent failure — the API is strict about malformed requests, which is useful for catching integration bugs early.

Why "Which Endpoint Do I Call" Matters in Practice

Most confusion around Anthropic API endpoints comes from mixing up responsibilities:

Picking the wrong endpoint for the job usually shows up as either wasted latency (using non-batch calls for bulk work) or unnecessary complexity (polling logic for something that could be a single synchronous call).

Calling Endpoints Through SubToAPI

If you already use Claude through a subscription rather than a metered Anthropic API key, you don't get direct access to api.anthropic.com endpoints — subscription access is tied to the chat interface, not a programmatic key. SubToAPI sits in that gap: it turns your existing Claude access into a standard HTTPS API with its own endpoint structure, mirroring the same request shape developers already know.

const res = await fetch("https://api.subtoapi.app/v1/messages", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "claude-opus-4-20250514",
    max_tokens: 1024,
    messages: [{ role: "user", content: "Summarize this endpoint concept." }]
  })
});

const data = await res.json();
console.log(data);

You get application-scoped API keys (sub_live_...), streaming, tool use, and usage metadata per key — all through one endpoint, without managing separate billing per developer or app. Full request/response formats are in the docs, and the quickstart walks through your first call in a few minutes. For streaming responses specifically, see streaming; for tool calling, see tools.

Plans start at €9/month for solo use, with team pricing at €19/seat and scale pricing at €49/seat — see pricing for details, or sign up to get a key and try it against a real endpoint.

Practical Checklist Before Calling an Endpoint

Questions

Is an Anthropic API endpoint the same as the API key? No. The endpoint is the URL path you send a request to; the API key is the credential that authenticates the request. You need both — a valid key sent to the correct endpoint — for a call to succeed.

Do all Anthropic API endpoints use the same request format? No. /v1/messages expects a messages array with model and max_tokens fields, while /v1/models is a simple GET request with no body. Each endpoint has its own schema documented for its specific purpose.

Can I call an Anthropic-style endpoint without a metered API key? Yes, if you use a service like SubToAPI, which exposes an HTTPS API with its own endpoints built on top of an existing Claude subscription, rather than requiring a separate pay-per-token Anthropic API account.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →