Skip to main content

Classification

The classification API takes a document (PDF or image) and returns its type — one of 17 Brazilian document types or UNKNOWN. Use it when you don't know what kind of document you're handling, or when you want to verify your in-house classification is correct.

Modes

Returns the result inline in 3-5 seconds. Best for interactive UX — user uploads a file and sees the classification immediately. File size capped at 3 MB (effective base64 content).

Auto-validate chain

Pass auto_validate: true and DVS will automatically run the validation pipeline once the type is known. You receive two events: classification.completed and validation.completed, both sharing the same correlation_id so you can stitch them in your system.

This is the simplest path for "give me a document and tell me if it's valid".

What classification does NOT do

  • It does not validate content correctness (CID present, dose valid, doctor licensed, etc.) — that's the job of Validation.
  • It does not check eligibility with the payer.
  • It does not run OCR for downstream extraction — only classifies the type.