{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudmersive/json-schema/cloudmersive-advanced-extract-fields-request-schema.json",
  "title": "AdvancedExtractFieldsRequest",
  "description": "Request to perform an AI field extraction on a document",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudmersive-extract-api-openapi.yml#/components/schemas/AdvancedExtractFieldsRequest",
  "type": "object",
  "properties": {
    "InputFile": {
      "format": "byte",
      "description": "Input document file to perform the operation on as a byte array",
      "type": "string"
    },
    "FieldsToExtract": {
      "description": "Fields to extract from the document",
      "type": "array",
      "items": {
        "$ref": "#/$defs/FieldToExtract"
      }
    },
    "MaximumPagesProcessed": {
      "format": "int32",
      "description": "Optional: Limit the number of pages processed",
      "type": "integer"
    },
    "Preprocessing": {
      "description": "Optional: Set the level of image pre-processing to enhance accuracy.  Possible values are 'Auto', 'SmoothEdges', 'SmoothEdgesPlus', 'ContrastEdges', 'ContrastEdgesPlus', 'Invert', 'Binarize', 'Compatability' and 'None'.  Default is Auto.  Set to SmoothEdges to smooth harsh edges in the input image to enhance recognition accuracy.  Set to SmoothEdgesPlus to smooth harsh edges to a higher degree.  Set to ContrastEdges and ContrastEdgesPlus to enhance contrast and readability for low quality black and white or grayscale images.  Set to Invert to invert the input image.  Set to Binarize to binarize the input image.  Set to Compatability for maximum PDF feature compatability.",
      "type": "string"
    },
    "ResultCrossCheck": {
      "description": "Optional: Set the level of output accuracy cross-checking to perform on the input.  Possible values are 'None', 'Advanced' and 'Ultra'.  Default is None.  Ultra will produce the highest accuracy but at the cost of longer processing times.",
      "type": "string"
    },
    "RotateImageDegrees": {
      "format": "double",
      "description": "Optional: Rotate the input image before recognition by the specified number of degrees; valid values range from -360 to +360.",
      "type": "number"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "FieldToExtract": {
      "description": "Field to extract from a document using AI",
      "type": "object",
      "properties": {
        "FieldName": {
          "description": "Name of the field to extract",
          "type": "string"
        },
        "FieldOptional": {
          "description": "Optional: True if the field is optional, false if required (default)",
          "type": "boolean"
        },
        "FieldDescription": {
          "description": "Optional but recommended: Description of the field - use this to describe what the field is, how it is formatted, what is unique about it, etc.",
          "type": "string"
        },
        "FieldExample": {
          "description": "Optional: Example label or value of the field",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  }
}