Prompt Caching
APIDefinition
A Claude API feature that caches frequently-used prompt content (system prompts, large documents, tool definitions) to reduce cost and latency on repeated API calls. Cached tokens are billed at a discounted rate. Cache has a TTL that resets on each use. Must be enabled by marking content with cache_control.
Example Usage
Cache the system prompt and product documentation with cache_control: {type: 'ephemeral'} to save costs across thousands of daily requests.