Skip to main content
POST
/
v1
/
documents
/
split
/
generate_config
from retab import Retab

client = Retab()

result = client.documents.generate_split_config(
    document="property_portfolio.pdf",
    model="retab-small",
)

for subdocument in result.subdocuments:
    print(subdocument.name, subdocument.description, subdocument.partition_key)
{
  "subdocuments": [
    {
      "name": "property_listing",
      "description": "Property listing pages with photos, pricing, and listing details",
      "partition_key": "property ID"
    },
    {
      "name": "legal_notice",
      "description": "Legal notices, disclaimers, or policy pages",
      "partition_key": null
    }
  ]
}
from retab import Retab

client = Retab()

result = client.documents.generate_split_config(
    document="property_portfolio.pdf",
    model="retab-small",
)

for subdocument in result.subdocuments:
    print(subdocument.name, subdocument.description, subdocument.partition_key)
{
  "subdocuments": [
    {
      "name": "property_listing",
      "description": "Property listing pages with photos, pricing, and listing details",
      "partition_key": "property ID"
    },
    {
      "name": "legal_notice",
      "description": "Legal notices, disclaimers, or policy pages",
      "partition_key": null
    }
  ]
}

Authorizations

Api-Key
string
header
required

Query Parameters

access_token
string | null

Body

application/json
document
MIMEData · object
required

The document to analyze for automatic split configuration generation

model
string
default:retab-small

The model to use for document analysis

Response

Successful Response

subdocuments
Subdocument · object[]
required

The auto-generated subdocument definitions with optional partition keys