Skip to main content

POST /jobs/upload

Upload files and get a cost preview. Credits are not deducted at this step.

Form fields​

FieldTypeRequiredDefaultDescription
filesFile[]Yes—One or more files (multipart/form-data)
ocr_modelstringNopremiumbasic or premium
ocr_enginestringNoeasyocrtesseract, easyocr, or rapidocr (premium only)
columnsstringNodefaultsComma-separated or JSON array of column names
promptstringNo""Extra instructions for the model
dpiintNo300PDF rendering DPI
relative_pathsstringNo""JSON array of relative paths for archive files
docling_refinementboolNofalseEnable LLM layout refinement for PDF/Office/HWP (3 md/page)

Request​

curl -X POST https://your-domain.com/api/v1/jobs/upload \
-H "X-API-Key: chu_live_xxxxxxxx" \
-F "files=@document.pdf" \
-F "ocr_model=premium" \
-F "columns=날짜,계정과목,적요,입금액,출금액,잔액" \
-F "dpi=300"

Response​

{
"job_id": "job-abc123",
"status": "pending",
"file_type": "pdf",
"total_pages": 10,
"total_files": 1,
"media_duration_seconds": 0,
"docling_refinement": false,
"docling_refinement_pages": 0,
"ocr_model": "premium",
"ocr_engine": "easyocr",
"has_media": false,
"cost": {
"pages": 10,
"image_count": 0,
"audio_seconds": 0,
"video_seconds": 0,
"ocr_model": "premium",
"free_pages_used": 0,
"points": 50,
"usd": "$0.05"
},
"balance": 10000
}

Fields​

FieldTypeDescription
job_idstringJob identifier — use for confirm/status/download
statusstringAlways pending at this stage
file_typestringpdf, docx, pptx, xlsx, hwp, hwpx, image, audio, video, archive, mixed (Markdown files report as mixed)
total_pagesintTotal PDF/Office/HWP pages detected
total_filesintTotal files (after archive extraction)
media_duration_secondsintTotal audio/video duration
docling_refinementboolWhether docling refinement was requested
docling_refinement_pagesintPages subject to docling refinement (0 if disabled)
ocr_modelstringModel used (basic or premium)
ocr_enginestringOCR engine used (tesseract, easyocr, or rapidocr)
has_mediaboolWhether audio/video files are included
cost.pointsintCredits that will be deducted on confirm (milli-USD)
cost.usdstringHuman-readable USD cost estimate
cost.ocr_modelstringModel used for cost calculation
cost.free_pages_usedintFree pages applied (basic model only)
balanceintCurrent credit balance in milli-USD (before deduction)

Office and HWP files​

Office (.docx, .pptx, .xlsx) and HWP (.hwp, .hwpx) files are supported and routed through the Docling preprocessing pipeline (Office) or pyhwp (HWP). Page counts are estimated via Docling/pyhwp (defaults to 1 page if estimation fails).

curl -X POST https://your-domain.com/api/v1/jobs/upload \
-H "X-API-Key: chu_live_xxxxxxxx" \
-F "files=@document.docx" \
-F "docling_refinement=true"

Markdown files​

Markdown (.md) files are supported and processed at no cost (0 credits). The text content is used directly as the result without OCR/LLM processing. Markdown files are ideal when you already have structured content and want to convert it to CSV/XLSX/DOCX/PPTX via the download/convert endpoints.

curl -X POST https://your-domain.com/api/v1/jobs/upload \
-H "X-API-Key: chu_live_xxxxxxxx" \
-F "files=@notes.md"

Multiple files​

Upload multiple files at once:

curl -X POST https://your-domain.com/api/v1/jobs/upload \
-H "X-API-Key: chu_live_xxxxxxxx" \
-F "files=@doc1.pdf" \
-F "files=@doc2.pdf" \
-F "ocr_model=premium"

Errors​

StatusMeaning
400No files, unsupported format, or missing filename
413Total file size exceeds limit (default 200MB) or pages exceed limit (default 10,000)
502File processing failed