from datetime import datetime from retab import Retab client = Retab() classifications = client.classifications.list(limit=20, order="desc") for c in classifications.data: print(f"{c.id}: {c.output.category}") # Filter by date range classifications = client.classifications.list( from_date=datetime(2024, 1, 1), to_date=datetime(2024, 12, 31), limit=50, )
{ "data": [ { "id": "cls_01G34H8J2K", "organization_id": "org_abc123", "file": { "id": "file_6dd6eb00688ad8d1", "filename": "invoice.pdf", "mime_type": "application/pdf" }, "model": "retab-small", "output": { "category": "invoice", "reasoning": "Contains line items and a total amount due." }, "created_at": "2024-03-15T10:30:00Z", "updated_at": "2024-03-15T10:30:00Z" } ], "list_metadata": { "before": null, "after": "cls_01G34H8J2K", "total_count": 42 } }
created_at
asc
desc
file.filename
YYYY-MM-DD
GET /v1/classifications/count?filename=invoice&from_date=2024-01-01
{ "count": <int> }
Successful Response
Show child attributes