ExtractionResponse
Response from the extraction endpoint containing the extracted structured data and metadata about the extraction process.
Example Usage
typescript
import { ExtractionResponse } from "@meetkai/mka1/models/components";
let value: ExtractionResponse = {
success: true,
data: {
"invoice_number": "INV-2024-001",
"vendor_name": "Acme Corporation",
"total_amount": 1250,
"date": "2024-01-15",
},
metadata: {
model: "openai:gpt-4o",
filename: "invoice.pdf",
fileSize: 125000,
extractedAt: "2024-01-15T10:30:00Z",
},
};Fields
| Field | Type | Required | Description |
|---|---|---|---|
success | boolean | ✔️ | Indicates whether the extraction request was successful |
data | any | ➖ | The extracted structured data conforming to the provided JSON Schema. This is the result of analyzing the file and extracting information according to the schema definition. |
metadata | components.ExtractionResponseMetadata | ✔️ | Metadata about the extraction request and execution |