Skip to Content
Docs

Return the cited chunk and its source

GET
/api/sources/{source_id}/chunk

The chunk behind a citation, found by its content key, else by its excerpt, with what the reader needs about its source. 404 when the caller cannot see the source, or with reason chunk_missing when neither finds the chunk (the source was edited); 501 with reason unsupported when the vector store cannot look chunks up. Args: source_id: The source the citation names.

Returns: Response: {"success", "chunk", "source", "page_path"}, or an error with reason chunk_missing (404) or unsupported (501) the reader tells apart from a source out of reach.

Personal access token scope: sources:read.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Path Parameters

source_id*string

Query Parameters

chunk_key?string

The citation's chunk_key: the MD5 of the chunk text

excerpt?string

Optional: the start of the cited passage, searched when the key misses

Response Body

Success

Example Request
curl -X GET 'http://localhost:7091/api/sources/string/chunk'
Example Response200
Empty