Skip to main content
POST
Upload & Extract Text

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):
With no folder, the text is returned in the response only and savedAsset is null. See Folders & Paths.

Response size

By default the response contains the extracted text only:
Pass includeBlocks=true when you need the per-line and per-word geometry — for example to draw bounding boxes over the source image:
The OCR engine emits one block per page, line, and word, each with its own geometry, so blocks is typically far larger than the text itself. Leave it off unless you use the coordinates.

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file

The file to extract text from (Image or PDF).

folder
string

Slug path of the folder to save the extracted text into, relative to the project root. Missing folders are created.

Example:

"receipts/2024"

folderId
string<uuid>

UUID of an existing folder to save the extracted text into. Mutually exclusive with folder.

autoCreateFolders
enum<string>
default:true

Set to false to require that folder already exists.

Available options:
true,
false

Response

Extraction successful

text
string

The fully concatenated plain text.

blocks
object[]

Raw AWS Textract block objects (lines, words) with bounding boxes.

savedAsset
object | null

Details of the saved text file, if folderId was provided.