Skip to main content

Extract

The top-level extract() method is the primary entry point. Send a document and schema, receive structured validated data.

await talonic.extract({
  file_path: "./invoice.pdf",
  schema: {
    vendor_name: "string",
    total_amount: "number",
  },
})

Accepts file_path (local file), file_url (remote URL), file_data + filename (base64 bytes), or document_id (previously uploaded). Provide a schema (inline definition) or schema_id (saved schema UUID).