{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/huggingbay-xyz/json-schema/huggingbay-xyz-document-extract-request-schema.json",
  "title": "DocumentExtractRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/huggingbay-xyz-document-api-openapi.yml#/components/schemas/DocumentExtractRequest",
  "properties": {
    "content": {
      "type": "string",
      "maxLength": 1406296,
      "minLength": 1,
      "title": "Content",
      "description": "Inline UTF-8 text or base64 document bytes, selected by content_encoding."
    },
    "mime_type": {
      "type": "string",
      "enum": [
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        "text/html",
        "text/markdown",
        "text/csv",
        "text/tab-separated-values"
      ],
      "title": "Mime Type",
      "description": "Canonical supported document MIME type."
    },
    "content_encoding": {
      "type": "string",
      "enum": [
        "utf-8",
        "base64"
      ],
      "title": "Content Encoding",
      "default": "utf-8"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255,
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Filename",
      "description": "Optional basename used to reject MIME/extension conflicts."
    },
    "max_chars": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 380000.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Chars"
    },
    "max_rows": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 50000.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Rows"
    },
    "has_header": {
      "type": "boolean",
      "title": "Has Header",
      "description": "CSV/TSV first-row header policy.",
      "default": true
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "content",
    "mime_type"
  ]
}