Skip to main content
POST
Python

Authorizations

Authorization
string
header
required

Your unique API key for authentication.

Get your API key here: https://va.landing.ai/settings/api-key.

If using the EU endpoint, get your API key here: https://va.eu-west-1.landing.ai/settings/api-key.

Body

multipart/form-data
classes
ClassifyClass · object[]
required

The possible classes that can be assigned to pages in the document. Each entry is an object with a class name and an optional description. Only one class is assigned per page; unclassifiable pages receive 'unknown'. Can be provided as a JSON string in form data.

document
file | null

A file to be classified. Either this parameter or the document_url parameter must be provided.

document_url
string | null

The URL of the document to be classified. Either this parameter or the document parameter must be provided.

model
string | null

Classification model version. Defaults to the latest.

Response

Successful Response

Response model for the classify endpoint.

classification
ClassificationItem · object[]
required
metadata
ClassifyMetadata · object
required

Metadata for the classify response.