Skip to main content
POST
/
v1
/
parses
/
{parse_id}
/
cancel
from retab import Retab

client = Retab()

parse = client.parses.cancel("prs_01G34H8J2K")
print(parse.status)
{
  "id": "prs_01G34H8J2K",
  "status": "cancelled",
  "error": null
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Cancel an in-flight background Parse 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()

parse = client.parses.cancel("prs_01G34H8J2K")
print(parse.status)
{
  "id": "prs_01G34H8J2K",
  "status": "cancelled",
  "error": null
}

Authorizations

Api-Key
string
header
required

Path Parameters

parse_id
string
required

Response

Successful Response

A parse result: the per-page and full-document text extracted from a document.

id
string
required

Unique identifier of the parse

file
FileRef · object
required

Information about the parsed file

model
string
required

Model used for parsing

table_parsing_format
enum<string>
required

Format used to render tables extracted from the document

Available options:
markdown,
yaml,
html,
json
image_resolution_dpi
integer
required

DPI used when rasterizing pages for the parser

output
ParseOutput · object
required

The parsed document content

instructions
string | null

Free-form instructions supplied with the parse request.

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.

usage
RetabUsage · object

Usage information for the parse operation

created_at
string<date-time> | null