Skip to content
Constaia

Angular

Validate documents with AI in Angular

An Angular service sends the file to your server, which is the one that talks to Constaia.

Installation

# sin dependencias en el cliente

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.

Full guide
verify.service.ts
import { HttpClient } from "@angular/common/http";
import { Injectable, inject } from "@angular/core";

export interface VerifyResult {
  status: "valid" | "invalid" | "review";
  reasons: { code: string; message: string }[];
}

@Injectable({ providedIn: "root" })
export class VerifyService {
  private http = inject(HttpClient);

  // Sends the file to YOUR backend, which calls Constaia with the secret key
  verify(file: File) {
    const body = new FormData();
    body.append("file", file);
    return this.http.post<VerifyResult>("/api/verify", body);
  }
}

One call. An answer you can act on.

  1. 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.

  2. 02

    We read, classify and check

    Text reading, AI classification and fixed checks: PDF417 barcodes, machine-readable zones, ABA routing numbers, dates and totals.

  3. 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.