{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/schemasure/json-schema/schemasure-extract-request-schema.json",
  "title": "ExtractRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/schemasure-legacy-v1-evaluation-api-api-openapi.yml#/components/schemas/ExtractRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "input",
    "schema"
  ],
  "properties": {
    "input": {
      "type": "string",
      "minLength": 1,
      "description": "Raw unstructured content to extract from (plain text or HTML)."
    },
    "inputType": {
      "type": "string",
      "enum": [
        "text",
        "html",
        "auto"
      ],
      "default": "auto",
      "description": "How to interpret `input`: plain text, HTML, or auto-detect (default)."
    },
    "schema": {
      "type": "object",
      "description": "JSON Schema (draft 2020-12) that the returned `data` is guaranteed to satisfy."
    },
    "options": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "maxRepairs": {
          "type": "integer",
          "minimum": 0,
          "maximum": 5,
          "description": "Max validate->re-prompt repair iterations."
        },
        "strict": {
          "type": "boolean",
          "default": true,
          "description": "Drop fields not present in the schema."
        },
        "deterministic": {
          "type": "boolean",
          "default": true,
          "description": "Enable deterministic pre-extraction hints."
        }
      }
    }
  }
}