ai

OCR + layout extraction.

OCR + layout extraction. POST { imageUrl, instruction? }. Returns verbatim transcribed text in reading order, any detected tables as markdown, the primary language, and a handwriting flag. For reading receipts, forms, screenshots, scanned pages, and labels. JPEG/PNG/GIF/WebP. Billing: payment settles before this endpoint runs (paid upstream), so an error after settlement IS charged — the error response then carries the payment receipt (PAYMENT-RESPONSE) and X-2s-Charged: true. upto-scheme payments settle only after success.

post/api/ai/ocr

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/ai/ocr
  • Auth: API key in header PAYMENT-SIGNATURE

Query parameters

trial1

Try before you buy. Set to 1 for one free real call per endpoint per hour — no wallet or payment needed — to verify the endpoint before paying. Equivalent to sending the "X-2s-Trial: 1" request header. Listed only on operations that offer a trial; the others always answer 402.

Request body

imageUrlstring uri required

Public image URL (JPEG/PNG/GIF/WebP).

instructionstring

Optional steering, e.g. "only the table" or "preserve line numbers".

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.