Skip to main content
POST
Plan Document Split

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenant
string | null
required

The domain of the customer

Example:

"example.com"

Body

application/json
document_id
string
required

The document ID of the files

document_classes
TargetDocumentClass · object[]
required

The document classes to split the document into.

llm_provider
enum<string> | null

The LLM provider to use. If not provided, the default provider will be used.

Available options:
OpenAI,
Google,
Altirnao,
MistralAI,
Anthropic
llm_model_prefix
string | null

The prefix of the LLM model name to use. If not provided, the default model will be used.

Example:

"gemini-2.5-pro"

instruction
string | null

Instruction to use when splitting the document.

batch_size
integer
default:50

Number of pages to process per batch for large documents. Documents with fewer pages than this will be processed in a single batch.

maximal_batch_overlap
integer
default:10

Number of pages to overlap between batches. This helps prevent splits from being cut off at batch boundaries.

Required range: x >= 0
pubsub_topic
string | null

If provided, a notifications will be sent to this Pub/Sub topic upon completion.

Response

Successful Response

source_document_id
string
required

The ID of the original document that was split.

document_splits
DocumentSplit · object[]
required

The list of document splits created as a result of the split.

status
enum<string>
required

Job status: 'in_progress', 'completed', or 'failed'.

Available options:
in_progress,
completed,
failed
job_id
string | null

Job ID if split is in progress. Null when completed.

total_pages
integer | null

Total pages in the document.

pages_processed
integer | null

Pages processed so far.

error_message
string | null

Error message if job failed.