Skip to main content
POST
Split a document into topics

Overview

Pipeline Step 2 (optional) — Split requires a prior extraction. After splitting, use schema extraction with split_id to apply per-topic schemas.
Identify which pages of a document contain each topic or section. The /split endpoint analyzes a saved extraction and uses AI to map pages to your defined topics. This is useful for:
  • Processing multi-section documents (e.g., annual reports, contracts)
  • Applying different schemas to different parts of a document
  • Organizing large documents by content type
This endpoint operates on saved extractions (created via /extract with storage enabled, which is the default).
To split many extractions at once, use Batch Split.

Async Mode

Set async: true to return immediately with a job ID for polling. See Polling for Results for details.

Request

Request Body

Inline Config (split_config)

Each topic in the split_input array:

Response

Synchronous Response (200)

Async Response (202)


Example Usage

Split with Inline Config

Split with Saved Config Reference

Example Response


Using Split Results

After splitting, use the split_id with the /schema endpoint (split mode) to apply per-topic schemas:

Error Responses


Best Practices

Topic names become keys in the response and are used with /schema (split mode). Use clear, descriptive names like financial_statements rather than section_1.
The description field helps the AI accurately identify relevant pages. Be specific about what content belongs to each topic.
For documents with many pages, set async: true to avoid request timeouts. See Polling for Results.

Authorizations

x-api-key
string
header
required

Body

application/json

Request body for splitting a document into topics. Provide EITHER split_config (inline) OR split_config_id (reference).

extraction_id
string<uuid>
required

ID of the saved extraction to split.

split_config
object

Inline split configuration with topics. Required if split_config_id is not provided.

split_config_id
string<uuid>

Reference to a saved split configuration. Use this instead of providing split_config inline.

async
boolean
default:false

If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously.

Response

Split result with page assignments (when async=false or omitted)

Result of document splitting with page assignments.

split_id
string<uuid>
required

Unique identifier for this split result. Use this ID with the /schema endpoint (split mode) to apply schemas to specific page groups.

split_output
object
required

Page assignments per topic.

credits_used
number<float> | null

Number of credits consumed by this request. Only present when the organization has the credit billing system enabled.

plan_info
object

Billing tier and cumulative usage information for the calling org, including this split run.