from datetime import datetime
from retab import Retab
client = Retab()
partitions = client.partitions.list(limit=20, order="desc")
for partition in partitions.data:
print(f"{partition.id}: {partition.file.filename}")
partitions = client.partitions.list(
from_date=datetime(2024, 1, 1),
to_date=datetime(2024, 12, 31),
limit=50,
)
{
"data": [
{
"id": "part_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "invoice_batch.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"key": "invoice_number",
"instructions": "Return one chunk per invoice number and keep all pages for the same invoice together.",
"n_consensus": 3,
"allow_overlap": true,
"output": [
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
],
"consensus": {
"likelihoods": [
{"key": 0.99, "pages": [0.99, 0.98]},
{"key": 0.96, "pages": [0.95, 0.95]}
],
"choices": [
[
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
]
]
},
"usage": {
"credits": 3.0
},
"created_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "part_01G34H8J2K",
"total_count": 12
}
}
from datetime import datetime
from retab import Retab
client = Retab()
partitions = client.partitions.list(limit=20, order="desc")
for partition in partitions.data:
print(f"{partition.id}: {partition.file.filename}")
partitions = client.partitions.list(
from_date=datetime(2024, 1, 1),
to_date=datetime(2024, 12, 31),
limit=50,
)
{
"data": [
{
"id": "part_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "invoice_batch.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"key": "invoice_number",
"instructions": "Return one chunk per invoice number and keep all pages for the same invoice together.",
"n_consensus": 3,
"allow_overlap": true,
"output": [
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
],
"consensus": {
"likelihoods": [
{"key": 0.99, "pages": [0.99, 0.98]},
{"key": 0.96, "pages": [0.95, 0.95]}
],
"choices": [
[
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
]
]
},
"usage": {
"credits": 3.0
},
"created_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "part_01G34H8J2K",
"total_count": 12
}
}
List persisted partitions for your organization, with id-based pagination and optional filename / date filtering.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.
from datetime import datetime
from retab import Retab
client = Retab()
partitions = client.partitions.list(limit=20, order="desc")
for partition in partitions.data:
print(f"{partition.id}: {partition.file.filename}")
partitions = client.partitions.list(
from_date=datetime(2024, 1, 1),
to_date=datetime(2024, 12, 31),
limit=50,
)
{
"data": [
{
"id": "part_01G34H8J2K",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "invoice_batch.pdf",
"mime_type": "application/pdf"
},
"model": "retab-small",
"key": "invoice_number",
"instructions": "Return one chunk per invoice number and keep all pages for the same invoice together.",
"n_consensus": 3,
"allow_overlap": true,
"output": [
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
],
"consensus": {
"likelihoods": [
{"key": 0.99, "pages": [0.99, 0.98]},
{"key": 0.96, "pages": [0.95, 0.95]}
],
"choices": [
[
{"key": "INV-001", "pages": [1, 2]},
{"key": "INV-002", "pages": [3, 4]}
]
]
},
"usage": {
"credits": 3.0
},
"created_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "part_01G34H8J2K",
"total_count": 12
}
}
asc, desc