Vue
Validate documents with AI in Vue
The same upload component in a Vue 3 version: it receives the result and shows the verdict.
Installation
npm i @constaia/widget
The safe pattern
The browser or app never sees your secret key. The file goes to your server, your server calls Constaia and returns the result. If you do not have a server, use the widget with a publishable key.
<script setup lang="ts">
import { ConstaiaUpload, type Analysis } from "@constaia/widget/vue";
function onResult(analysis: Analysis) {
console.log(analysis.verdict?.status); // "valid" | "invalid" | "review"
}
</script>
<template>
<ConstaiaUpload endpoint="/api/verify" document="es_dni" lang="es" @result="onResult" />
</template>One call. An answer you can act on.
- 01
Send the document and what you expect
A photo, screenshot or PDF. Tell us which document you expect and the rules it must meet: not expired, issued in the last 60 days, in this person's name.
- 02
We read, classify and check
Text reading, AI classification and fixed checks: PDF417 barcodes, machine-readable zones, ABA routing numbers, dates and totals.
- 03
Get the verdict and the file is deleted
Valid, invalid or review, with the reasons in your language. By default, the file is deleted when the analysis ends unless it needs review.
And for the record…
Create your free account and validate your first document in five minutes. No credit card required.