Skip to content
API referenceCitations

Citations

Native Claude Messages references to document passages.

Document citations without a server prompt

Add citations.enabled: true to every document block. Claude returns multiple text blocks, and supported claims include a citations array.

json
{
  "type": "document",
  "source": {
    "type": "base64",
    "media_type": "application/pdf",
    "data": "<PDF_BASE64>"
  },
  "title": "Report.pdf",
  "citations": {"enabled": true}
}
json
{
  "type": "text",
  "text": "Revenue increased by 18%",
  "citations": [{
    "type": "page_location",
    "document_index": 0,
    "document_title": "Report.pdf",
    "start_page_number": 5,
    "end_page_number": 6,
    "cited_text": "..."
  }]
}
  • With multiple documents, enable citations on either all of them or none of them.
  • PDF citations use page_location; text documents use character ranges.
  • In streaming, each citation arrives as a separate citations_delta.

Kimi, Composer and Grok

Kimi, Composer and Grok do not return native Anthropic document citations. Search may return text and links, but that is a different format covered in Server tools.

  • Kimi. A substituted document carries section anchors such as file_…#page=3, #slide=2, #sheet=1&part=1 and #section=4. Those are not citations, but you can ask the model to reference pages in the answer text through them. Details on Kimi · Chat Completions.
  • Composer and Grok. No citation mechanism and nothing to replace it with.

Documentation sections

On this page