Developer platform

Claude API Guide

The Claude API gives developers direct model access plus a growing set of tools and infrastructure: Messages, tools, web search, citations, files, MCP, batching, prompt caching, structured outputs, context management, and effort controls.

Citable fact 50%

The Message Batches API is documented as reducing costs by 50% for suitable asynchronous workloads.

Source: Batch processing
Citable fact 0.1x

Prompt cache read tokens are priced at 0.1 times the base input token price in the official caching docs.

Source: Prompt caching

Start With Messages

The Messages API is the core programmable interface for direct Claude model calls. The docs explain that it is stateless: you send the full conversational history each time rather than relying on server-side chat state. That design gives you control, but it also means you must manage context growth, summaries, retrieval, privacy, and cost.

Every robust integration should handle stop reasons, retries, refusals, truncation, tool calls, and fallbacks. Do not assume a successful HTTP response means the task is complete; inspect the model response and application-level criteria.

Tools And Server Capabilities

The feature overview separates server-side tools, client-side tools, tool infrastructure, and context management. Server-side web search gives Claude current web access with citations. Code execution can run Python in a sandbox for data analysis and file processing. Client-side tools let your application execute domain-specific actions.

MCP connector support lets the Messages API connect directly to remote MCP servers with a beta header, but the docs also list important limitations: only tool calls from the MCP spec are supported, the server must be publicly exposed over HTTP, and the feature is not Zero Data Retention eligible.

Citations, Files, And Search Results

Claude’s citations feature is useful when you need answer text tied to document passages. The docs say documents must have citations enabled, and currently only text citations are supported. PDFs, plain text, and custom content have different citation location formats.

The Files API is a create-once, use-many-times path for uploaded files and generated files, but the docs mark it beta and not eligible for Zero Data Retention. For RAG, the search-results feature can bring pre-fetched source snippets into responses with source attribution.

Cost And Latency Controls

Prompt caching is the first lever when a workload reuses long instructions, examples, documents, or conversation prefixes. The official docs explain automatic caching and explicit breakpoints, with a default five-minute cache lifetime and optional one-hour caching at higher write cost.

Batch processing is the second lever when results do not need to stream immediately. The Message Batches API supports up to 100,000 requests or 256 MB per batch, with most batches completing in less than one hour and results available after completion or after 24 hours, whichever comes first.

Reasoning And Effort

Current models increasingly use adaptive thinking and an `effort` control rather than manual thinking budgets. The effort docs say Sonnet 5 uses adaptive thinking by default, while Opus 4.8 uses adaptive thinking when enabled and `effort` is the recommended depth control.

The practical advice is to set effort intentionally. Use low for simple, latency-sensitive work; high or above for complex reasoning, coding, tools, and tasks with expensive mistakes. Measure output quality and total cost, not token price alone.

The Messages API is stateless.
Claude Platform Docs, Using the Messages API Open source

Cite This Page

Claude Central. "Claude API Guide." Last checked July 6, 2026. https://claudecentral.com/api

FAQ

Is the Claude API the same as claude.ai?

No. The API is a programmable developer platform with separate billing, request structure, features, and operational responsibilities.

When should I use Message Batches?

Use batches for large asynchronous workloads such as evaluations, moderation, data analysis, or bulk generation when immediate responses are not required.

Is every API feature Zero Data Retention eligible?

No. Official docs mark eligibility per feature. For example, Files API and MCP connector are described as not ZDR eligible.