Skip to content
HALOWERK

Formatwerk

form scan map

Maps template boxes (mm on a page size, or pixels of a reference image) onto the scan (sharp, EXIF orientation applied), crops each box with an inset that drops frame lines, upscales small text and runs the tesseract 5 LSTM binary per field under prlimit (line/block/word mode, digit whitelist for numbers and dates). Numbers are parsed for German and English grouping, dates to ISO; checkboxes by the share of dark pixels. No deskewing: the scan must match the template. Price covers several OCR.

POST https://format.halowerk.com/v1/form-scan-map

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
image_base64stringYesPNG, JPEG, TIFF or WebP scan (max. 15 MB).
templateobjectYes
languagestringNo
inset_mmnumberNo
checkbox_thresholdnumberNo
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "image_base64",
    "template"
  ],
  "properties": {
    "image_base64": {
      "type": "string",
      "maxLength": 20000000,
      "description": "PNG, JPEG, TIFF or WebP scan (max. 15 MB)."
    },
    "template": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "unit",
        "fields"
      ],
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "mm",
            "px"
          ]
        },
        "page_width_mm": {
          "type": "number",
          "minimum": 20,
          "maximum": 1000
        },
        "page_height_mm": {
          "type": "number",
          "minimum": 20,
          "maximum": 1000
        },
        "reference_width_px": {
          "type": "integer",
          "minimum": 10,
          "maximum": 20000
        },
        "reference_height_px": {
          "type": "integer",
          "minimum": 10,
          "maximum": 20000
        },
        "fields": {
          "type": "array",
          "minItems": 1,
          "maxItems": 25,
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "x",
              "y",
              "width",
              "height"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "x": {
                "type": "number",
                "minimum": 0
              },
              "y": {
                "type": "number",
                "minimum": 0
              },
              "width": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "height": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "kind": {
                "type": "string",
                "enum": [
                  "text",
                  "number",
                  "date",
                  "checkbox"
                ],
                "default": "text"
              },
              "mode": {
                "type": "string",
                "enum": [
                  "line",
                  "block",
                  "word"
                ],
                "default": "line"
              },
              "whitelist": {
                "type": "string",
                "maxLength": 120,
                "pattern": "^[^\\s]*$",
                "description": "Allowed characters for this field."
              }
            }
          }
        }
      }
    },
    "language": {
      "type": "string",
      "enum": [
        "deu",
        "eng",
        "deu+eng"
      ],
      "default": "deu+eng"
    },
    "inset_mm": {
      "type": "number",
      "minimum": 0,
      "maximum": 5,
      "default": 1
    },
    "checkbox_threshold": {
      "type": "number",
      "minimum": 0.02,
      "maximum": 0.6,
      "default": 0.08
    }
  }
}

Open original schema

Published input example

{
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEXs7OwBAQHast2IAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAnElEQVQYlY3QsQ0DIQwF0G+5oGQENmELtqEgyjZkCSOKW4PTdako6YjsU/pDSPAkLH8DPF6UUkoA7723gPQo4G+tHwEJwKJbr391oAnoKHQJ+BC+BNSHawJu07/15QqkdTmyKmZTWCY/TW6Y3DD5aQrLFLMpR9MKqjb9S7sP17W78KmyENQskua0OovL5dY9is1X7vkEqLXW8vyTfhVpYYYk2AAYAAAAAElFTkSuQmCC",
  "template": {
    "unit": "px",
    "fields": [
      {
        "name": "accepted",
        "x": 8,
        "y": 8,
        "width": 32,
        "height": 32,
        "kind": "checkbox"
      }
    ]
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’