← Documentation

Local-first Document Processing

Convert supported files locally, validate versioned JSON, and explicitly submit only structured content.

{
  "version": "2026-08-v6",
  "workflow": [
    "select a supported file locally",
    "hash and extract locally",
    "preview and export JSON",
    "optionally validate JSON remotely",
    "explicitly obtain a quote and submit a document job",
    "retrieve the final report"
  ],
  "local_tool": "/local-converter",
  "schema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "schema_version",
      "document_id",
      "original_file_sha256",
      "normalized_json_sha256",
      "text_blocks",
      "extraction",
      "provenance"
    ],
    "properties": {
      "schema_version": {
        "const": "1.0"
      },
      "document_id": {
        "type": "string",
        "minLength": 8,
        "maxLength": 128,
        "pattern": "^[A-Za-z0-9._:-]+$"
      },
      "source_filename": {
        "type": "string",
        "maxLength": 255
      },
      "source_mime_type": {
        "type": "string",
        "maxLength": 100
      },
      "original_file_sha256": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      },
      "normalized_json_sha256": {
        "type": "string",
        "pattern": "^[a-f0-9]{64}$"
      },
      "page_count": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100
      },
      "sections": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "block_ids"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "level": {
              "type": "integer",
              "minimum": 1
            },
            "block_ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "pages": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "page",
            "block_ids"
          ],
          "properties": {
            "page": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "block_ids": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        }
      },
      "text_blocks": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "text"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "text": {
              "type": "string",
              "minLength": 1,
              "maxLength": 4000
            },
            "page": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "section_id": {
              "type": "string"
            },
            "source_location": {
              "type": "string"
            }
          }
        }
      },
      "tables": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "rows"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "rows": {
              "type": "array",
              "items": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "page": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "source_location": {
              "type": "string"
            }
          }
        }
      },
      "extraction": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "method",
          "ocr_used",
          "converter_version",
          "converted_at"
        ],
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "native_text",
              "local_ocr",
              "agent_parser"
            ]
          },
          "ocr_used": {
            "type": "boolean"
          },
          "ocr_confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "converter_version": {
            "type": "string",
            "maxLength": 100
          },
          "converted_at": {
            "type": "string"
          }
        }
      },
      "provenance": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "trust_classification",
          "original_uploaded"
        ],
        "properties": {
          "trust_classification": {
            "type": "string",
            "enum": [
              "LOCAL_VERIFIED",
              "AGENT_VERIFIED",
              "SELF_DECLARED",
              "SERVER_VERIFIED"
            ]
          },
          "original_uploaded": {
            "const": false
          },
          "converter_id": {
            "type": "string"
          },
          "agent_id": {
            "type": "string"
          },
          "attestation": {
            "type": "string"
          }
        }
      },
      "warnings": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    }
  },
  "validation": "POST /v1/documents/validate",
  "submission": "POST /v1/document-jobs",
  "supported_local_formats": [
    "TXT",
    "Markdown",
    "CSV",
    "TSV",
    "JSON",
    "HTML"
  ],
  "unsupported_local_formats": [
    "PDF",
    "DOCX",
    "XLSX",
    "images",
    "scans",
    "OCR"
  ],
  "network_behavior": "Selecting, converting, previewing, and exporting make no application network request. Remote validation occurs only after the user clicks the validation action; job submission is a separate authenticated action.",
  "provenance_classes": [
    "LOCAL_VERIFIED",
    "AGENT_VERIFIED",
    "SELF_DECLARED",
    "SERVER_VERIFIED (reserved)"
  ],
  "distinctions": {
    "integrity": "A hash can show equality/change.",
    "extraction_validity": "Parsing or OCR can still misread the source.",
    "authenticity": "Neither a hash nor accurate extraction proves the underlying document is genuine."
  }
}

Machine-readable response