Skip to main content
POST
Split a multi-page document into labeled subdocuments and return the canonical split resource. This endpoint is split-only: key-based grouping belongs to /v1/partitions.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body to create a split.

document
MIMEData · object
required

The document to split

subdocuments
Subdocument · object[]
required

The subdocuments to split the document into

model
string
default:retab-small

The model to use to split the document

instructions
string | null

Free-form instructions appended to the system prompt to steer the split.

n_consensus
integer
default:1

Number of consensus split runs to perform. Uses deterministic single-pass when set to 1.

bust_cache
boolean
default:false

If true, skip the LLM cache and force a fresh completion

background
boolean
default:false

If true, run asynchronously: returns immediately with status 'queued' and an empty output. Poll GET /v1//{id} until status is terminal. Mutually exclusive with stream.

Response

Successful Response

A split result: a document divided into its constituent subdocuments.

id
string
required

Unique identifier of the split result

file
FileRef · object
required

Information about the split file

model
string
required

Model used for the split operation

subdocuments
Subdocument · object[]
required

Subdocuments used for the split operation

n_consensus
integer
default:1

Number of consensus votes used

instructions
string | null

Free-form instructions supplied with the split request.

output
SplitResult · object[]

The list of document splits with their assigned pages. Empty [] until status == 'completed'.

status
enum<string>
default:pending

Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.

Available options:
pending,
queued,
in_progress,
completed,
failed,
cancelled
error
PrimitiveError · object | null

Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.

consensus
SplitConsensus · object | null

Consensus metadata for multi-vote split runs

usage
RetabUsage · object | null

Usage information for the split operation

created_at
string<date-time> | null