Upload & Extract Text
Upload an image or PDF document and instantly extract its text using Optical Character Recognition (OCR). If a destination folder is given (via folder or folderId), the extracted text is also saved to your Dreep storage as a .txt file in that folder. With no folder, the text is returned in the response only.
Saving the extracted text
Name a destination folder and Dreep also stores the extracted text as a.txt
asset in it. Use folder (a path, created on demand) or folderId (a UUID):
savedAsset is
null. See Folders & Paths.
Response size
By default the response contains the extractedtext only:
includeBlocks=true when you need the per-line and per-word geometry — for example to
draw bounding boxes over the source image:
blocks is
typically far larger than the text itself. Leave it off unless you use the coordinates.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The file to extract text from (Image or PDF).
Slug path of the folder to save the extracted text into, relative to the project root. Missing folders are created.
"receipts/2024"
UUID of an existing folder to save the extracted text into. Mutually exclusive with folder.
Set to false to require that folder already exists.
true, false