Skip to main content
POST
/
v1
/
ade
/
classify
cURL
curl -X POST 'https://api.va.landing.ai/v1/ade/classify' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'classes=[{"class":"Class 1","description":"Description of Class 1"},{"class":"Class 2","description":"Description of Class 2"}]' \
  -F 'document=@document.pdf'
{
  "classification": [
    {
      "class": "<string>",
      "page": 123,
      "reason": "",
      "suggested_class": "<string>"
    }
  ],
  "metadata": {
    "filename": "<string>",
    "page_count": 123,
    "duration_ms": 123,
    "credit_usage": 123,
    "org_id": "<string>",
    "job_id": "",
    "version": "<string>"
  }
}

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.