Skip to content
Seal
Esc
↑↓navigate↵open⌘Jpreview

OCR a draft PDF (add a searchable text layer)

Runs ocrmypdf –skip-text in the pdf-tools container — pages that lack a text layer are OCR’d and existing text is preserved. The searchable PDF claims the document’s storageKey. Honours the org egress.allow_convert gate.

POST/documents/pdf/ocr
Authorization
AuthorizationBearer token · headerrequired

Pass your API key as a Bearer token. API keys are scoped to specific operations — configure scopes in your organization's Settings → Developer → API Keys.

Request body
requiredapplication/json
idstringrequired
langstring

Tesseract language code(s), e.g. eng or eng+fra

matches ^[a-z]{3}(\+[a-z]{3})*$ · default: "eng"
Responses
200

OCR complete

successboolean
storage_idstring
page_countinteger
langstring
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST "https://api.seal.nyc/api/v1/documents/pdf/ocr" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "id": "string",
  "lang": "eng"
}'
Response
{
  "success": true,
  "storage_id": "string",
  "page_count": 0,
  "lang": "string"
}