import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/ \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"document_id": "<string>",
"content": "<string>",
"blocks": [
{}
],
"previous_chunk_id": "<string>",
"next_chunk_id": "<string>",
"start_char_idx": 123,
"end_char_idx": 123
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Chunk not found."
}Get a single chunk by id (version-agnostic)
Fetch one chunk row by its id, independent of which extractor version produced it. Chunk ids are random UUIDs (unique within the chunk table), so the lookup is unambiguous and does not require the extractor version.
Used by the standalone reference viewer
(/<project_id>/reference/<chunk_id>) so a citation still resolves even
when the chunk was created by an old / non-default extractor version.
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/chunks/{chunk_id}/ \
--header 'Authorization: Bearer <token>'{
"id": "<string>",
"document_id": "<string>",
"content": "<string>",
"blocks": [
{}
],
"previous_chunk_id": "<string>",
"next_chunk_id": "<string>",
"start_char_idx": 123,
"end_char_idx": 123
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error": "Chunk not found."
}Authorizations
Use Authorization: Bearer <token>. The token is either a user token / OAuth access
token, or a service-account API key (cfk_...). A key is valid on every endpoint and
acts as its service account, an organization member with per-store permissions.
Refused keys answer 403 with Invalid API key., API key revoked.,
API key expired. or API key disabled..
Path Parameters
Response
The chunk row.