{
  "swagger": "2.0",
  "info": {
    "title": "Document AI API",
    "description": "Extract structured data including named fields, tables, barcodes, classifications, and summaries from common document formats, scanned documents, and photos of documents using AI.  Also supports handwriting and low quality photos and scans, as well as digital document input.  Supports a wide range of languages, and is able to analyze and infer semantic structure from the visual layout for documents.",
    "termsOfService": "https://portal.cloudmersive.com/terms-of-service",
    "contact": {
      "name": "Cloudmersive",
      "url": "https://www.cloudmersive.com",
      "email": "support@cloudmersive.com"
    },
    "version": "v1"
  },
  "host": "api.cloudmersive.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/document-ai/document/analyze/enforce-policy": {
      "post": {
        "tags": [
          "Analyze"
        ],
        "summary": "Enforce Policies to a Document to allow or block it using Advanced AI",
        "description": "Enforce Policies to a Document to allow or block it using Advanced AI.  Input document formats supported include DOCX, PDF, PNG and JPG.  Consumes 100 API calls per page.",
        "operationId": "ApplyRules",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Input request, including document and policy rules",
            "schema": {
              "$ref": "#/definitions/DocumentPolicyRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DocumentPolicyResult"
            }
          }
        }
      }
    },
    "/document-ai/document/analyze/answer-questions": {
      "post": {
        "tags": [
          "Analyze"
        ],
        "summary": "Answer Questions about a Document in a structured way using Advanced AI",
        "description": "Answer boolean (yes/no), multiple-choice and free-response questions about the contents of a document using Advanced AI.  Input document formats supported include DOCX, PDF, PNG and JPG.  Consumes 100 API calls per page.",
        "operationId": "AnswerQuestions",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Input request, including document and questions",
            "schema": {
              "$ref": "#/definitions/DocumentQuestionsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DocumentQuestionAnswersResult"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/text": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Text from a Document using AI",
        "description": "Extract raw text from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Supports a wide range of languages.  Consumes 100 API calls per page.",
        "operationId": "ExtractText",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy.  Set to Deterministic to directly extract text from digital documents without using AI.",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractTextResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/fields": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Field Values from a Document using AI",
        "description": "Extract Field Values (e.g. Invoice Number, Invoice Date, Business Card Phone Number, etc.) from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractFields",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "FieldNames",
            "description": "Desired fields to extract, comma separated",
            "type": "string"
          },
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractFieldsResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/fields/advanced": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Field Values from a Document using Advanced AI",
        "description": "Extract Field Values (e.g. Invoice Number, Invoice Date, Business Card Phone Number, etc.) from a document using Advanced AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractFieldsAdvanced",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Input request, including document file as byte array, and information on which fields to extract",
            "schema": {
              "$ref": "#/definitions/AdvancedExtractFieldsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractFieldsAdvancedResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/tables": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Tables of Data from a Document using AI",
        "description": "Extract Tables, comprised of rows and columns of data, from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumeds 100 API calls per page.",
        "operationId": "ExtractTables",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractTablesResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/barcodes": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Barcodes of from a Document using AI",
        "description": "Extract all barcodes from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG, HEIC and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractBarcodes",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractBarcodesAiResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/all": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract All Fields and Tables of Data from a Document using AI",
        "description": "Extract all Fields and Tables, comprised of rows and columns of data, from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractAllFieldsAndTables",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "header",
            "name": "preprocessing",
            "description": "Optional: Set the level of image pre-processing to enhance accuracy.  Possible values are 'Auto' (default), 'Paged', and 'Compatability'.  Use 'Paged' to treat each page as a separate document for extraction (requires Advanced recognitionMode).  Default is Auto.",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractFieldsAndTablesResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/classify": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Classification or Category from a Document using AI",
        "description": "Extract Classification or Category (e.g. Invoice, Receipt, Tax Form, or Form 1040, Form 1040 EZ, etc.) from a document using AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractClassification",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Categories",
            "description": "Desired classification to extract",
            "type": "string"
          },
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DocumentClassificationResult"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/classify/advanced": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Classification or Category from a Document using Advanced AI",
        "description": "Extract Classification or Category (e.g. Invoice, Receipt, Tax Form, or Form 1040, Form 1040 EZ, etc.) from a document using Advanced AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractClassificationAdvanced",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Input request to perform the classification on",
            "schema": {
              "$ref": "#/definitions/AdvancedExtractClassificationRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DocumentAdvancedClassificationResult"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/summary": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Summary from a Document using AI",
        "description": "Creates a 1 paragraph summary of the input document using Artificial Intelligence.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractSummary",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "header",
            "name": "language",
            "description": "Optional; Three-letter language code (ISO 639) for the summary.  Default is ENG.  Possible language codes are: AAR,ABK,ACE,ACH,ADA,ADY,AFA,AFH,AFR,AIN,AKA,AKK,ALB,ALE,ALG,ALT,AMH,ANG,ANP,APA,ARA,ARC,ARG,ARM,ARN,ARP,ART,ARW,ASM,AST,ATH,AUS,AVA,AVE,AWA,AYM,AZE,BAD,BAI,BAK,BAL,BAM,BAN,BAQ,BAS,BAT,BEJ,BEL,BEM,BEN,BER,BHO,BIH,BIK,BIN,BIS,BLA,BNT,BOD,BOS,BRA,BRE,BTK,BUA,BUG,BUL,BUR,BYN,CAD,CAI,CAR,CAT,CAU,CEB,CEL,CES,CHA,CHB,CHE,CHG,CHI,CHK,CHM,CHN,CHO,CHP,CHR,CHU,CHV,CHY,CMC,CNR,COP,COR,COS,CPE,CPF,CPP,CRE,CRH,CRP,CSB,CUS,CYM,CZE,DAK,DAN,DAR,DAY,DEL,DEN,DEU,DGR,DIN,DIV,DOI,DRA,DSB,DUA,DUM,DUT,DYU,DZO,EFI,EGY,EKA,ELL,ELX,ENG,ENM,EPO,EST,EUS,EWE,EWO,FAN,FAO,FAS,FAT,FIJ,FIL,FIN,FIU,FON,FRA,FRE,FRM,FRO,FRR,FRS,FRY,FUL,FUR,GAA,GAY,GBA,GEM,GEO,GER,GEZ,GIL,GLA,GLE,GLG,GLV,GMH,GOH,GON,GOR,GOT,GRB,GRC,GRE,GRN,GSW,GUJ,GWI,HAI,HAT,HAU,HAW,HEB,HER,HIL,HIM,HIN,HIT,HMN,HMO,HRV,HSB,HUN,HUP,HYE,IBA,IBO,ICE,IDO,III,IJO,IKU,ILE,ILO,INA,INC,IND,INE,INH,IPK,IRA,IRO,ISL,ITA,JAV,JBO,JPN,JPR,JRB,KAA,KAB,KAC,KAL,KAM,KAN,KAR,KAS,KAT,KAU,KAW,KAZ,KBD,KHA,KHI,KHM,KHO,KIK,KIN,KIR,KMB,KOK,KOM,KON,KOR,KOS,KPE,KRC,KRL,KRO,KRU,KUA,KUM,KUR,KUT,LAD,LAH,LAM,LAO,LAT,LAV,LEZ,LIM,LIN,LIT,LOL,LOZ,LTZ,LUA,LUB,LUG,LUI,LUN,LUO,LUS,MAC,MAD,MAG,MAH,MAI,MAK,MAL,MAN,MAO,MAP,MAR,MAS,MAY,MDF,MDR,MEN,MGA,MIC,MIN,MIS,MKD,MKH,MLG,MLT,MNC,MNI,MNO,MOH,MON,MOS,MRI,MSA,MUL,MUN,MUS,MWL,MWR,MYA,MYN,MYV,NAH,NAI,NAP,NAU,NAV,NBL,NDE,NDO,NDS,NEP,NEW,NIA,NIC,NIU,NLD,NNO,NOB,NOG,NON,NOR,NQO,NSO,NUB,NWC,NYA,NYM,NYN,NYO,NZI,OCI,OJI,ORI,ORM,OSA,OSS,OTA,OTO,PAA,PAG,PAL,PAM,PAN,PAP,PAU,PEO,PER,PHI,PHN,PLI,POL,PON,POR,PRA,PRO,PUS,QUE,RAJ,RAP,RAR,ROA,ROH,ROM,RON,RUM,RUN,RUP,RUS,SAD,SAG,SAH,SAI,SAL,SAM,SAN,SAS,SAT,SCN,SCO,SEL,SEM,SGA,SGN,SHN,SID,SIN,SIO,SIT,SLA,SLK,SLO,SLV,SMA,SME,SMI,SMJ,SMN,SMO,SMS,SNA,SND,SNK,SOG,SOM,SON,SOT,SPA,SQI,SRD,SRN,SRP,SRR,SSA,SSW,SUK,SUN,SUS,SUX,SWA,SWE,SYC,SYR,TAH,TAI,TAM,TAT,TEL,TEM,TER,TET,TGK,TGL,THA,TIB,TIG,TIR,TIV,TKL,TLH,TLI,TMH,TOG,TON,TPI,TSI,TSN,TSO,TUK,TUM,TUP,TUR,TUT,TVL,TWI,TYV,UDM,UGA,UIG,UKR,UMB,UND,URD,UZB,VAI,VEN,VIE,VOL,VOT,WAK,WAL,WAR,WAS,WEL,WEN,WLN,WOL,XAL,XHO,YAO,YAP,YID,YOR,YPK,ZAP,ZBL,ZEN,ZGH,ZHA,ZHO,ZND,ZUL,ZUN,ZXX,ZZA.",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SummarizeDocumentResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/summary/advanced": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Extract Summary from a Document using AI (Advanced)",
        "description": "Creates a summary of the input document using Artificial Intelligence.  Takes an advanced request object with configurable summary paragraph count.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractSummaryAdvanced",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "Advanced summary request containing the input file and options",
            "schema": {
              "$ref": "#/definitions/AdvancedSummarizeDocumentRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/AdvancedSummarizeDocumentResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/extract/split": {
      "post": {
        "tags": [
          "Extract"
        ],
        "summary": "Intelligently Split a Combined Document into Sub-Documents using AI",
        "description": "Analyzes a document containing multiple sub-documents (such as a scanned batch of ID cards, forms, or mixed documents) and intelligently splits it into separate sub-documents.  Uses AI to detect document boundaries based on visual content, headers, names, and document types.  Returns the page ranges and PDF bytes for each identified sub-document.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ExtractSplit",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document containing multiple sub-documents to split",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/SplitDocumentResponse"
            }
          }
        }
      }
    },
    "/document-ai/document/ontology/taxonomy/list": {
      "get": {
        "tags": [
          "Ontology"
        ],
        "summary": "Enumerate the Business Document Taxonomy",
        "description": "Returns the full hierarchical business document taxonomy (domains, categories, and subtypes) with display labels and codes.",
        "operationId": "GetDocumentTaxonomy",
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/DocumentTaxonomyResult"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ProblemDetails"
            }
          }
        }
      }
    },
    "/document-ai/document/ontology/taxonomy": {
      "post": {
        "tags": [
          "Ontology"
        ],
        "summary": "Classify a Document into the Business Document Taxonomy using Advanced AI",
        "description": "Classify a document into the standard business document taxonomy (a hierarchical set of domain.category.subtype categories such as finance.invoice.vendor_invoice, legal.contract.nda, or logistics.shipping.bill_of_lading) using Advanced AI.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page.",
        "operationId": "ClassifyDocumentTaxonomy",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "includeAnalysisRationale",
            "description": "Optional; Include a plain-language rationale for the classification in the response.  Default is true.",
            "type": "boolean"
          },
          {
            "in": "header",
            "name": "preprocessing",
            "description": "Optional; Set the level of image pre-processing to enhance accuracy.  Possible values are 'Auto', 'SmoothEdges', 'SmoothEdgesPlus', 'Compatability' and 'None'.  Default is Auto.",
            "type": "string"
          },
          {
            "in": "header",
            "name": "resultCrossCheck",
            "description": "Optional; Set the level of output accuracy cross-checking to perform on the input.  Possible values are 'None', 'Advanced', 'Ultra' and 'Hyper'.  Default is None.  Ultra and Hyper will produce the highest accuracy but at the cost of longer processing times.",
            "type": "string"
          },
          {
            "in": "header",
            "name": "maximumPagesProcessed",
            "description": "Optional; Limit the number of pages processed",
            "type": "integer",
            "format": "int32"
          },
          {
            "in": "header",
            "name": "rotateImageDegrees",
            "description": "Optional; Rotate the input image before recognition by the specified number of degrees; valid values range from -360 to +360.",
            "type": "number",
            "format": "double"
          },
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photo of a document, to classify",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ClassifyDocumentTaxonomyResult"
            }
          }
        }
      }
    },
    "/document-ai/document/ontology/entity": {
      "post": {
        "tags": [
          "Ontology"
        ],
        "summary": "Extract Structured Data from a Document using the Business Document Ontology",
        "description": "Classify a document into the business document taxonomy (when no classification is supplied), look up the data template for that document type, and use Advanced AI to populate the template with values extracted from the document.  Optionally also returns a one-paragraph summary of the document.  Input document formats supported include DOCX, PDF, XLSX, PPTX, EML, MSG, JPG, PNG and WEBP.  Consumes 100 API calls per page per AI pass; automatic classification and document summarization each add one pass.",
        "operationId": "ExtractOntology",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "ontologyCode",
            "description": "Optional; the taxonomy classification of the document (for example, finance.invoice.vendor_invoice).  If omitted, the document is classified automatically first.",
            "type": "string"
          },
          {
            "in": "header",
            "name": "includeAnalysisRationale",
            "description": "Optional; include a plain-language rationale for the automatic classification in the response.  Default is true.",
            "type": "boolean"
          },
          {
            "in": "header",
            "name": "includeSummary",
            "description": "Optional; also summarize the document and return the summary in DocumentSummary.  Default is true.",
            "type": "boolean"
          },
          {
            "in": "header",
            "name": "preprocessing",
            "description": "Optional; Set the level of image pre-processing to enhance accuracy.  Possible values are 'Auto', 'SmoothEdges', 'SmoothEdgesPlus', 'Compatability' and 'None'.  Default is Auto.",
            "type": "string"
          },
          {
            "in": "header",
            "name": "resultCrossCheck",
            "description": "Optional; Set the level of output accuracy cross-checking to perform during automatic classification.  Possible values are 'None', 'Advanced', 'Ultra' and 'Hyper'.  Default is None.",
            "type": "string"
          },
          {
            "in": "header",
            "name": "maximumPagesProcessed",
            "description": "Optional; Limit the number of pages processed",
            "type": "integer",
            "format": "int32"
          },
          {
            "in": "header",
            "name": "rotateImageDegrees",
            "description": "Optional; Rotate the input image before recognition by the specified number of degrees; valid values range from -360 to +360.",
            "type": "number",
            "format": "double"
          },
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photo of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/OntologyExtractionResult"
            }
          }
        }
      }
    },
    "/document-ai/document/batch-job/extract/text": {
      "post": {
        "tags": [
          "RunBatchJob"
        ],
        "summary": "Extract Text from a Document using AI as a Batch Job",
        "description": "Creates an async batch job for processing a large document as an AI batch job.  Input document formats supported include DOCX, PDF, PNG and JPG.  Supports a wide range of languages.  Requires Managed Instance or Private Cloud deployment.",
        "operationId": "ExtractTextFromDocumentBatchJob",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractDocumentBatchJobResult"
            }
          }
        }
      }
    },
    "/document-ai/document/batch-job/extract/fields/advanced": {
      "post": {
        "tags": [
          "RunBatchJob"
        ],
        "summary": "Extract Field Values from a Document using Advanced AI as a Batch Job",
        "description": "Creates an async batch job for processing a large document as an AI batch job.  Extract Field Values (e.g. Invoice Number, Invoice Date, Business Card Phone Number, etc.) from a document using Advanced AI.  Input document formats supported include DOCX, PDF, PNG and JPG.  Requires Managed Instance or Private Cloud deployment.",
        "operationId": "ExtractFieldsFromDocumentAdvancedBatchJob",
        "consumes": [
          "application/json",
          "text/json",
          "application/*+json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images",
            "type": "string"
          },
          {
            "in": "body",
            "name": "body",
            "description": "Input document and parameters",
            "schema": {
              "$ref": "#/definitions/AdvancedExtractFieldsRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractDocumentBatchJobResult"
            }
          }
        }
      }
    },
    "/document-ai/document/batch-job/extract/all": {
      "post": {
        "tags": [
          "RunBatchJob"
        ],
        "summary": "Extract All Fields and Tables of Data from a Document using AI as a Batch Job",
        "description": "Creates an async batch job for processing a large document as an AI batch job.  Extract all Fields and Tables, comprised of rows and columns of data, from a document using AI.  Input document formats supported include DOCX, PDF, PNG and JPG.  Requires Managed Instance or Private Cloud deployment.",
        "operationId": "ExtractAllFieldsAndTablesFromDocumentBatchJob",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractDocumentBatchJobResult"
            }
          }
        }
      }
    },
    "/document-ai/document/batch-job/extract/classify": {
      "post": {
        "tags": [
          "RunBatchJob"
        ],
        "summary": "Extract Classification or Category from a Document using AI as a Batch Job",
        "description": "Creates an async batch job for processing a large document as an AI batch job.  Extract Classification or Category (e.g. Invoice, Receipt, Tax Form, or Form 1040, Form 1040 EZ, etc.) from a document using AI.  Input document formats supported include DOCX, PDF, PNG and JPG.  Requires Managed Instance or Private Cloud deployment.",
        "operationId": "ExtractClassificationFromDocumentBatchJob",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Categories",
            "description": "Desired classification to extract",
            "type": "string"
          },
          {
            "in": "header",
            "name": "recognitionMode",
            "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, while Normal provides faster response but lower accuracy for low quality images",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "Input document, or photos of a document, to extract data from",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractDocumentBatchJobResult"
            }
          }
        }
      }
    },
    "/document-ai/document/batch-job/batch-job/status": {
      "get": {
        "tags": [
          "RunBatchJob"
        ],
        "summary": "Get the status and result of an Extract Document Batch Job",
        "description": "Returns the result of the Async Job - possible states can be STARTED or COMPLETED.  This API is only available for Cloudmersive Managed Instance and Private Cloud deployments.",
        "operationId": "GetAsyncJobStatus",
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "AsyncJobID",
            "description": "Job ID for the batch job to get the status of",
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/ExtractDocumentJobStatusResult"
            }
          }
        }
      }
    },
    "/document-ai/vectorize/text": {
      "post": {
        "tags": [
          "VectorEmbedding"
        ],
        "summary": "Generate a Vector Embedding from Text using Advanced AI",
        "description": "Convert input text into a numeric vector embedding that represents its semantic meaning.  The returned vector is normalized to unit length, so a dot product between two vectors gives their cosine similarity.  Consumes 1 API call per call.",
        "operationId": "VectorizeText",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "body",
            "description": "The input text and options",
            "schema": {
              "$ref": "#/definitions/VectorizeTextRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VectorEmbeddingResult"
            }
          }
        }
      }
    },
    "/document-ai/vectorize/document": {
      "post": {
        "tags": [
          "VectorEmbedding"
        ],
        "summary": "Generate a Vector Embedding from a Document using Advanced AI",
        "description": "Automatically extract the text from an uploaded document and convert it into a numeric vector embedding representing its semantic meaning.  The returned vector is normalized to unit length, so a dot product between two vectors gives their cosine similarity.  Supported input formats include DOCX, PDF, XLSX, PPTX, TXT, HTML and more.  Consumes 1 API call per call.",
        "operationId": "VectorizeDocument",
        "consumes": [
          "multipart/form-data"
        ],
        "produces": [
          "text/plain",
          "application/json",
          "text/json"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "model",
            "description": "Optional; quality mode - 'Advanced' (default) produces the highest-quality embedding",
            "type": "string"
          },
          {
            "in": "formData",
            "name": "InputFile",
            "description": "The document to extract text from and embed",
            "type": "file"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/VectorEmbeddingResult"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "AdvancedExtractClassificationRequest": {
      "description": "Request to perform an AI document classification on a document",
      "type": "object",
      "properties": {
        "InputFile": {
          "format": "byte",
          "description": "Input document file to perform the operation on as a byte array",
          "type": "string"
        },
        "Categories": {
          "description": "Possible categories for the document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentCategories"
          }
        },
        "Preprocessing": {
          "description": "Optional: Set the level of image pre-processing to enhance accuracy.  Possible values are 'Auto', 'SmoothEdges', 'SmoothEdgesPlus', '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 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', 'Ultra' and 'Hyper'.  Default is None.  Ultra and Hyper will produce the highest accuracy but at the cost of longer processing times.",
          "type": "string"
        },
        "MaximumPagesProcessed": {
          "format": "int32",
          "description": "Optional: Limit the number of pages processed",
          "type": "integer"
        },
        "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
    },
    "AdvancedExtractFieldsRequest": {
      "description": "Request to perform an AI field extraction on a document",
      "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": "#/definitions/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
    },
    "AdvancedSummarizeDocumentRequest": {
      "description": "Request for the advanced summary endpoint",
      "type": "object",
      "properties": {
        "InputFile": {
          "format": "byte",
          "description": "Input document file to perform the operation on as a byte array",
          "type": "string"
        },
        "RecognitionMode": {
          "description": "Optional; Recognition mode - Advanced (default) provides the highest accuracy but slower speed, Normal provides faster response but lower accuracy for low quality images, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
          "type": "string"
        },
        "Language": {
          "description": "Optional; Three-letter language code (ISO 639) for the summary.  Default is ENG.",
          "type": "string"
        },
        "SummaryParagraphCount": {
          "format": "int32",
          "description": "Optional; Number of paragraphs the summary should be.  Default is 1.",
          "type": "integer"
        }
      },
      "additionalProperties": false
    },
    "AdvancedSummarizeDocumentResponse": {
      "description": "Result of the advanced summary operation",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentSummaryText": {
          "description": "Summary of the document",
          "type": "string"
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0, where values > 0.8 indicate high confidence",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "ClassifyDocumentTaxonomyResult": {
      "description": "Result of classifying a document against the business document taxonomy",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentCategoryResult": {
          "description": "Taxonomy category applied to the document, in domain.category.subtype form (for example, finance.invoice.vendor_invoice).  If a category could not be confidently identified, then \"unknown._unknown._unknown\" will be used.",
          "type": "string"
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0, where values > 0.8 indicate high confidence",
          "type": "number"
        },
        "AnalysisRationale": {
          "description": "Plain-language rationale explaining why this category was selected; populated when IncludeAnalysisRationale is enabled",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentAdvancedClassificationResult": {
      "description": "Result of classifying a document using AI",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentCategoryResult": {
          "description": "Category applied to the document; if a category could not be identified then \"other\" will be used.  Spaces are replaced with underscores.",
          "type": "string"
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0, where values > 0.8 indicate high confidence",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "DocumentCategories": {
      "description": "Document category option",
      "type": "object",
      "properties": {
        "CategoryName": {
          "description": "Name of the classification",
          "type": "string"
        },
        "CategoryDescription": {
          "description": "Optional but recommended: Description of the classification in natural langugage",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentClassificationResult": {
      "description": "Result of classifying a document using AI",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentCategoryResult": {
          "description": "Category applied to the document; if a category could not be identified then \"other\" will be used.  Spaces are replaced with underscores.",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentPolicyRequest": {
      "description": "Request to analyze a document",
      "type": "object",
      "properties": {
        "InputFile": {
          "format": "byte",
          "description": "Input file as a byte array",
          "type": "string"
        },
        "Rules": {
          "description": "Rules to apply to the document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PolicyRule"
          }
        },
        "RecognitionMode": {
          "description": "Optional; Recognition mode - Normal (default) provides the highest accuracy but slower speed, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentPolicyResult": {
      "description": "Result of performing a document policy enforcement operation",
      "type": "object",
      "properties": {
        "CleanResult": {
          "description": "True if the document complies with all of the policies, and false if it does not",
          "type": "boolean"
        },
        "RiskScore": {
          "format": "double",
          "description": "Risk score between 0.0 and 1.0 where values above 0.5 are increasing levels of risk",
          "type": "number"
        },
        "RuleViolations": {
          "description": "Policy violations",
          "type": "array",
          "items": {
            "$ref": "#/definitions/PolicyRuleViolation"
          }
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionAnswerItem": {
      "description": "Answer to an input question",
      "type": "object",
      "properties": {
        "QuestionId": {
          "description": "ID of the input question",
          "type": "string"
        },
        "AnswerValue": {
          "description": "Answer response value, formatted as a string, for this question.  Boolean questions will return YES or NO.",
          "type": "string"
        },
        "AnswerRationale": {
          "description": "Rationale explaining why this answer was given",
          "type": "string"
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0 where values above 0.8 indicate high confidence",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionAnswersResult": {
      "description": "Result of performing a document question answering operation",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if the operation was completed successfully, or false otherwise",
          "type": "boolean"
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0 where values above 0.8 indicate high confidence",
          "type": "number"
        },
        "AnswerResults": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentQuestionAnswerItem"
          }
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionBoolean": {
      "description": "Boolean document question",
      "type": "object",
      "properties": {
        "QuestionId": {
          "description": "Unique ID of the question, e.g. 1 or 2A",
          "type": "string"
        },
        "QuestionText": {
          "description": "Question in natural language to ask of the document where the answer resolves to YES or NO, e.g. 'Is this document signed and countersigned by both parties?'",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionChoiceItem": {
      "description": "Possible response choice for a multiple-choice question",
      "type": "object",
      "properties": {
        "ChoiceId": {
          "description": "Unique ID of the response choice, e.g. 3C",
          "type": "string"
        },
        "ChoiceText": {
          "description": "Description text of this choice, e.g. 'Delaware'",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionFreeResponse": {
      "description": "Free response question",
      "type": "object",
      "properties": {
        "QuestionId": {
          "description": "Unique ID of the question, e.g. 7 or 5A",
          "type": "string"
        },
        "QuestionText": {
          "description": "Question in natural language to ask of the document where the answer resolves to a free response, e.g. 'Who is the counterparty in this agreement?'",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionMultipleChoice": {
      "description": "Multiple choice question",
      "type": "object",
      "properties": {
        "QuestionId": {
          "description": "Unique ID of the question, e.g. 1 or 2A",
          "type": "string"
        },
        "QuestionText": {
          "description": "Question in natural language to ask of the document where the answer resolves to one of a fixed number of provided choices, e.g. 'What is the governing law of this agreement?'",
          "type": "string"
        },
        "ResponseChoices": {
          "description": "Possible response choices for the multiple-choice question",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentQuestionChoiceItem"
          }
        }
      },
      "additionalProperties": false
    },
    "DocumentQuestionsRequest": {
      "type": "object",
      "properties": {
        "InputFile": {
          "format": "byte",
          "description": "Input file as a byte array",
          "type": "string"
        },
        "QuestionsYesNo": {
          "description": "Optional: Yes or No boolean questions to answer about the document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentQuestionBoolean"
          }
        },
        "QuestionsMultipleChoice": {
          "description": "Optional: Multiple choice questions to answer about the document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentQuestionMultipleChoice"
          }
        },
        "QuestionsFreeResponse": {
          "description": "Optional: Free response questions to answer about the document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/DocumentQuestionFreeResponse"
          }
        },
        "RecognitionMode": {
          "description": "Optional; Recognition mode - Normal (default) provides the highest accuracy but slower speed, FastPlus provides even faster processing at somewhat reduced accuracy, Fast provides faster processing at reduced accuracy, and FastMini provides the fastest processing at significantly reduced accuracy",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "DocumentTaxonomyResult": {
      "description": "The business document taxonomy, as nested domains, categories, and subtypes",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "Domains": {
          "description": "Top-level domains of the taxonomy (for example, finance, legal, logistics)",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaxonomyDomainNode"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractBarcodesAiResponse": {
      "description": "Result of extracting barcodes from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "BarcodeResults": {
          "description": "Table value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExtractedBarcodeItem"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractDocumentBatchJobResult": {
      "description": "Result of performing a split document batch job",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "AsyncJobID": {
          "description": "When creating a job, an Async Job ID is returned.  Use the GetAsyncJobStatus API to check on the status of this job using the AsyncJobID and get the result when it finishes",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ExtractDocumentJobStatusResult": {
      "description": "Result of performing a batch job operation",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if the operation to check the status of the job was successful, false otherwise",
          "type": "boolean"
        },
        "AsyncJobStatus": {
          "description": "Returns the job status of the Async Job, if applicable.  Possible states are STARTED and COMPLETED",
          "type": "string"
        },
        "AsyncJobID": {
          "description": "Job ID",
          "type": "string"
        },
        "ExtractTextResult": {
          "$ref": "#/definitions/ExtractTextResponse"
        },
        "ExtractFieldsAndTablesResult": {
          "$ref": "#/definitions/ExtractFieldsAndTablesResponse"
        },
        "ExtractFieldsResult": {
          "$ref": "#/definitions/ExtractFieldsResponse"
        },
        "ExtractClassificationResult": {
          "$ref": "#/definitions/DocumentClassificationResult"
        },
        "ErrorMessage": {
          "description": "Error message (if any)",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ExtractFieldsAdvancedResponse": {
      "description": "Result of extracting fields from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "Results": {
          "description": "Field value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FieldAdvancedValue"
          }
        },
        "ConfidenceScore": {
          "format": "double",
          "description": "Confidence score between 0.0 and 1.0, where values > 0.8 indicate high confidence",
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "ExtractFieldsAndTablesResponse": {
      "description": "Result of extracting fields from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "FieldResults": {
          "description": "Field value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FieldValue"
          }
        },
        "TableResults": {
          "description": "Table value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TableResult"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractFieldsResponse": {
      "description": "Result of extracting fields from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "Results": {
          "description": "Field value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/FieldValue"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractTablesResponse": {
      "description": "Result of extracting tables from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "TableResults": {
          "description": "Table value results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TableResult"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractTextResponse": {
      "description": "Result of extracting text from a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "PageResults": {
          "description": "Page results from the extraction operation",
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExtractedTextPage"
          }
        }
      },
      "additionalProperties": false
    },
    "ExtractedBarcodeItem": {
      "description": "Extracted barcode result",
      "type": "object",
      "properties": {
        "BarcodeType": {
          "description": "Type of the barcode identified, possible values are: AZTEC, CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, MAXICODE, PDF_417, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E, All_1D, UPC_EAN_EXTENSION, MSI, PLESSEY, IMB, UNKNOWN",
          "type": "string"
        },
        "BarcodeValue": {
          "description": "Value of the barcode as a string",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ExtractedTextPage": {
      "description": "Extracted page from an input document",
      "type": "object",
      "properties": {
        "PageNumber": {
          "format": "int32",
          "description": "Page number index, 1-based",
          "type": "integer"
        },
        "TextResult": {
          "description": "Text content of the page",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "FieldAdvancedValue": {
      "description": "Field value result of extracting fields from a document",
      "type": "object",
      "properties": {
        "FieldName": {
          "description": "Name of the field (note that spaces will be replaced with underscore)",
          "type": "string"
        },
        "FieldStringValue": {
          "description": "String value of the field that was extractged from the document",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "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
    },
    "FieldValue": {
      "description": "Field value result of extracting fields from a document",
      "type": "object",
      "properties": {
        "FieldName": {
          "description": "Name of the field (note that spaces will be replaced with underscore)",
          "type": "string"
        },
        "FieldStringValue": {
          "description": "Primary or first string value of the field that was extractged from the document",
          "type": "string"
        },
        "AdditionalFieldStringValues": {
          "description": "Additional values for this field when the same field is present with multiple values, for example, if two instances of the same form occur in the same document",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false
    },
    "OntologyExtractionResult": {
      "description": "Result of extracting structured data from a document using its business document ontology",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if a populated ontology was produced, false otherwise",
          "type": "boolean"
        },
        "DocumentSummary": {
          "description": "One-paragraph plain-language summary of the document; populated when IncludeSummary is enabled",
          "type": "string"
        },
        "OntologyCode": {
          "description": "The taxonomy category applied to the document, in domain.category.subtype form (for example, finance.invoice.vendor_invoice)",
          "type": "string"
        },
        "OntologyTitle": {
          "description": "Human-readable title of the document type (for example, \"Vendor Invoice\")",
          "type": "string"
        },
        "WasAutoClassified": {
          "description": "True if the category was determined automatically because no classification was supplied in the request",
          "type": "boolean"
        },
        "ClassificationConfidenceScore": {
          "format": "double",
          "description": "Classification confidence score between 0.0 and 1.0; populated only when the category was determined automatically",
          "type": "number"
        },
        "AnalysisRationale": {
          "description": "Plain-language rationale for the classification; populated when the category was determined automatically and IncludeAnalysisRationale is enabled",
          "type": "string"
        },
        "OntologyTemplateFound": {
          "description": "True if a data template was available for the document type",
          "type": "boolean"
        },
        "PopulatedOntology": {
          "description": "The extracted data as a JSON object of field values (field name to value; nested objects for object fields, arrays of objects for array fields).  Fields not found in the document are null.  Null when no template was available for the document type."
        }
      },
      "additionalProperties": false
    },
    "PolicyRule": {
      "type": "object",
      "properties": {
        "RuleId": {
          "description": "",
          "type": "string"
        },
        "RuleType": {
          "description": "Possible values are ALLOW and DENY",
          "type": "string"
        },
        "RuleDescription": {
          "description": "Description of the rule in natural language, e.g. Do not allow documents that contain offensive language",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "PolicyRuleViolation": {
      "description": "Instances of a policy rule violation",
      "type": "object",
      "properties": {
        "RuleId": {
          "description": "ID of the rule; if no ID was supplied, the ID is the 1-based index of the rule",
          "type": "string"
        },
        "RuleViolationRiskScore": {
          "format": "double",
          "description": "Risk score between 0.0 and 1.0 where values above 0.5 are increasing levels of risk",
          "type": "number"
        },
        "RuleViolationRationale": {
          "description": "AI natural language rationale for why this policy was violated",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "ProblemDetails": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "format": "int32",
          "type": "integer"
        },
        "detail": {
          "type": "string"
        },
        "instance": {
          "type": "string"
        }
      },
      "additionalProperties": { }
    },
    "SplitDocumentResponse": {
      "description": "Result of splitting a document into sub-documents",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "SubDocuments": {
          "description": "The sub-documents that were identified and extracted from the input document",
          "type": "array",
          "items": {
            "$ref": "#/definitions/SubDocument"
          }
        }
      },
      "additionalProperties": false
    },
    "SubDocument": {
      "description": "A sub-document extracted from a combined document",
      "type": "object",
      "properties": {
        "StartPage": {
          "format": "int32",
          "description": "Starting page number (1-indexed) of this sub-document in the original document",
          "type": "integer"
        },
        "EndPage": {
          "format": "int32",
          "description": "Ending page number (1-indexed) of this sub-document in the original document",
          "type": "integer"
        },
        "DocumentDescription": {
          "description": "Description of the sub-document including document type and any identifying information such as person name",
          "type": "string"
        },
        "FileBytes": {
          "format": "byte",
          "description": "The extracted sub-document as PDF file bytes",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "SummarizeDocumentResponse": {
      "description": "Result of summarizing a document",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if successful, false otherwise",
          "type": "boolean"
        },
        "DocumentSummaryText": {
          "description": "Summary of the document",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TableResult": {
      "description": "Table extracted from a document",
      "type": "object",
      "properties": {
        "Title": {
          "description": "Title of the table (optional)",
          "type": "string"
        },
        "Rows": {
          "description": "Rows of the table",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TableResultRow"
          }
        }
      },
      "additionalProperties": false
    },
    "TableResultCell": {
      "description": "Cell of a row of a table extracted from a document",
      "type": "object",
      "properties": {
        "CellHeader": {
          "description": "Cell column header",
          "type": "string"
        },
        "CellValue": {
          "description": "Cell value as a string",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "TableResultRow": {
      "description": "Row of a table extracted from a document",
      "type": "object",
      "properties": {
        "Cells": {
          "description": "Cells in the row",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TableResultCell"
          }
        }
      },
      "additionalProperties": false
    },
    "TaxonomyCategoryNode": {
      "description": "A category within a domain (the first two segments of an ontology code)",
      "type": "object",
      "properties": {
        "Code": {
          "description": "Category code, the first two segments of an ontology code (for example, finance.invoice)",
          "type": "string"
        },
        "Label": {
          "description": "Human-readable display label (for example, Invoices)",
          "type": "string"
        },
        "Subtypes": {
          "description": "Document subtypes within this category",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaxonomySubtypeNode"
          }
        }
      },
      "additionalProperties": false
    },
    "TaxonomyDomainNode": {
      "description": "A top-level domain of the business document taxonomy",
      "type": "object",
      "properties": {
        "Code": {
          "description": "Domain code, the first segment of an ontology code (for example, finance)",
          "type": "string"
        },
        "Label": {
          "description": "Human-readable display label (for example, Finance)",
          "type": "string"
        },
        "Categories": {
          "description": "Categories within this domain",
          "type": "array",
          "items": {
            "$ref": "#/definitions/TaxonomyCategoryNode"
          }
        }
      },
      "additionalProperties": false
    },
    "TaxonomySubtypeNode": {
      "description": "A document subtype (a full taxonomy leaf code)",
      "type": "object",
      "properties": {
        "Code": {
          "description": "The full ontology code (for example, finance.invoice.vendor_invoice)",
          "type": "string"
        },
        "Label": {
          "description": "Human-readable display label (the subtype description, for example, \"Vendor / supplier invoice (AP)\")",
          "type": "string"
        }
      },
      "additionalProperties": false
    },
    "VectorEmbeddingResult": {
      "description": "Result of generating a vector embedding",
      "type": "object",
      "properties": {
        "Successful": {
          "description": "True if an embedding vector was produced, false otherwise",
          "type": "boolean"
        },
        "Embedding": {
          "description": "The embedding vector - an array of numbers representing the semantic meaning of the input.  The vector is normalized to unit length, so a dot product between two vectors gives their cosine similarity.",
          "type": "array",
          "items": {
            "format": "float",
            "type": "number"
          }
        },
        "Dimension": {
          "format": "int32",
          "description": "The length of the Embedding vector (for example, 1024).  Use this to size your vector store.",
          "type": "integer"
        },
        "TextCharacterCount": {
          "format": "int32",
          "description": "The number of characters of text that were extracted from the document and embedded; populated for the document endpoint",
          "type": "integer"
        },
        "Truncated": {
          "description": "True if the input exceeded the maximum length supported and was truncated before embedding",
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "VectorizeTextRequest": {
      "description": "Request to generate a vector embedding from text",
      "type": "object",
      "properties": {
        "TextInput": {
          "description": "The text to convert into an embedding vector",
          "type": "string"
        },
        "Model": {
          "description": "Optional; quality mode - 'Advanced' (default) produces the highest-quality embedding",
          "type": "string"
        }
      },
      "additionalProperties": false
    }
  },
  "securityDefinitions": {
    "Apikey": {
      "type": "apiKey",
      "name": "Apikey",
      "in": "header",
      "description": "API Key Authentication"
    }
  },
  "security": [
    {
      "Apikey": [ ]
    }
  ]
}