Loading...
    • Developer Guide
    • API Reference
    • MCP
    • Resources
    • Release Notes
    Search...
    ⌘K
    First steps
    Intro to ClaudeQuickstart
    Models & pricing
    Models overviewChoosing a modelWhat's new in Claude 4.6Migration guideModel deprecationsPricing
    Build with Claude
    Features overviewUsing the Messages APIHandling stop reasonsPrompting best practices
    Model capabilities
    Extended thinkingAdaptive thinkingEffortFast mode (beta: research preview)Structured outputsCitationsStreaming MessagesBatch processingPDF supportSearch resultsMultilingual supportEmbeddingsVision
    Tools
    OverviewHow tool use worksTutorial: Build a tool-using agentDefine toolsHandle tool callsParallel tool useTool Runner (SDK)Strict tool useTool use with prompt cachingServer toolsTroubleshootingTool referenceWeb search toolWeb fetch toolCode execution toolMemory toolBash toolComputer use toolText editor tool
    Tool infrastructure
    Manage tool contextTool combinationsTool searchProgrammatic tool callingFine-grained tool streaming
    Context management
    Context windowsCompactionContext editingPrompt cachingToken counting
    Files & assets
    Files API
    Agent Skills
    OverviewQuickstartBest practicesSkills for enterpriseClaude API skillUsing Skills with the API
    Agent SDK
    OverviewQuickstartHow the agent loop works
    MCP in the API
    MCP connectorRemote MCP servers
    Claude on 3rd-party platforms
    Amazon BedrockMicrosoft FoundryVertex AI
    Prompt engineering
    OverviewConsole prompting tools
    Test & evaluate
    Define success and build evaluationsUsing the Evaluation ToolReducing latency
    Strengthen guardrails
    Reduce hallucinationsIncrease output consistencyMitigate jailbreaksStreaming refusalsReduce prompt leak
    Administration and monitoring
    Admin API overviewData residencyWorkspacesUsage and Cost APIClaude Code Analytics APIAPI and data retention
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    Administration and monitoring

    API and data retention

    Learn about how Anthropic's APIs and associated features retain data, including information about which APIs and features are eligible for zero data retention ("ZDR").

    Information about Anthropic's standard retention policies is set out in Anthropic's commercial data retention policy and consumer data retention policy.

    When users use API endpoints with zero data retention (ZDR), customer data submitted through those endpoints is not stored at rest after the API response is returned except where needed to comply with law or combat misuse. Subject to these exceptions, when using ZDR-enabled endpoints, customer data is processed in real time and promptly discarded, with no logging or non-ephemeral storage of prompts or outputs.

    Our approach to data retention

    Different APIs and features have different storage and retention needs. Where an API or feature doesn't require storage of customer prompts or responses, it may be eligible for ZDR. Where an API or feature necessarily requires storage of customer prompts or responses, Anthropic designs for the smallest possible retention footprint. For these features:

    • Retained data is never used for model training without your express permission.
    • Only what is technically necessary for the API and feature to work is retained. Conversation content (your prompts and Claude's outputs) is never retained unless explicitly noted.
    • Data is purged on the shortest practical TTL, and Anthropic aims to give customers control over how long data is retained. What is held, and the retention duration where a specific TTL applies, is documented on each feature's page.

    In the ZDR eligibility table, some features are marked "Yes (qualified)" in the ZDR eligible column. If your organization has a ZDR arrangement, you can use these features with confidence that what Anthropic retains is narrow and is required for optimal performance.

    Zero data retention (ZDR) scope

    What ZDR covers

    • Certain Claude APIs: ZDR applies to the Claude Messages and Token Counting APIs
    • Claude Code: ZDR applies when used with Commercial organization API keys or through Claude Enterprise (see Claude Code ZDR docs)

    What ZDR does NOT cover

    • Console and Workbench: Any usage on Console or Workbench
    • Claude consumer products: Claude Free, Pro, or Max plans, including when customers on those plans use Claude's web, desktop, or mobile apps or Claude Code
    • Claude Teams and Claude Enterprise: Claude Teams and Claude Enterprise product interfaces are not ZDR-eligible, except for Claude Code when used through Claude Enterprise with ZDR enabled for the organization. For other product interfaces, only Commercial organization API keys are eligible for ZDR.
    • Third-party integrations: Data processed by third-party websites, tools, or other integrations is not ZDR-eligible, though some may have similar offerings. When using external services in conjunction with the Claude API, make sure to review those services' data handling practices.

    For the most up-to-date information on what products and features are ZDR-eligible, refer to your contract terms or contact your Anthropic account representative.

    ZDR eligibility by feature

    FeatureEndpointZDR eligibleData retention details
    Messages API/v1/messagesYesStandard API calls for generating Claude responses.
    Token counting/v1/messages/count_tokensYesCount tokens before sending requests.
    Web search/v1/messages (with web_search tool)Yes1Real-time web search results returned in the API response.
    Web fetch/v1/messages (with web_fetch tool)Yes1 2Fetched web content returned in the API response.
    Memory tool/v1/messages (with memory tool)YesClient-side memory storage where you control data retention.
    Context management (compaction)/v1/messages (with context_management)YesServer-side compaction results are returned/round-tripped statelessly through the API response.
    Context editing/v1/messages (with context_management)YesContext edits (tool use clearing + thinking clearing) are applied in real time.
    Fast mode/v1/messages (with speed: "fast")YesSame Messages API endpoint with faster inference. ZDR applies regardless of speed setting.
    1M token context window/v1/messagesYesExtended context processing uses the standard Messages API.
    Adaptive thinking/v1/messagesYesDynamic thinking depth uses the standard Messages API.
    Citations/v1/messagesYesSource attribution uses the standard Messages API.
    Data residency/v1/messages (with inference_geo)YesGeographic routing uses the standard Messages API.
    Effort/v1/messages (with effort)YesToken efficiency control uses the standard Messages API.
    Extended thinking/v1/messages (with thinking)YesStep-by-step reasoning uses the standard Messages API.
    PDF support/v1/messagesYesPDF document processing uses the standard Messages API.
    Search results/v1/messages (with search_results source)YesRAG citation support uses the standard Messages API.
    Bash tool/v1/messages (with bash tool)YesClient-side tool executed in your environment.
    Text editor tool/v1/messages (with text_editor tool)YesClient-side tool executed in your environment.
    Computer use/v1/messages (with computer tool)YesClient-side tool where screenshots and files are captured and stored in your environment, not by Anthropic. See Computer use.
    Fine-grained tool streaming/v1/messagesYesStreaming tool parameters uses the standard Messages API.
    Prompt caching/v1/messagesYesYour prompts and Claude's outputs are not stored. KV cache representations and cryptographic hashes are held in memory for the cache TTL and promptly deleted after expiry. See Prompt caching.
    Structured outputs/v1/messagesYes (qualified)Your prompts and Claude's outputs are not stored. Only the JSON schema is cached, for up to 24 hours since last use. See Structured outputs.
    Tool search/v1/messages (with tool_search tool)Yes (qualified)Only tool catalog data (names, descriptions, argument metadata) is stored server-side. See Tool search.
    Batch processing/v1/messages/batchesNo29-day retention; async storage required. See Batch processing.
    Code execution/v1/messages (with code_execution tool)NoContainer data retained up to 30 days. See Code execution.
    Programmatic tool calling/v1/messages (with code_execution tool)NoBuilt on code execution containers; data retained up to 30 days. See Programmatic tool calling.
    Files API/v1/filesNoFiles retained until explicitly deleted. See Files API.
    Agent skills/v1/messages (with skills) / /v1/skillsNoSkill data retained per standard policy. See Agent skills.
    MCP connector/v1/messages (with mcp_servers)NoData retained per standard policy. See MCP connector.

    1 Dynamic filtering is not ZDR-eligible.

    2 While web fetch is ZDR-eligible, website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies.

    Limitations and exclusions

    CORS not supported

    Cross-Origin Resource Sharing (CORS) is not supported for organizations with ZDR arrangements. If you need to make API calls from browser-based applications, you must:

    • Use a backend proxy server to make API calls on behalf of your front end
    • Implement your own CORS handling on the proxy server
    • Never expose API keys directly in browser JavaScript

    Data retention for policy violations and where required by law

    Even with ZDR arrangements in place, Anthropic may retain data where required by law or to combat Usage Policy violations and malicious uses of Anthropic's platform. As a result, if a chat or session is flagged for such a violation, Anthropic may retain inputs and outputs for up to 2 years.

    Frequently asked questions

    Related resources

    • Privacy Policy
    • Batch processing
    • Files API
    • Agent SDK Sessions
    • Prompt caching

    Was this page helpful?

    • Our approach to data retention
    • Zero data retention (ZDR) scope
    • ZDR eligibility by feature
    • Limitations and exclusions
    • CORS not supported
    • Data retention for policy violations and where required by law
    • Frequently asked questions
    • Related resources