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",
      "organization_id": "org_abc123",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice_batch.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "output": [
        {"name": "invoice", "pages": [1, 2, 3], "partitions": []}
      ],
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "split_01G34H8J2K",
    "total_count": 12
  }
}
List persisted splits for your organization, with cursor-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",
      "organization_id": "org_abc123",
      "file": {
        "id": "file_6dd6eb00688ad8d1",
        "filename": "invoice_batch.pdf",
        "mime_type": "application/pdf"
      },
      "model": "retab-small",
      "output": [
        {"name": "invoice", "pages": [1, 2, 3], "partitions": []}
      ],
      "created_at": "2024-03-15T10:30:00Z",
      "updated_at": "2024-03-15T10:30:00Z"
    }
  ],
  "list_metadata": {
    "before": null,
    "after": "split_01G34H8J2K",
    "total_count": 12
  }
}

Query Parameters

before
string
Cursor for backward pagination.
after
string
Cursor for forward pagination.
limit
integer
default:"10"
Maximum number of splits to return.
order
string
default:"desc"
Sort order by created_at. Valid values: asc, desc.
filename
string
Case-insensitive substring filter applied to file.filename.
from_date
string
Return splits created on or after this date, in YYYY-MM-DD format.
to_date
string
Return splits created on or before this date, in YYYY-MM-DD format.

Count

GET /v1/splits/count?filename=invoice&from_date=2024-01-01
returns { "count": <int> }.

Authorizations

Api-Key
string
header
required

Query Parameters

before
string | null
after
string | null
limit
integer
default:10
order
enum<string>
default:desc
Available options:
asc,
desc
filename
string | null
from_date
string | null
to_date
string | null
access_token
string | null

Response

Successful Response

data
any[]
required
list_metadata
ListMetadata · object
required