Skip to content

Create Split Job

SplitCreateResponse split().create(SplitCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/split/jobs

Create a document split job.

ParametersExpand Collapse
SplitCreateParams params
Optional<String> organizationId
Optional<String> projectId
String fileInput

File ID or parse job ID

Optional<Configuration> configuration

Split configuration with categories and splitting strategy.

List<SplitCategory> categories

Categories to split documents into.

String name

Name of the category.

maxLength200
minLength1
Optional<String> description

Optional description of what content belongs in this category.

maxLength2000
minLength1
Optional<SplittingStrategy> splittingStrategy

Strategy for splitting documents.

Optional<AllowUncategorized> allowUncategorized

Controls handling of pages that don’t match any category. ‘include’: pages can be grouped as ‘uncategorized’ and included in results. ‘forbid’: all pages must be assigned to a defined category. ‘omit’: pages can be classified as ‘uncategorized’ but are excluded from results.

One of the following:
FORBID("forbid")
INCLUDE("include")
OMIT("omit")
Optional<String> customInstructions

Free-form guidance for where segment boundaries are placed.

maxLength5000
Optional<Long> minPagesPerSplit

Minimum pages per segment. Shorter segments are merged into an adjacent segment; 1 disables merging.

minimum1
Optional<String> configurationId

Saved configuration ID

Optional<String> transactionId

Idempotency key scoped to the project. Reusing a key returns the original job; the new request body is ignored.

maxLength255
Optional<List<String>> webhookConfigurationIds

IDs of saved webhook configurations to notify for this job.

Optional<List<WebhookConfiguration>> webhookConfigurations

Outbound webhook endpoints to notify on job status changes

Optional<List<WebhookEvent>> webhookEvents

Events to subscribe to (e.g. ‘parse.success’, ‘extract.error’). If null, all events are delivered.

One of the following:
BATCH_CANCELLED("batch.cancelled")
BATCH_ERROR("batch.error")
BATCH_PENDING("batch.pending")
BATCH_RUNNING("batch.running")
BATCH_SUCCESS("batch.success")
CLASSIFY_CANCELLED("classify.cancelled")
CLASSIFY_ERROR("classify.error")
CLASSIFY_PARTIAL_SUCCESS("classify.partial_success")
CLASSIFY_PENDING("classify.pending")
CLASSIFY_RUNNING("classify.running")
CLASSIFY_SUCCESS("classify.success")
EXTRACT_CANCELLED("extract.cancelled")
EXTRACT_ERROR("extract.error")
EXTRACT_PARTIAL_SUCCESS("extract.partial_success")
EXTRACT_PENDING("extract.pending")
EXTRACT_SUCCESS("extract.success")
PARSE_CANCELLED("parse.cancelled")
PARSE_ERROR("parse.error")
PARSE_PARTIAL_SUCCESS("parse.partial_success")
PARSE_PENDING("parse.pending")
PARSE_RUNNING("parse.running")
PARSE_SUCCESS("parse.success")
SHEETS_CANCELLED("sheets.cancelled")
SHEETS_ERROR("sheets.error")
SHEETS_PARTIAL_SUCCESS("sheets.partial_success")
SHEETS_PENDING("sheets.pending")
SHEETS_SUCCESS("sheets.success")
SPLIT_CANCELLED("split.cancelled")
SPLIT_ERROR("split.error")
SPLIT_PENDING("split.pending")
SPLIT_PROCESSING("split.processing")
SPLIT_SUCCESS("split.success")
UNMAPPED_EVENT("unmapped_event")
Optional<WebhookHeaders> webhookHeaders

Custom HTTP headers sent with each webhook request (e.g. auth tokens)

Optional<String> webhookOutputFormat

Response format sent to the webhook: ‘string’ (default) or ‘json’

Optional<String> webhookSigningSecret

Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the ‘LC-Signature’ header (value ‘sha256=’). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

Optional<String> webhookUrl

URL to receive webhook POST notifications

ReturnsExpand Collapse
class SplitCreateResponse:

A split job.

String id

Unique identifier for the split job.

List<SplitCategory> categories

Categories used for splitting.

String name

Name of the category.

maxLength200
minLength1
Optional<String> description

Optional description of what content belongs in this category.

maxLength2000
minLength1
DocumentInputType documentInputType

Whether the input was a file or parse job

One of the following:
FILE_ID("file_id")
PARSE_JOB_ID("parse_job_id")
URL("url")
String fileInput

File ID or parse job ID

String projectId

Project this job belongs to.

String status

Current job status. Valid values are: pending, processing, completed, failed, cancelled.

String userId

User who created this job.

Optional<String> configurationId

Split configuration ID used for this job.

Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<String> errorMessage

Error message if the job failed.

Optional<SplitResultResponse> result

Result of a completed split job.

List<SplitSegmentResponse> segments

List of document segments.

String category

Category name this split belongs to.

String confidenceCategory

Categorical confidence level. Valid values are: high, medium, low.

List<long> pages

1-indexed page numbers in this split.

Optional<SplittingStrategy> splittingStrategy

Strategy used for splitting.

Optional<AllowUncategorized> allowUncategorized

Controls handling of pages that don’t match any category. ‘include’: pages can be grouped as ‘uncategorized’ and included in results. ‘forbid’: all pages must be assigned to a defined category. ‘omit’: pages can be classified as ‘uncategorized’ but are excluded from results.

One of the following:
FORBID("forbid")
INCLUDE("include")
OMIT("omit")
Optional<String> customInstructions

Free-form guidance for where segment boundaries are placed.

maxLength5000
Optional<Long> minPagesPerSplit

Minimum pages per segment. Shorter segments are merged into an adjacent segment; 1 disables merging.

minimum1
Optional<String> transactionId

Idempotency key scoped to the project, if one was provided.

Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time

Create Split Job

package ai.llamaindex.llamacloud.example;

import ai.llamaindex.llamacloud.client.LlamaCloudClient;
import ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;
import ai.llamaindex.llamacloud.models.split.SplitCreateParams;
import ai.llamaindex.llamacloud.models.split.SplitCreateResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();

        SplitCreateParams params = SplitCreateParams.builder()
            .fileInput("dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
            .build();
        SplitCreateResponse split = client.split().create(params);
    }
}
{
  "id": "id",
  "categories": [
    {
      "name": "x",
      "description": "x"
    }
  ],
  "document_input_type": "file_id",
  "file_input": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "project_id",
  "status": "status",
  "user_id": "user_id",
  "configuration_id": "configuration_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "result": {
    "segments": [
      {
        "category": "category",
        "confidence_category": "confidence_category",
        "pages": [
          0
        ]
      }
    ]
  },
  "splitting_strategy": {
    "allow_uncategorized": "forbid",
    "custom_instructions": "Start a new segment at every signature page.",
    "min_pages_per_split": 1
  },
  "transaction_id": "transaction_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "id": "id",
  "categories": [
    {
      "name": "x",
      "description": "x"
    }
  ],
  "document_input_type": "file_id",
  "file_input": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "project_id": "project_id",
  "status": "status",
  "user_id": "user_id",
  "configuration_id": "configuration_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "result": {
    "segments": [
      {
        "category": "category",
        "confidence_category": "confidence_category",
        "pages": [
          0
        ]
      }
    ]
  },
  "splitting_strategy": {
    "allow_uncategorized": "forbid",
    "custom_instructions": "Start a new segment at every signature page.",
    "min_pages_per_split": 1
  },
  "transaction_id": "transaction_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/