?
extractText
Download a file from a URL and extract its text content. Supports PDFs (including scanned/image-based PDFs via OCR), plain text files, and other document formats.
mindstudio.extractText({ url }) → Result
Downloads a file from a URL and extracts its text, including OCR for scanned or image-only PDFs, plus plain text and other document formats. This is how an uploaded document becomes text a model can read.
Parameters
url
object
RequiredURL or array of URLs to extract text from. Accepts a single URL, comma-separated list, or JSON array
extractionModelOverride
object
Optional model override. Uses the workspace's default document extraction model if not specified
model
string
Optional extraction model id.
includeBlocks
boolean
Add each page's typed blocks, with their bounding boxes, and the page's size to `documents`. Off by default, since they're several times the size of the text.
Call from a method
import { mindstudio } from '@mindstudio-ai/agent'; const result = await mindstudio.extractText({ url: /* ... */ });