Skip to main content
GET
/
v1
/
splits
from retab import Retab

client = Retab()

splits = client.splits.list(limit=20, order="desc")
for s in splits.data:
    print(f"{s.id}: {s.file.filename}")
{
  "data": [
    {
      "id": "split_01G34H8J2K",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice_batch.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "subdocuments": [
        {
          "name": "invoice",
          "description": "Invoice documents",
          "allow_multiple_instances": true
        }
      ],
      "n_consensus": 1,
      "instructions": null,
      "output": [{ "name": "invoice", "pages": [1, 2, 3] }],
      "consensus": null,
      "usage": {
        "credits": 1.0
      },
      "created_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "split_01G34H8J2K",
    "total_count": 12
  }
}

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.

List persisted splits for your organization, with id-based pagination.
from retab import Retab

client = Retab()

splits = client.splits.list(limit=20, order="desc")
for s in splits.data:
    print(f"{s.id}: {s.file.filename}")
{
  "data": [
    {
      "id": "split_01G34H8J2K",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice_batch.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "subdocuments": [
        {
          "name": "invoice",
          "description": "Invoice documents",
          "allow_multiple_instances": true
        }
      ],
      "n_consensus": 1,
      "instructions": null,
      "output": [{ "name": "invoice", "pages": [1, 2, 3] }],
      "consensus": null,
      "usage": {
        "credits": 1.0
      },
      "created_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "split_01G34H8J2K",
    "total_count": 12
  }
}

Authorizations

Api-Key
string
header
required

Query Parameters

before
string | null
after
string | null
limit
integer
default:10
Required range: 1 <= x <= 100
order
enum<string>
default:desc
Available options:
asc,
desc
filename
string | null
status
enum<string> | null
Available options:
pending,
queued,
in_progress,
completed,
failed,
cancelled
from_date
string | null
to_date
string | null

Response

Successful Response

A page of Split resources. data holds the items and list_metadata carries the before/after cursors; pass after to fetch the next page.

data
Split · object[]
required
list_metadata
ListMetadata · object
required

Boundary resource IDs for page navigation.