?
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
model
string
Optional extraction model id (a `document_extraction` model, e.g. `mistral-ocr-latest`, `llamaparse`, `google-document-ai`). Defaults to the platform default when omitted.
Call from a method
import { mindstudio } from '@mindstudio-ai/agent'; const result = await mindstudio.extractText({ url: /* ... */ });