Skip to content

Cancel Split Job

SplitCancelResponse split().cancel(SplitCancelParamsparams = SplitCancelParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/split/jobs/{split_job_id}/cancel

Cancel a running split job.

Requests cancellation; the job transitions to CANCELLED asynchronously once processing stops. Returns the job, which may still be in its current non-terminal state. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.

ParametersExpand Collapse
SplitCancelParams params
Optional<String> splitJobId
Optional<String> organizationId
Optional<String> projectId
ReturnsExpand Collapse
class SplitCancelResponse:

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

Cancel 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.SplitCancelParams;
import ai.llamaindex.llamacloud.models.split.SplitCancelResponse;

public final class Main {
    private Main() {}

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

        SplitCancelResponse response = client.split().cancel("split_job_id");
    }
}
{
  "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/