Skip to content

Start OCR Processing

Initiate OCR processing for a document in your workspace

Note

The OCR API is currently in closed beta.

The start OCR endpoint initiates OCR processing for a document that has been uploaded to a job in your workspace. This is an asynchronous operation that queues the document for processing and returns immediately.

You can either use an existing document in your workspace or create a new document using the Create Documents endpoint, which will return the document_id.

After starting OCR processing, use the Get OCR Results endpoint to check the processing status and retrieve the extracted data.

Endpoint

MethodUrl
POST/v1.0/ocr/start

Request Parameters

document_id
string
required

The unique identifier of the document to process. This ID is returned when you upload a document using the Create Documents endpoint. The document must already be uploaded to a job in your workspace.

Sample Request

Copied
1curl -X POST 'https://api.worklayer.com/v1.0/ocr/start' \
2 -H 'Authorization: Bearer {token}' \
3 -H 'Content-Type: application/json' \
4 -d '{
5 "document_id": "95e6f305-913e-40ad-9c80-ede263670878"
6 }'

Response

The response confirms that OCR processing has been initiated for the specified document.

document_id
string

The document ID that was submitted for OCR processing.

Sample Response

Copied
1{
2 "document_id": "95e6f305-913e-40ad-9c80-ede263670878"
3}

Errors

Error Responses

The API returns standard HTTP status codes with descriptive error messages:

Status CodeError TypeDescription
400Bad RequestInvalid document ID format or missing required fields
401UnauthorizedMissing or invalid bearer token
403ForbiddenUser lacks permission
404Not FoundDocument not found or workspace not found
409ConflictOCR processing already started for this document
500Internal Server ErrorError starting OCR processing
Last updated on August 15, 2025