Crowdee
LT Pipelines

OCR — Images & PDFs

Extract text from images and PDF documents using pdftotext for digital PDFs and a vision model for scanned documents.

The lt-ocr pipeline extracts text from images and PDF documents. It uses a hybrid approach: fast native text extraction for digital PDFs and a vision model for scanned PDFs and raster images.

200 credits per file · ~3 minutes

Accepted Files

TypeMIME types
Imagesimage/* (JPEG, PNG, WebP, TIFF, …)
Documentsapplication/pdf

Up to 10 files per run.

Processing Logic

The pipeline selects the extraction method based on the file type and content:

  1. Digital PDFspdftotext extracts embedded text directly. This is fast and accurate for PDFs generated from word processors or exported from applications.
  2. Scanned PDFs — if pdftotext yields fewer than 50 characters, the first page is rendered to an image and passed to a local Ollama vision model (default: llava) for OCR.
  3. Images — always processed by the Ollama vision model directly.

The OCR model runs locally via Ollama. Results may vary depending on image quality and document layout complexity.

Context Parameters

None. This pipeline requires no additional context.

Output

{
  "pipelineSlug": "lt-ocr",
  "output": {
    "extractedText": "Invoice\nDate: 2024-01-15\nAmount due: €1,250.00\n...",
    "pageCount": 2,
    "confidence": 0.91,
    "model": "llava"
  },
  "rawText": "Invoice\nDate: 2024-01-15\nAmount due: €1,250.00\n..."
}

Output Fields

FieldTypeDescription
extractedTextstringAll extracted text, preserving line breaks
pageCountnumber | nullNumber of pages (PDFs only; null for images)
confidencenumber | nullExtraction confidence 0–1 (vision model only; null for pdftotext)
modelstringExtraction method used ("pdftotext" or the Ollama model name, e.g. "llava")
rawTextstringAlias of extractedText

API Example

POST /v2/lt-pipelines/project/{projectId}/run
{
  "pipelineSlug": "lt-ocr",
  "fileIds": ["file_abc123", "file_def456"],
  "contextData": {}
}

Response:

{
  "runIds": ["ltrun_aaa111", "ltrun_bbb222"]
}

Retrieve a result:

GET /v2/lt-pipelines/runs/ltrun_aaa111

How is this guide?

© 2026 Crowdee GmbH. All rights reserved.

On this page