Skip to content
Questions?PaperOffice AI Phone Agent 24/7+1 415 417 0945
Academy Contact Overview Overview News News

Split Agent: REST API and MCP

The Split Agent can be started without the app: with a saved agent, or ad hoc with a workflow template. Both routes create the same parts as in the app.

Run a saved Split Agent

POST /latest/documents/split-agent-run

Runs a Split Agent that was set up in the app. The call needs the ID of the agent and exactly one source.

ParameterMeaning
split_agent_id requiredID of the saved Split Agent.
filePDF file uploaded with the call. Source, one of three.
pofidID of a document already stored in PaperOffice. Source, one of three.
file_urlURL from which the PDF is fetched. Source, one of three.
workspace_id | workspace_name optionalTarget workspace for a new upload, given by ID or by name.
client_wait optionalIf set to true, the call waits until the documents have been imported.
Default value: false
wait_timeout_sec optionalMaximum waiting time in seconds, from 10 to 600. If the time runs out, processing continues in the background.
Default value: 300

Split ad hoc without a saved agent

POST /latest/job/add/workflow

Starts a split as a workflow job. The settings are passed with the call.

ParameterMeaning
template requiredWorkflow template for the split. Fixed value: pdf_ai_split
naming_instruction optionalInstruction for building the filenames.
locale optionalLanguage and format of the output, for example of the document type names. Set it explicitly for any output language other than the default value.
document_types optionalList of the document types to recognize.
date_format optionalDate format in the filenames.
model optionalProcessing level:
  • basic: boundaries and filenames
  • premium: additionally document type, date and sender for each document
  • ultra: additionally the reasons for every cut

This route always runs asynchronously. The first response returns a job, not the parts. Query the job with the following route or receive the result by webhook:

GET /latest/job/get/{job_id}

Audit trail for Ultra runs

GET /latest/documents/split-audit-trail

Returns every page with its role, every boundary with confidence and reasons, the corrections made and the resulting parts.

ParameterMeaning
job_id optionalID of the job.
pofid optionalID of a document created by the split.

MCP

The MCP server provides the agent run as a tool:

po_documents_split_agent_run

How to split a scanned PDF stack into separate documentsBack to the Split Agent

PaperOffice AI · Problem Solver

Tell us what costs you time every day.

Just describe it. No technical terms needed.

Or start with an example

How would you like to use PaperOffice?

Computer and smartphone are connected: workspace on the computer, capture on the phone.

Where would you like to start?

The full workspace is optimized for the computer. The mobile version is for capturing, reviewing, and approving documents.

Register free app.paperoffice.ai

Start on the computer

A personal access link will be sent to the email address provided.

Open PaperOffice Mobile

Capture and work with documents directly on the smartphone.

Open mobile version