OCR

Run OCR (Async)

POST
Run OCR on an Base64 encoded image or PDF. This endpoint will return immediately and the OCR will be processed asynchronously.

Request

This endpoint expects an object.
mimeType
stringRequired
MIME type of the image. Supported types are image/png, image/jpeg, and application/pdf.
image
stringRequired
Base64 encoded image or PDF. PNG, JPG, and PDF are supported. 10MB max.
vendorNetwork
enumOptional
Limit OCR vendor search to a specific network
Allowed values: allplatformentity
entityId
stringOptional
When using the Entity vendor network, specify the entity to use if. EntityId on an auth token will take precedence over this parameter.

Response

This endpoint returns an object
jobId
string
POST
1curl -X POST https://api.mercoa.com/ocr-async \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "mimeType": "image/png",
6 "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII",
7 "vendorNetwork": "entity",
8 "entityId": "entity_8f86116b-3b4d-4ded-99ef-3bc929d8c33c"
9}'
200Successful
1{
2 "jobId": "ocr_8f86116b-3b4d-4ded-99ef-3bc929d8c33c"
3}