Skip to main content
POST
/
v1
/
splits
/
{split_id}
/
cancel
from retab import Retab

client = Retab()

split = client.splits.create_split_cancel("splt_01G34H8J2K")
print(split.status)
{
  "id": "splt_01G34H8J2K",
  "status": "cancelled",
  "error": null
}
Cancel an in-flight background Split run (one created with background: true). Cancellation is idempotent: a run that has already reached a terminal state (completed, failed, or cancelled) is returned unchanged rather than erroring.
from retab import Retab

client = Retab()

split = client.splits.create_split_cancel("splt_01G34H8J2K")
print(split.status)
{
  "id": "splt_01G34H8J2K",
  "status": "cancelled",
  "error": null
}

Authorizations

Api-Key
string
header
required

Path Parameters

split_id
string
required

Response

Successful Response

A split result: a document divided into its constituent subdocuments.

id
string
required

Unique identifier of the split result

file
FileRef · object
required

Information about the split file

model
string
required

Model used for the split operation

subdocuments
Subdocument · object[]
required

Subdocuments used for the split operation

n_consensus
integer
default:1

Number of consensus votes used

instructions
string | null

Free-form instructions supplied with the split request.

output
SplitResult · object[]

The list of document splits with their assigned pages. Empty [] until status == 'completed'.

status
enum<string>
default:pending

Lifecycle status. The synchronous path returns 'completed'. Background runs progress pending -> queued -> in_progress -> completed | failed | cancelled.

Available options:
pending,
queued,
in_progress,
completed,
failed,
cancelled
error
PrimitiveError · object

Error details when a background run fails; null otherwise. Always present so consumers can read it without an existence check.

consensus
SplitConsensus · object

Consensus metadata for multi-vote split runs

usage
RetabUsage · object

Usage information for the split operation

created_at
string<date-time> | null