Documents
Filter documents by name
Filter documents by collection ID
The number of documents to return
10The offset of the first document to return
0The order by field to sort the documents by.
idPossible values: The direction to order the documents by.
ascPossible values: Successful Response
Validation Error
GET /v1/documents HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The file to create a document from. If not provided, the document will be created without content, use POST /v1/documents/{document_id}/chunks to fill it.
Name of document if no file is provided or to override file name.
The collection ID to use for the file upload. The file will be vectorized with model defined by the collection.
Whether to disable RecursiveCharacterTextSplitter chunking for the upload file.
falseThe size in characters of the chunks to use for the upload file. If not provided, the document will not be split into chunks.
2048The minimum size in characters of the chunks to use for the upload file.
0The overlap in characters of the chunks to use for the upload file.
0Whether the separator is a regex to use for the upload file.
falseDelimiters used by RecursiveCharacterTextSplitter for further splitting. If provided, preset_separators is ignored.
[]Preset separators used by RecursiveCharacterTextSplitter for further splitting. See implemented details.
markdownPossible values: Optional additional metadata to add to each chunk if a file is provided. Provide a stringified JSON object matching the Metadata schema.
""Example: {"source_date": "2026-01-05", "source_tags": ["tag1", "tag2"]}Successful Response
The ID of the document created.
Validation Error
POST /v1/documents HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 293
{
"file": "text",
"name": "text",
"collection_id": 1,
"disable_chunking": false,
"chunk_size": 2048,
"chunk_min_size": 0,
"chunk_overlap": 0,
"is_separator_regex": false,
"separators": [
"text"
],
"preset_separators": "markdown",
"metadata": "{\"source_date\": \"2026-01-05\", \"source_tags\": [\"tag1\", \"tag2\"]}"
}{
"id": 1,
"ANY_ADDITIONAL_PROPERTY": "anything"
}The document ID
Successful Response
The type of the object.
documentThe ID of the document.
The name of the document.
The ID of the collection the document belongs to.
The date of the document creation.
The number of chunks the document has.
0The size of the document in tokens.
0Validation Error
GET /v1/documents/{document_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "document",
"id": 1,
"name": "text",
"collection_id": 1,
"created": 1,
"chunks": 0,
"size": 0,
"ANY_ADDITIONAL_PROPERTY": "anything"
}The document ID
Successful Response
No content
Validation Error
DELETE /v1/documents/{document_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The document ID
The number of chunks to return
10The offset of the first chunk to return
0Successful Response
Validation Error
GET /v1/documents/{document_id}/chunks HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The document ID
Successful Response
Validation Error
POST /v1/documents/{document_id}/chunks HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 151
{
"chunks": [
{
"content": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}No content
The document ID
The chunk ID
Successful Response
Validation Error
GET /v1/documents/{document_id}/chunks/{chunk_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
The document ID
The chunk ID
Successful Response
No content
Validation Error
DELETE /v1/documents/{document_id}/chunks/{chunk_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Last updated
Was this helpful?