Skip to content

CreateExtractSchemaRequest

Example Usage

typescript
import { CreateExtractSchemaRequest } from "@meetkai/mka1/models/operations";

let value: CreateExtractSchemaRequest = {
  extractionSchema: {
    name: "Invoice Extraction",
    description: "Schema for extracting invoice data from PDF documents",
    schema: {
      "type": "object",
      "properties": {
        "invoice_number": {
          "type": "string",
        },
        "vendor_name": {
          "type": "string",
        },
        "total_amount": {
          "type": "number",
        },
        "date": {
          "type": "string",
          "format": "date",
        },
      },
      "required": [
        "invoice_number",
        "total_amount",
      ],
    },
  },
};

Fields

FieldTypeRequiredDescriptionExample
xOnBehalfOfstringOptional external end-user identifier forwarded by the API gateway.
extractionSchemacomponents.ExtractionSchema✔️N/A{
"name": "Invoice Extraction",
"description": "Schema for extracting invoice data from PDF documents",
"schema": {
"type": "object",
"properties": {
"invoice_number": {
"type": "string"
},
"vendor_name": {
"type": "string"
},
"total_amount": {
"type": "number"
},
"date": {
"type": "string",
"format": "date"
}
},
"required": [
"invoice_number",
"total_amount"
]
}
}