Skip to main content
POST
/
batch
/
chunks
JavaScript
import Morphik from 'morphik';

const client = new Morphik({
  apiKey: 'My API Key',
});

const chunkResults = await client.batch.retrieveChunks();

console.log(chunkResults);
[
  {
    "content": "<string>",
    "score": 123,
    "document_id": "<string>",
    "chunk_number": 123,
    "metadata": {},
    "content_type": "<string>",
    "filename": "<string>",
    "download_url": "<string>",
    "is_padding": false
  }
]

Headers

authorization
string

Body

application/json

Request model for batch chunk retrieval.

sources
ChunkSource · object[]

List of chunk sources to retrieve

folder_name

Optional folder scope for the operation. Accepts a single folder name or a list of folder names.

end_user_id
string | null

Optional end-user scope for the operation

use_colpali
boolean | null

Whether to use ColPali embeddings for retrieval

output_format
enum<string> | null

How to return image chunks: base64 data URI (default) or a presigned URL

Available options:
base64,
url

Response

Successful Response

content
string
required
score
number
required
document_id
string
required
chunk_number
integer
required
metadata
Metadata · object
required
content_type
string
required
filename
string | null
download_url
string | null
is_padding
boolean
default:false

Whether this chunk was added as padding