Create Ocr Document
Upload a base64-encoded PDF or image and start OCR. The returned document_id
is the only public identifier: it works with this OCR endpoint and every
/documents/{document_id} endpoint.
Choose Standard, Enhanced, or Handwriting OCR with mode (defaults to standard).
PDFs and images up to 20 MB (before base64 encoding) are supported.
PDF pages are counted server-side and images count as one page. Prices are
0.125, and $0.25 per page respectively, matching the purchased-credit rates. The estimated API
balance charge is reserved before OCR starts; only successfully extracted
pages are charged, and the unused reservation is released. Poll
GET /v1/ocr/{document_id} for progress and page HTML.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Base64-encoded PDF or image bytes.
Supported MIME type (application/pdf, image/bmp, image/gif, image/jpeg, image/png, image/tiff, or image/webp). Images count as one page; encrypted PDFs are unsupported.
OCR type. Defaults to standard ($0.025/page). Enhanced costs $0.125/page; Handwriting costs $0.25/page and does not include image-to-text highlighting. Only successfully extracted pages are charged.
Response
Number of pages counted server-side and reserved for billing.
