IA 360
Language Models

Anthropic adds prompt caching to Claude API

Anthropic is making prompt caching for Claude available in public beta. The feature reuses large parts of a request, cuts input costs by up to 90% and avoids processing the same context on every call.

5 min read Leer en español

Anthropic has added prompt caching to the Claude API in public beta today. The feature lets developers temporarily store the stable, lengthy parts of a request — such as a manual, a document repository or system instructions — and reuse them in subsequent calls.

The change matters because many applications built on language models send the same context over and over before each user question. Anthropic says the cache can cut input token costs by up to 90% and reduce latency by up to 85% when that context is reused.

Avoiding repeated charges for the same context

A language model does not automatically retain the content of a conversation or document between API requests. Each call typically includes the instructions and text needed to generate a response all over again. If a company builds an assistant that searches hundreds of pages of internal documentation, that block may account for most of the cost of each interaction.

With prompt caching, the developer marks a breakpoint in the prompt. Anthropic processes and caches the content before that point for a five-minute period. Subsequent calls with the same prefix can retrieve the already-processed context instead of processing it again as a regular input.

This is not permanent memory, nor is it a mechanism for training Claude on customer data. It is a temporary infrastructure optimization: it keeps the same block of text from having to be processed from scratch every time the final question changes.

A steep discount, with an upfront cost

The first request that creates the cache is not free. Anthropic charges 25% more than the standard input rate to write data to the cache, while reading an already stored block costs 10% of that rate.

For Claude 3.5 Sonnet, whose input price is $3 per million tokens, writing those tokens to the cache costs $3.75, while retrieving them costs $0.30. The difference becomes significant when a document is queried many times within a few minutes: after the first call, the repeated context costs one-tenth as much.

The advertised savings are a maximum, not an automatic discount for every use case. An application that changes much of its instructions or documents with every query will get little benefit from caching. It also depends on subsequent requests sharing the exact stored prefix; changing the order of the documents or an early instruction means that portion must be processed again.

Use cases that could change an application's design

The feature is available for Claude 3.5 Sonnet and the Claude 3 Opus and Haiku models. Anthropic also sets a minimum size for blocks to be cached: 1,024 tokens for Sonnet and Opus, and 2,048 for Haiku. Those are low thresholds for a report or technical guide, but they rule out use cases involving very short instructions.

The clearest candidates are support assistants that work with complete catalogs, analysis tools that keep an active case file open, systems that review large code repositories and agents that operate under extensive internal rules. In all of these cases, the fixed content can be far larger than the user's specific question.

Caching could also change a common product decision: until now, many companies have aggressively summarized documents or trimmed conversation history to control costs and response times. Reusing a broad context across several turns makes it possible to retain more information without paying the full price for every message, although it requires careful prompt organization.

A technical feature with competitive implications

The announcement comes as providers compete not only on model quality, but also on the real-world cost of putting those models into production. For a prototype, the price per million tokens may seem abstract. For a service handling thousands of queries about the same documentation, the difference between processing a text again and reading it from a cache accounts for a significant part of the bill.

The five-minute limit also shows where the tool fits: it is designed for active sessions and repetitive workloads, not for building a persistent knowledge library. Teams that need to retrieve information days later will still need a database, document search or information retrieval systems.

The beta will show whether the discount outweighs the additional complexity of designing prompts with reusable blocks. If it works as Anthropic describes, Claude-based applications will be able to treat long contexts less as an expensive luxury and more as a standard part of the user experience.

SEO Title: Anthropic adds prompt caching to Claude SEO Description: Anthropic launches prompt caching for Claude's API, reusing context to cut input costs by up to 90% and speed up responses.

Share this article

This website uses cookies to improve the browsing experience. Cookie policy.