Skip to main content

Documentation Index

Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Extract structured text from images, scanned documents, receipts, and invoices using vision-language models purpose-built for OCR. No preprocessing, no bounding boxes — send an image and get text back.

Available OCR models

ModelParametersStrengths
deepseek-ai/DeepSeek-OCRHigh accuracy on complex layouts, tables, handwriting
allenai/olmOCR-2-7B-10252.7BFast, lightweight, good for bulk processing
PaddlePaddle/PaddleOCR-VL-0.9B0.9BUltra-lightweight, edge-deployable

Extract text from an image

curl https://api.runcrate.ai/v1/chat/completions \
  -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-ai/DeepSeek-OCR",
    "messages": [
      {
        "role": "user",
        "content": [
          {"type": "text", "text": "Extract all text from this document image. Preserve the layout and formatting."},
          {"type": "image_url", "image_url": {"url": "https://example.com/invoice.png"}}
        ]
      }
    ],
    "max_tokens": 2048
  }'

Receipt parsing with structured output

Extract specific fields from a receipt photo:
from openai import OpenAI
import base64, json
from pathlib import Path

client = OpenAI(
    base_url="https://api.runcrate.ai/v1",
    api_key="rc_live_YOUR_API_KEY",
)

image_data = base64.b64encode(Path("receipt.jpg").read_bytes()).decode()

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-OCR",
    messages=[
        {
            "role": "system",
            "content": "Extract receipt data as JSON with keys: merchant, date, items (array of {name, quantity, price}), subtotal, tax, total. Use null for missing fields.",
        },
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Parse this receipt."},
                {"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image_data}"}},
            ],
        },
    ],
    max_tokens=1024,
)

receipt = json.loads(response.choices[0].message.content)
print(f"Merchant: {receipt['merchant']}")
print(f"Total: ${receipt['total']}")
for item in receipt["items"]:
    print(f"  - {item['name']}: ${item['price']}")

Next steps

  • AI Vision API — analyze images beyond OCR: scene understanding, chart reading, visual Q&A.
  • Extract structured data — combine OCR output with schema-based extraction for production pipelines.
  • Model catalog — browse all available vision and OCR models.