Vanguard AI

OCR

Read Lao government documents and bank cards into structured JSON.

POST /v1/ocr/scan API key

Send the document as multipart/form-data. The type hint is optional — when omitted the service auto‑detects the document type.

Form fields

image *
file
The document image or PDF. Max 15 MB.
type
string
Document type hint (see below). Auto-detected when omitted.
projectId
uuid
Attach the result to a project.

Headers

X-Storage-Option
none | platform | byo
Opt into result storage. PRO/ENTERPRISE only. Default: none.

Supported document types

PASSPORT · ID_CARD_NEW · ID_CARD_OLD · DRIVING_LICENSE · BANK_CARD · ENTERPRISE_REGISTRATION

Example

200 Extraction result
{
  "status": "success",
  "service": "ocr",
  "data": {
    "documentType": "PASSPORT",
    "surname": "SISOMPHONE",
    "givenNames": "SOUKAN",
    "passportNo": "P1234567",
    "dateOfBirth": "1990-05-12",
    "dateOfExpiry": "2030-05-11"
  },
  "credits": 1,
  "latencyMs": 842,
  "stored": null
}

The data object’s shape depends on the detected document type. Each field is best‑effort — always validate against your own expectations before relying on a value.