curl -X POST "https://api.clevrscan.com/api/upload_ocr" \
-H "X-API-Key: <api_key>" \
-F "files=@/path/to/file1.pdf" \
-F "files=@/path/to/file2.jpg" \
-F "template=Invoice" \
-F "batchProcess=true" \
-F "splitPdf=false"
{
"individual_files": 0,
"message": "Batch processing started with PDF grouping",
"pdf_groups": 1,
"task_ids": [
"b3aef434-a75c-4015-aa81-550dfd9d8689"
]
}
Upload Endpoints
Async Method
Uploads files for asynchronous OCR processing. Returns task IDs that can be used to check processing status.
POST
/
api
/
upload_ocr
curl -X POST "https://api.clevrscan.com/api/upload_ocr" \
-H "X-API-Key: <api_key>" \
-F "files=@/path/to/file1.pdf" \
-F "files=@/path/to/file2.jpg" \
-F "template=Invoice" \
-F "batchProcess=true" \
-F "splitPdf=false"
{
"individual_files": 0,
"message": "Batch processing started with PDF grouping",
"pdf_groups": 1,
"task_ids": [
"b3aef434-a75c-4015-aa81-550dfd9d8689"
]
}
Request Formats
Option 1: Multipart Form DataPOST /api/upload_ocr
Content-Type: multipart/form-data
X-API-Key: <api_key>
files: [file1.pdf, file2.jpg, ...]
template: "invoice"
batchProcess: "true"
splitPdf: "false"
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| files | File[] | Yes* | Array of files to process (multipart only) |
| template | String | Yes | Template ID or name for processing (e.g. “Invoice”) |
| batchProcess | Boolean | No | Enable batch processing (default: false) |
| splitPdf | Boolean | No | Split PDF pages individually (default: false) |
curl -X POST "https://api.clevrscan.com/api/upload_ocr" \
-H "X-API-Key: <api_key>" \
-F "files=@/path/to/file1.pdf" \
-F "files=@/path/to/file2.jpg" \
-F "template=Invoice" \
-F "batchProcess=true" \
-F "splitPdf=false"
{
"individual_files": 0,
"message": "Batch processing started with PDF grouping",
"pdf_groups": 1,
"task_ids": [
"b3aef434-a75c-4015-aa81-550dfd9d8689"
]
}
⌘I