## Classify **post** `/v1/classify` Classify ### Body Parameters - `file: FileData or FileURL` File to classify, either as raw data or a URL - `FileData = object { file_data }` - `file_data: string` Raw file data encoded as bytes - `FileURL = object { file_url }` - `file_url: string` URL pointing to the file to be processed - `types: array of ClassifyType` List of classification types to classify the document into - `description: string` Description of the classified type - `name: string` Name of the classified type ### Returns - `credit_used: number` Cost in EUR (€) for this classification (per page for PDFs, flat for images) - `result: object { confidence, type }` Classification result for the provided document - `confidence: number` Confidence score between 0 and 1 - `type: string` Type of the classified result ### Example ```http curl https://api.parseocr.com/v1/classify \ -H 'Content-Type: application/json' \ -H "X-API-Key: $PARSEOCR_API_KEY" \ -d '{ "file": { "file_data": "JVBERi0xLjcKJcfs...KqldOIQo=" }, "types": [ { "description": "Invoices request payment for goods or services provided.", "name": "invoice" }, { "description": "Quotes provide an estimate of costs for goods or services before they are provided.", "name": "quote" } ] }' ``` #### Response ```json { "credit_used": 0, "result": { "confidence": 0.98, "type": "invoice" } } ```