Authentication & Scope
Requires thesessions-read ability.
Request
GET /extractions/documents/880e8400-e29b-41d4-a716-446655440000/chunks HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
documentId | uuid | Yes | The document ID |
Response
200 OK – Array of document chunks.
[
{
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"document_id": "880e8400-e29b-41d4-a716-446655440000",
"chunk_index": 0,
"blocks": [
{
"block_id": "doc:page:1:block:0",
"type": "heading",
"content": "Invoice",
"page_ref": "Page 1",
"meta": {}
},
{
"block_id": "doc:page:1:block:1",
"type": "paragraph",
"content": "Invoice Number: INV-2024-001",
"page_ref": "Page 1",
"meta": {}
},
{
"block_id": "doc:page:1:block:2",
"type": "table",
"content": "",
"page_ref": "Page 1",
"meta": {
"table": {
"table_id": "page:1:table:1",
"row_count": 3,
"col_count": 3
}
}
},
{
"block_id": "doc:page:1:block:3",
"type": "table_row",
"content": "Item | Qty | Price",
"page_ref": "Page 1",
"meta": {
"table_row": {
"table_id": "page:1:table:1",
"is_header_row": true,
"cells": [
{ "col_index": 1, "text": "Item" },
{ "col_index": 2, "text": "Qty" },
{ "col_index": 3, "text": "Price" }
]
}
}
}
],
"context": "Page 1",
"visual_context": "- Chart showing quarterly revenue",
"page_range": "Page 1"
}
]
Chunks are only available after document processing is complete (status =
ready).Chunk Properties
| Property | Description |
|---|---|
chunk_index | Order of the chunk within the document |
blocks | Structured array of canonical blocks |
context | Optional AI-generated context prefix |
visual_context | Optional markdown describing visuals |
page_range | Page/slide/sheet range for the chunk |
