cURL
curl --request POST \ --url https://extraction-api.nanonets.com/api/v1/classify/batch \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form 'files=<string>' \ --form 'categories=[{"name": "Invoice"}, {"name": "Contract"}, {"name": "Receipt"}]' \ --form files.items='@example-file'
{ "success": true, "message": "<string>", "batch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "total_files": 123, "successful_files": 123, "failed_files": 123, "results": [ { "filename": "<string>", "total_pages": 123, "pages": [ { "page_number": 2, "category": "<string>", "confidence": 50, "reasoning": "<string>", "identified_category": "<string>" } ], "file_id": "<string>", "processing_time": 123, "error": "<string>" } ] }
Classify multiple documents asynchronously (max 50 files).
Files are queued for background processing. Use GET /api/v1/extract/results/{record_id} to poll results.
GET /api/v1/extract/results/{record_id}
API key as Bearer token: Authorization: Bearer YOUR_API_KEY
Authorization: Bearer YOUR_API_KEY
Files to classify (max 50)
50
JSON array of category objects (max 50 categories)
"[{\"name\": \"Invoice\"}, {\"name\": \"Contract\"}, {\"name\": \"Receipt\"}]"
Batch queued
Show child attributes