← ContentsClaude API · advanced

Citations (API)

The Citations API is a feature of the Anthropic Messages API that enables Claude to automatically attach precise source references to the claims it makes when answering questions about user-provided documents. Instead of requiring developers to engineer complex prompts to extract verbatim quotes, the API handles document chunking internally and interleaves the generated response text with structured citation objects that point back to exact locations in the source material — page ranges for PDFs, character index ranges for plain text, or block index ranges for custom content. When citations are enabled, Claude processes each document by breaking it into sentence-level chunks (for PDFs and plain text) or using the developer-defined blocks (for custom content). The model then generates a response where each factual claim is accompanied by a citation object containing the quoted text, document index, document title, and precise location data. The quoted text itself (`cited_text`) is provided as a convenience field and does not count toward output token billing. Citations are designed for applications where verifiability and source attribution matter: legal research tools, financial document analysis, enterprise RAG pipelines, compliance workflows, and customer support systems. The feature is available across all current Claude models (with the exception of Claude Haiku 3), on the direct Anthropic API, Amazon Bedrock, and Google Cloud Vertex AI, at no additional cost beyond standard token pricing.

When you’d use it

  • Transparent Customer Support ChatbotA SaaS company wants its support bot to answer questions about its product documentation. With citations enabled on plain text FAQ documents, each answer includes character-indexed quotes from the source, allowing a frontend UI to highlight the exact passage the model drew from.
  • Legal Document ReviewA legal tech platform processes lengthy PDF contracts and regulatory filings. Attorneys submit questions and receive summaries where every claim is tied to a specific 1-indexed page number in the PDF, enabling instant clause verification without manual searching.
  • Financial Research and Earnings AnalysisA financial analyst feeds multiple quarterly earnings reports as document blocks and asks Claude to compare revenue trends. Each figure in the response cites the exact page and passage from the relevant filing, giving compliance teams an auditable trail.
  • Enterprise RAG Pipeline with Source ProvenanceAn enterprise knowledge management system retrieves relevant document chunks from a vector store and passes them as custom content blocks with citations enabled. Every answer the system produces can be traced back to a specific block index, making it straightforward to display the original source to end users.
  • Academic Research AssistanceA research tool lets scholars upload multiple journal articles as PDFs. When asking synthesis questions, each sentence of the generated summary includes page-level citations to the original papers, making it easy to follow up and read the primary source.

What changed recently

  • 2025-06-30Citations feature launched as generally available on the Anthropic API. Supported document types at launch: PDFs (base64 or file_id) and plain text. Supported on Anthropic API and Amazon Bedrock for Claude Opus 4, Sonnet 4, Sonnet 3.7, and Sonnet 3.5v2 models.
  • 2025-08Files API integration made available (beta header: anthropic-beta: files-api-2025-04-14), allowing documents stored via the Files API to be referenced by file_id in citation-enabled document blocks. Custom content document type added, giving developers control over citation chunk granularity.
  • 2025-10Citations documentation consolidated across docs.anthropic.com and docs.claude.com. Citations capability noted in API release notes as a stable, generally available feature.
  • 2026-02Claude Opus 4.8 released with improved citation precision and better token efficiency on document retrieval tasks compared to Opus 4.7.
This is the short version

The full chapter has three worked examples, the common pitfalls, and the workflow that makes it pay — plus the other 84 features, kept current.

Get Claude Master — $97
CLAUDEMASTER
An independent publication.
Independent product. Not affiliated with or endorsed by Anthropic. “Claude” is a trademark of Anthropic, used here only to describe the subject of this manual.
© 2026 Claude Master — All rights reserved.