---
title: "Process document with OCR"
method: POST
path: "/ocr/v1/process"
tags: ["OCR"]
---

# Process document with OCR

`POST /ocr/v1/process`

Submit a document for OCR processing to extract text, detect tables, forms, and other features. Supports PDFs, images, and scanned documents. Returns a job ID that can be used to track processing status.

## Request body

- object
  - `document_url` string, required — URL or S3 path to the document to process
  - `document_id` string — Optional custom document identifier
  - `callback_url` string — URL to receive completion webhook
  - `engine` 'doctr' | 'paddleocr' — OCR engine to use
  - `features` object — Additional processing options
    - `embed` object — Generate searchable PDF with text layer
    - `tables` object — Extract tables as structured data
      - `format` 'csv' | 'json' — Output format for extracted tables
    - `forms` object — Detect and extract form fields
  - `result_bucket` string — S3 bucket to store results
  - `result_prefix` string — S3 key prefix for results

## Response `201`

OCR job created successfully

- object
  - `id` string — Unique job identifier
  - `status` 'queued' | 'processing' | 'completed' | 'failed' — Current job status
  - `document_id` string — Document identifier
  - `engine` string — OCR engine used
  - `page_count` integer — Number of pages detected
  - `created_at` string, date-time — Job creation timestamp
  - `estimated_completion` string, date-time — Estimated completion time

## Other responses

- `400` — Invalid request parameters
- `401` — Invalid API key
- `403` — Insufficient permissions for OCR service

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/5b7e64e6d6f9/schema)
