For the complete documentation index, see llms.txt. This page is also available as Markdown.

Documents

Get Documents

get

Get all documents ID from a collection.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
namestring · nullableOptional

Filter documents by name

collection_idinteger · nullableOptional

Filter documents by collection ID

limitinteger · min: 1 · max: 100Optional

The number of documents to return

Default: 10
offsetintegerOptional

The offset of the first document to return

Default: 0
order_bystring · enumOptional

The order by field to sort the documents by.

Default: idPossible values:
order_directionstring · enumOptional

The direction to order the documents by.

Default: ascPossible values:
Responses
200

Successful Response

application/json
anyOptional
get/v1/documents
GET /v1/documents HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Create Document

post

Upload a file, parse and split it into chunks, then create a document. If no file is provided, the document will be created without content, use POST /v1/documents/{document_id}/chunks to fill it.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
filestring · nullableOptional

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.

namestring · nullableOptional

Name of document if no file is provided or to override file name.

collection_idinteger · nullableOptional

The collection ID to use for the file upload. The file will be vectorized with model defined by the collection.

disable_chunkingbooleanOptional

Whether to disable RecursiveCharacterTextSplitter chunking for the upload file.

Default: false
chunk_sizeintegerOptional

The size in characters of the chunks to use for the upload file. If not provided, the document will not be split into chunks.

Default: 2048
chunk_min_sizeintegerOptional

The minimum size in characters of the chunks to use for the upload file.

Default: 0
chunk_overlapintegerOptional

The overlap in characters of the chunks to use for the upload file.

Default: 0
is_separator_regexbooleanOptional

Whether the separator is a regex to use for the upload file.

Default: false
separatorsstring[]Optional

Delimiters used by RecursiveCharacterTextSplitter for further splitting. If provided, preset_separators is ignored.

Default: []
preset_separatorsstring · enumOptional

Preset separators used by RecursiveCharacterTextSplitter for further splitting. See implemented details.

Default: markdownPossible values:
metadatastringOptional

Optional additional metadata to add to each chunk if a file is provided. Provide a stringified JSON object matching the Metadata schema.

Default: ""Example: {"source_date": "2026-01-05", "source_tags": ["tag1", "tag2"]}
Responses
201

Successful Response

application/json
idintegerRequired

The ID of the document created.

Other propertiesanyOptional
post/v1/documents
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"
}

Get Document

get

Get a document by ID.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

Responses
200

Successful Response

application/json
objectconst: documentOptional

The type of the object.

Default: document
idintegerRequired

The ID of the document.

namestring · min: 1Required

The name of the document.

collection_idintegerRequired

The ID of the collection the document belongs to.

createdintegerRequired

The date of the document creation.

chunksintegerOptional

The number of chunks the document has.

Default: 0
sizeintegerOptional

The size of the document in tokens.

Default: 0
Other propertiesanyOptional
get/v1/documents/{document_id}
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"
}

Delete Document

delete

Delete a document.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

Responses
204

Successful Response

No content

delete/v1/documents/{document_id}
DELETE /v1/documents/{document_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get Document Chunks

get

Get chunks of a document.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

Query parameters
limitinteger · min: 1 · max: 100Optional

The number of chunks to return

Default: 10
offsetintegerOptional

The offset of the first chunk to return

Default: 0
Responses
200

Successful Response

application/json
anyOptional
get/v1/documents/{document_id}/chunks
GET /v1/documents/{document_id}/chunks HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Create Document Chunks

post

Fill document with chunks.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

Body
Other propertiesanyOptional
Responses
201

Successful Response

application/json
anyOptional
post/v1/documents/{document_id}/chunks
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

Get Document Chunk

get

Get a chunk of a document.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

chunk_idintegerRequired

The chunk ID

Responses
200

Successful Response

application/json
anyOptional
get/v1/documents/{document_id}/chunks/{chunk_id}
GET /v1/documents/{document_id}/chunks/{chunk_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Delete Document Chunk

delete

Delete a chunk of a document.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
document_idintegerRequired

The document ID

chunk_idintegerRequired

The chunk ID

Responses
204

Successful Response

No content

delete/v1/documents/{document_id}/chunks/{chunk_id}
DELETE /v1/documents/{document_id}/chunks/{chunk_id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?