Get Citations for an Answer
Retrieve the list of citations and source documents referenced in a specific AI chat response.
Overview
This endpoint returns detailed citation information used by the AI to generate a particular chat reply, helping you provide transparency and source attribution to end users.
Usage Flow
This endpoint is part of a three-step flow:
-
Create a chat session and get conversation IDs
CallPOST /v1/chat
to start a conversation and receivethreadId
andturnId
. -
Get AI chat response
CallGET /v1/chat/response/{threadId}/{turnId}
to retrieve the AI-generated reply. -
Get citations for the response
CallGET /v1/chat/citations/{threadId}/{turnId}
to obtain the sources referenced in that reply.
Endpoint
GET /v1/chat/citations/{threadId}/{turnId}
- Authentication Required: Yes
- Rate Limiting: Applies per organization settings
X-RateLimit-Limit
: Max requests allowedX-RateLimit-Remaining
: Remaining requestsX-RateLimit-Reset
: Reset timestamp (Unix)
Path Parameters
Field | Type | Required | Description |
---|---|---|---|
threadId | string | ✅ | Conversation thread ID from /v1/chat |
turnId | string | ✅ | Turn ID of the specific chat reply |
Header Parameters
Field | Type | Required | Description |
---|---|---|---|
Authorization | string | ✅ | Bearer token for API authentication |
X-User-ID | string | ✅ | Unique identifier for the user making the request |
Example Request
curl --request GET \
--url https://example.com/v1/v1/chat/citations/threadId/turnId \
--header 'accept: application/json'
import requests
url = "https://example.com/v1/v1/chat/citations/threadId/turnId"
headers = {"accept": "application/json"}
response = requests.get(url, headers=headers)
print(response.text)
Example Response
[
{
"citationId": 0,
"id": "abc123",
"publisher_id": "news-site",
"url": "https://example.com/article",
"domain": "example.com",
"title": "Example Article Title",
"date": "2025-07-02",
"source": "Example News",
"first_words": "This is the start of the article...",
"image": "https://example.com/image.jpg",
"favicon": "https://example.com/favicon.ico",
"favicon40": "https://example.com/favicon-40.png",
"favicon24": "https://example.com/favicon-24.png"
}
]
Response Codes
Status Code | Meaning |
---|---|
200 | List of citations for the response |
400 | Invalid thread ID or turn ID format |
401 | Unauthorized - Invalid or missing API key |
404 | Thread, turn, or citations not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal server error |
What’s Next?
After retrieving citations, you can:
- Display them alongside AI responses to increase trust and transparency.
- Link users directly to source documents.
- Analyze the origin of AI information for quality control.
Updated 8 days ago