For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
HomeGuidesAPI ReferenceGlossary
Logo
HomeGuidesAPI ReferenceGlossary
  • API Reference
      • POSTRun OCR (Sync)
      • POSTRun OCR (Async)
      • GETGet OCR Response (Async)
Sign inBook a demo
API ReferenceOCR

Run OCR (Async)

POST
https://api.mercoa.com/ocr-async
POST
/ocr-async
$curl -X POST https://api.mercoa.com/ocr-async \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "mimeType": "image/png",
> "image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII",
> "vendorNetwork": "entity",
> "entityId": "ent_8f86116b-3b4d-4ded-99ef-3bc929d8c33c"
>}'
1{
2 "jobId": "ocr_8f86116b-3b4d-4ded-99ef-3bc929d8c33c"
3}
Run OCR on an Base64 encoded image or PDF. This endpoint will return immediately and the OCR will be processed asynchronously.
Was this page helpful?
Previous

Get OCR Response (Async)

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
mimeTypestringRequired

MIME type of the image. Supported types are image/png, image/jpeg, and application/pdf.

imagestringRequired
Base64 encoded image or PDF. PNG, JPG, WEBP, and PDF are supported. 10MB max.
vendorNetworkenumOptional
Limit OCR vendor search to a specific network
Allowed values:
entityIdstringOptional
When using the Entity vendor network, specify the entity to use. EntityId on an auth token will take precedence over this parameter.
splitDocumentbooleanOptional
If true, attempt to split the document into subdocuments before processing. Default is false. If a document is split into subdocuments, the linked OCR jobs will be accessible via the linkedJobIds field on each OCR job response.

Response

This endpoint returns an object.
jobIdstring

Errors

400
Bad Request
401
Unauthorized
403
Forbidden
404
Not Found
409
Conflict
500
Internal Server Error
501
Unimplemented