Skip to content
Docs

Using DocuExtract on Chutes

DocuExtract is a community chute by vonkaiser that pairs two Apache-2.0 vision-language models into one document pipeline: LightOnOCR-2-1B for fast PDF/image-to-markdown conversion and NuExtract3 for template-driven structured JSON extraction. Four REST endpoints on one host cover OCR, extraction, and template generation.

Overview

The two bundled models split the work by task:

  • LightOnOCR-2-1B (/ocr/lighton/markdown) is LightOn's flagship OCR model: a 1B-parameter end-to-end VLM with a Qwen3-based text backbone (16K text context), refined with RLVR training. Its model card reports state-of-the-art results on OlmOCR-Bench while being about 9x smaller than competing approaches, throughput of 5.71 pages per second on a single H100 (under $0.01 per 1,000 pages), and solid handling of tables, receipts, forms, multi-column layouts, and math notation.
  • NuExtract3 (the three /ocr/nuextract/* endpoints) is NuMind's 4B vision-language reasoning model built on Qwen3.5-4B with a 262K-token text context. It unifies structured extraction (document + JSON template + instructions in, JSON out) with image-to-markdown conversion, handles multilingual documents, and offers reasoning and non-reasoning modes. On NuMind's internal ~600-document structured benchmark the card reports a 0.651 average score, ahead of the open-weight models it compares against.

Template generation and extraction are designed to chain: describe the fields you want once, get a reusable template, then apply it to every document of that type.

Model specifications

PropertyLightOnOCR-2-1BNuExtract3
Endpoints/ocr/lighton/markdown/ocr/nuextract/markdown, /ocr/nuextract/extract, /ocr/nuextract/template
Parameters1.01B (safetensors)4.54B (safetensors)
ArchitectureEnd-to-end OCR VLM; Qwen3 text backbone, 28 layersVision-language reasoning model (Qwen3.5 architecture)
Text context16,384 tokens262,144 tokens
Base model-Qwen/Qwen3.5-4B
LicenseApache-2.0Apache-2.0
ReleaseJanuary 2026April 2026
Sampling defaults (HF gen config)temperature 0.2, top_p 0.9-

Quick start

All endpoints live on https://vonkaiser-docuextract.chutes.ai and return JSON. Send one document input per call: pdf_b64 for PDFs, image_b64 for images.

# Fast OCR: PDF to markdown via LightOnOCR-2
curl -X POST "https://vonkaiser-docuextract.chutes.ai/ocr/lighton/markdown" \
  -H "Authorization: Bearer $CHUTES_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pdf_b64": "<base64-encoded PDF>", "dpi": 200, "max_pages": 10}'
import base64
import os
import requests

HOST = "https://vonkaiser-docuextract.chutes.ai"
HEADERS = {"Authorization": f"Bearer {os.environ['CHUTES_API_KEY']}"}

pdf_b64 = base64.b64encode(open("invoice.pdf", "rb").read()).decode()

# 1. Generate a reusable extraction template from a description
template = requests.post(f"{HOST}/ocr/nuextract/template", headers=HEADERS, json={
    "description": "Invoice number, issue date, vendor name, line items with quantity and unit price, total amount",
    "pdf_b64": pdf_b64,
    "max_pages": 1,          # default 1 for template generation
}).json()

# 2. Apply the template to extract structured JSON
extracted = requests.post(f"{HOST}/ocr/nuextract/extract", headers=HEADERS, json={
    "template": template,
    "pdf_b64": pdf_b64,
    "max_pages": 10,         # default 10
    "enable_thinking": False # default; True = reasoning mode, slower but better on hard docs
}).json()
print(extracted)
import { readFile } from "node:fs/promises";

const HOST = "https://vonkaiser-docuextract.chutes.ai";

const imageB64 = (await readFile("receipt.png")).toString("base64");
const resp = await fetch(`${HOST}/ocr/nuextract/markdown`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CHUTES_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    image_b64: imageB64,
    mode: "markdown", // default; "content" also available
    dpi: 200,
  }),
});
console.log(await resp.json());

Parameters and tuning

Shared fields across endpoints, with defaults from the chute's llms.txt:

  • pdf_b64 / image_b64 (one per call): the document. /ocr/nuextract/extract additionally accepts plain text for extract-only requests.
  • dpi (default 200): PDF page rendering resolution. Raise it for small print; higher dpi costs more tokens per page.
  • max_pages (default 10; 1 for template generation): page cap per call. Keep low while testing, then raise once the extraction shape looks right (chute playground guidance).
  • temperature (default 0.0 markdown / 0.2 extract): near-deterministic decoding suits OCR; LightOnOCR-2's own generation config recommends temperature 0.2 with top_p 0.9.
  • max_new_tokens (default: model maximum safe for the input size): cap generation length.
  • enable_thinking (default false): NuExtract3 reasoning mode, slower but higher quality on hard documents.
  • /ocr/nuextract/extract extras: template (required JSON object), instructions, and examples for few-shot guidance.

What it's best at

  • Document-to-markdown at scale. LightOnOCR-2's speed and OlmOCR-Bench results make it the default for RAG preprocessing and archive conversion.
  • Invoice, receipt, contract, and form extraction. The template/extract pair turns document types into stable JSON schemas.
  • Template bootstrapping. Generating the extraction template from a plain-language description removes the schema-authoring step.
  • Text-only extraction. If you already have the text, skip OCR and pass it straight to extract.

Not a fit: high-concurrency bulk jobs (the chute runs at concurrency 1 on one GPU, so requests queue), free-form visual question answering beyond OCR/extraction, and single-call processing of very long documents (batch pages client-side past the max_pages cap).

How Chutes serves this model

Per the chute readme, both models run as dual vLLM instances on a single pro_6000 GPU with concurrency 1 and TEE-safe PDF rendering. All four endpoints return application/json, take flat JSON bodies (no input_args wrapper), and authenticate with Authorization: Bearer $CHUTES_API_KEY.

Related resources: the model page, the machine-readable llms.txt, and the callable OpenAPI spec.

FAQ

When should I use the LightOn endpoint versus the NuExtract endpoints?

Use /ocr/lighton/markdown when you just need fast, accurate page-to-markdown conversion; LightOnOCR-2's card reports 5.71 pages/s on an H100 and state-of-the-art OlmOCR-Bench results. Use the NuExtract endpoints when you need structured JSON out, template generation, extraction from plain text, or its reasoning mode on hard documents.

How does template-based extraction work?

Two calls. First POST /ocr/nuextract/template with a description of the fields you want (optionally with a sample document) to get a JSON template. Then POST /ocr/nuextract/extract with that template plus your pdf_b64, image_b64, or text; the response is JSON structured to the template. Templates are reusable across documents of the same type.

What inputs does it accept?

Base64-encoded PDFs (pdf_b64) or images (image_b64), one document input per call. The extract endpoint additionally accepts a plain text field for extract-only requests where you already have the text. PDF pages are rendered at a configurable dpi, default 200.

What does enable_thinking do?

It turns on NuExtract3's reasoning mode: the model thinks before answering, which is slower but higher quality on hard documents, per the request field description. It is off by default. NuMind benchmarked NuExtract3 with reasoning enabled at temperature 0.25 in its model card evaluation.

How many pages can I process per call?

max_pages defaults to 10 (1 for template generation) and is configurable per request. The chute's playground notes recommend keeping max_pages low while testing, then raising it once the extraction shape looks right. For long documents, batch pages client-side across calls.

What temperature should I use?

The chute defaults to 0.0 for markdown endpoints and 0.2 for extraction, which is close to LightOnOCR-2's generation config (temperature 0.2, top_p 0.9). For OCR and extraction you want near-deterministic output; only raise temperature if you see repetition artifacts.

Can I use it commercially?

Yes. Both lightonai/LightOnOCR-2-1B and numind/NuExtract3 are Apache-2.0 licensed per their Hugging Face repos, which permits commercial use with attribution and license notice.

Is my document data isolated?

The chute readme states PDF rendering is TEE-safe and the deployment runs at concurrency 1 on a single pro_6000 GPU, meaning requests are processed one at a time. Standard Chutes API-key auth applies; send documents as base64 over HTTPS.

Sources