Know the document type before you parse it.
Send a PDF and PDF4me predicts whether it is an invoice, contract, receipt or another type, with a confidence score. Use it as the routing step that sorts a mixed batch, then parses each file by type.
Classify Document, on every platform.
Add Classify Document as a native no-code action, or call the same operation from the REST API. Build it once, then route on the returned type everywhere.
One POST, one classification.
- Get your API key. Grab a key from the dashboard and send it in the header as
Authorization: Basic YOUR_API_KEY. - POST the document. Base64-encode the PDF and send it as
docContentwith adocNameto/api/v2/ClassifyDocument. - Read the verdict. The response returns
documentType,categoryand aconfidencescore between 0.0 and 1.0. - Branch on confidence. Route high-confidence files automatically; queue low-confidence ones for a quick review.
- Go async for big jobs. Set
async: trueto get a202and aLocationURL you poll until the result is ready.
curl -X POST https://api.pdf4me.com/api/v2/ClassifyDocument \
-H "Authorization: Basic YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"docContent": "<base64 PDF>",
"docName": "incoming.pdf"
}'A clean JSON verdict, ready to route on.
documentType— The identified type of the document, such as invoice, contract or report.category— The broader group the document belongs to, for example financial, legal or business.confidence— A score from 0.0 to 1.0 for how sure the model is. The threshold for auto-routing is yours to set.metadata— Extra document details returned alongside the result, including page count and creation date.
{
"documentType": "invoice",
"category": "financial",
"confidence": 0.95,
"metadata": {
"pageCount": 1,
"createdDate": "2024-01-15T10:30:00Z"
}
}Three ways to classify, one place to run them.
Start with built-in detection, tighten it with your own rules, or let an AI Analyzer route and extract together. Each one returns a label your workflow can branch on.
Built-in type detection
Call ClassifyDocument as-is and get documentType, category and confidence with zero configuration. The fastest way to sort a mixed pile.
Your own expression rules
In the dashboard, define Class Names with a Search Text pattern, a Regular Expression or JavaScript. PDF4me matches your rules and returns your Class Name.
AI Classify Analyzer
Create one Analyzer, add a Schema per document variant with a natural-language Classification Prompt. The AI routes each PDF and extracts its fields in one call.
Get your documents done.
Build it into your product with the API, automate it with no code, or use the free tools in your browser. No credit card to begin.
curl -X POST https://api.pdf4me.com/v1/ConvertToPdfFree tier · No credit card required