Add citations.enabled: true to every document block. Claude returns multiple text blocks, and supported claims include a citations array.
{
"type": "document",
"source": {
"type": "base64",
"media_type": "application/pdf",
"data": "<PDF_BASE64>"
},
"title": "Report.pdf",
"citations": {"enabled": true}
}{
"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 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=1and#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.
GLM does not publish one normalized citation object across all three APIs. Built-in search returns native search data for the selected protocol; links written in model text remain model output.
| API | Where to find confirmed search |
|---|---|
| Chat | The terminal web_search array beside choices/usage. |
| Messages | A server_tool_use (web_search) with its web_search_tool_result of web_search_result rows; the paid search count is usage.server_tool_use.web_search_requests. |
| Responses | A completed web_search_call item/event. |
No separate native citation contract is declared for an uploaded PDF. Ask the model to name a page in text and verify it in your application.
Gemini search sources come in the form of the selected API: in Messages, web_search_tool_result blocks and a citations field on the text with web_search_result_location items; in Chat Completions, annotations with url_citation; in Responses, url_citation in the text annotations. When search runs together with client tools, Messages has no citations field, and Guard finds the url_citation positions in Chat Completions and Responses by where the source address occurs in the text.
Gemini does not support citations of your own documents (citations: {"enabled": true} on a PDF): only {"enabled": false} is accepted, otherwise the request gets the error gemini_parameter_unsupported.
Muse search sources come in the form Meta returns them for the selected API.