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:

  1. Create a chat session and get conversation IDs
    Call POST /v1/chat to start a conversation and receive threadId and turnId.

  2. Get AI chat response
    Call GET /v1/chat/response/{threadId}/{turnId} to retrieve the AI-generated reply.

  3. Get citations for the response
    Call GET /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 allowed
    • X-RateLimit-Remaining: Remaining requests
    • X-RateLimit-Reset: Reset timestamp (Unix)

Path Parameters

FieldTypeRequiredDescription
threadIdstringConversation thread ID from /v1/chat
turnIdstringTurn ID of the specific chat reply

Header Parameters

FieldTypeRequiredDescription
AuthorizationstringBearer token for API authentication
X-User-IDstringUnique 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 CodeMeaning
200List of citations for the response
400Invalid thread ID or turn ID format
401Unauthorized - Invalid or missing API key
404Thread, turn, or citations not found
429Too Many Requests - Rate limit exceeded
500Internal 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.