2 creditsPDF Classify API — label a document with your own categories
Give it your own label set; get back the best match, a confidence score, and low-confidence routing to human review.
Classify sends the text of the pages you choose (`pages: "all"`, `"first"`, or an explicit page list) to an LLM against a label set you define — each label just needs a `name` and a short `description`, at least two and up to a practical cap. The response returns the best-matching label and a confidence score; anything below the confidence threshold is flagged `needs_review` and handed to the same review queue the schema-extraction tools use, rather than silently returned as a guess. A scanned page with no text layer is OCR'd first automatically, at extra cost reflected in the response.
How does the PDF Classify API work?
One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.
curl -X POST 'https://api.ashdocs.com/api/v2/tools/pdf-classify' \
-H 'X-API-Key: ash_live_...' \
-F 'file=@document.pdf' -F 'options={"labels":[{"name":"invoice","description":"a bill for goods or services"},{"name":"contract","description":"a signed legal agreement"}],"pages":"first"}'Common use cases
- →Sorting an inbound documents folder by type
- →Routing a mixed upload queue to the right downstream pipeline
- →Flagging ambiguous documents for human review instead of guessing
Frequently asked questions
How much does the PDF Classify API tool cost?+
2 credits per successful call. Sandbox keys (prefix ash_test_) run the tool end-to-end without ever consuming credits — use them in CI or for tuning.
What is the endpoint URL for this tool?+
The endpoint is documented in the curl example on this page. All ASHDOCS endpoints share the base URL https://www.ashdocs.com and require an X-API-Key header.
Can I run this tool inside Make, Zapier, or n8n?+
Yes — through each platform's built-in HTTP mechanism (Make's HTTP module, Webhooks by Zapier, n8n's HTTP Request node). Nothing to install: point it at this exact endpoint with your X-API-Key header. See /integrations/make, /integrations/zapier or /integrations/n8n for step-by-step setup.
Does this tool support batch or scheduled runs?+
Yes. POST /api/v1/batch runs any tool over up to 50 files with a single credit ledger entry, and pipeline schedules let you trigger the same tool on a cron. Both are documented in /docs.