Classify document by type (sync)
Note: Use this Classify endpoint for testing. Use the asynchronous Classify endpoint for production.
Score a document’s similarity to each document type you defined in your Sensible account. Get scores for the document’s similarity to document types and to their reference documents.
Use this endpoint:
- In an extraction workflow. For example, determine which documents to extract prior to calling a Sensible extraction endpoint.
- Outside an extraction workflow. For example, determine where to route each document or to label each document in a system of record.
To post the document bytes, specify the non-encoded document bytes as the entire request body,and specify the Content-Type
header, for example,“application/pdf” or “image/jpeg”.
For supported file size and types, see Supported file types.
Authorizations
Sensible uses API keys to authenticate requests. Keep your API keys secure and do not share them publicly accessible areas such as GitHub, client-side code, etc. Authentication to the API is performed via Bearer Authentication. Provide your API key as the bearer auth value.
Body
The body is of type file
.
Response
Document type defined in the Sensible account that this doc is most similar to. To use a document type for classification, Sensible requires that the type contains at least one reference document.
Reference documents uploaded to the Sensible account that this document is most similar to.
Scores for this document's similarity to each document type in the Sensible account, excluding document types Sensible created in your account as tutorials, such as senseml_basics
.