Loading...
Loading...
Extract text from images using OCR and vision AI with the performOCR() high-level API or the full VisionPipeline.
npx skill4agent add framersai/agentos-skills vision-ocrperformOCR()performOCR()import { performOCR } from '@framers/agentos';
const result = await performOCR({
image: '/path/to/receipt.png', // file path, URL, base64, or Buffer
strategy: 'progressive', // 'progressive' | 'local-only' | 'cloud-only'
confidenceThreshold: 0.7, // min confidence before escalating tier
});
console.log(result.text); // extracted text
console.log(result.confidence); // 0–1 score
console.log(result.tier); // 'ocr' | 'handwriting' | 'document-ai' | 'cloud-vision'
console.log(result.provider); // 'paddle' | 'tesseract' | 'openai' | etc.
console.log(result.regions); // bounding boxes (when available)performOCR()VisionPipeline| Use case | Recommendation |
|---|---|
| One-shot text extraction from a single image | |
| Batch processing many images | |
| Need CLIP embeddings or document layout | |
| Quick scripts and integrations | |
'progressive''local-only''cloud-only'performOCR()'/tmp/scan.png''https://example.com/receipt.jpg'data:image/png;base64,...VisionPipeline