Claude document citations are structured references that connect text in a Claude API response to supporting locations in supplied PDF, plain-text, or custom-content documents.
What Claude Document Citations Are
Claude document citations help applications ground answers in documents supplied through the Messages API. Alongside response text, the API can return structured citation data identifying the source location that supports a statement. This gives an application the information needed to show users where an answer came from.
Anthropic presents built-in citations as an alternative to citation formats created solely through prompting. The built-in feature instead associates cited response text with structured references. Anthropic’s current platform documentation states that all active Claude models support citations.
Citations are generally available through the Anthropic API and Google Cloud Vertex AI. Anthropic also documented Amazon Bedrock availability as of June 30, 2025.

How to Enable Citations in the Messages API
To enable citations, include a supported document in a Messages API request and set citations.enabled to true for that document. Supported inputs include PDF, plain-text, and custom-content documents. The workflow does not require Anthropic-hosted file storage.
Configuration must be consistent within each request: citation-enabled documents cannot be mixed with documents that have citations disabled. If an application sends several documents together, enable citations for every one of them.
Choose the input type according to how the application needs to organize and display its sources. PDF inputs support page-based locations, plain text supports character ranges, and custom content preserves developer-supplied content blocks. The response can then be rendered with links, labels, or source panels appropriate to the returned location type. These presentation choices are application-level decisions rather than claims that every citation format behaves identically.

Citation Locations, Token Handling, and Limitations
Citation locations depend on the document format. PDFs return page ranges, plain-text documents return character-index ranges, and custom-content documents return content-block index ranges. PDF page numbers are 1-indexed. Document, character, and custom-content block indices are 0-indexed, and documented end indices are exclusive. An interface must interpret these conventions correctly before highlighting or linking a passage.
The API divides PDF and plain-text content into sentences. It does not further chunk custom-content documents; their supplied blocks remain the citation units. Developers therefore have more direct control over citation boundaries when preparing custom content.
Only document text can be cited. Images—including images embedded in PDFs—cannot serve as cited content, so image-heavy documents may not provide traceable support for information conveyed only visually. A document’s title and context fields may be passed to the model, but those fields are not citable source content.
Enabling citations can slightly increase input-token use because of document chunking and additions to the system prompt. Anthropic says the feature uses standard token-based pricing. Returned cited_text is not counted as output tokens, nor is it counted as input when included again in later conversation turns.
Conclusion
Claude document citations fit applications that answer questions from supplied documents and need to expose the supporting passages behind those answers. They provide structured source locations without requiring a citation format to be produced only through prompt instructions.
Start by selecting PDF, plain text, or custom content based on the location format your interface can present. Enable citations consistently for every document in the Messages API request, then map the returned page, character, or content-block locations to clear source references for users.
Disclosures and limitations
- This article was prepared with AI assistance using Anthropic documentation and an Anthropic cookbook example as source material.
Sources
- Citations — Claude Platform Docs
- Citations | Claude Cookbook — Claude Cookbook
- Introducing citations on the Anthropic API — Claude
Improve this guide
Report a problem or suggest the next question
Submissions enter a private editorial queue. They are reviewed and deduplicated before any public update or new page is created.
