Skip to main content
When you split a document with the Split API, the classified splits and metadata are returned in a structured JSON format.

Response Structure

The response contains the following top-level fields:
  • splits: Array of split objects containing the classified sub-documents.
  • metadata: Processing information including credit usage, duration, filename, job ID, page count, and model version.

Splits Array (splits)

The splits field contains an array of classified sub-documents. Each split object includes:
  • classification: The Split Type name assigned to this sub-document (for example, “Bank Statement” or “Pay Stub”).
  • identifier: The unique identifier value for this split (for example, “2024-01-15” or “Invoice #12345”). This field is null if no identifier was specified for this Split Type.
  • pages: Array of zero-indexed page numbers that belong to this split.
  • markdowns: Array of Markdown content strings, one for each page in this split. The order matches the pages array.

Classification and Identifiers

The classification field corresponds to the Split Type names you defined in your Split Rules. If the API cannot classify a page, it assigns the classification uncategorized. When you specify an identifier in your Split Rules (such as “Date” or “Invoice Number”), the API creates separate splits for each unique identifier value it finds. The identifier field contains the extracted value (for example, “2024-01-15” or “INV-001”).

Pages and Markdown Content

The pages array lists which pages belong to each split. Pages are zero-indexed, so the first page is 0. Parse numbers pages from 1, so page 0 in a split is page 1 in the parse response’s grounding.page. The markdowns array contains the Markdown content for each page, taken from the Markdown you sent. Each element corresponds to the page at the same index in the pages array. For example, if pages is [0, 1, 2], then markdowns[0] contains the Markdown for page 0, markdowns[1] contains the Markdown for page 1, and markdowns[2] contains the Markdown for page 2.

Processing Metadata (metadata)

The metadata field provides information about the split process:
  • filename: The name of the input Markdown file.
  • org_id: Organization identifier.
  • page_count: Total number of pages in the document.
  • duration_ms: Processing time in milliseconds.
  • credit_usage: Credits consumed, before rounding: the input character count divided by 5,000. The amount billed is this value rounded up to the nearest 0.1 credit. See Credit Consumption.
  • job_id: Unique job identifier.
  • version: Model version used for splitting.

Example Response

This example shows a split response for a three-page document containing one bank statement and two pay stubs. The bank statement has no identifier, so its identifier is null. Each pay stub is identified by its pay date, so the two pay stubs are separate splits even though they share a classification.