Scan Prompt
Endpointβ
https://api.verifik.co/v2/ocr/scan-prompt
Scan Prompt Document Scanning with AI Integration is a powerful tool designed to streamline the extraction of text from legal documents, supporting your Know Your Customer (KYC) process. This service harnesses advanced AI to automatically detect document types and utilizes proprietary technology for accurate data extraction.
Headersβ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parametersβ
| Name | Type | Required | Description |
|---|---|---|---|
image | string | Yes | Image in Base64 encoded format or a URL where the image is hosted. |
cropFace | boolean | No | If you want to crop the face out of the document, pass this as true. |
documentType | string | No | You could specify the documentType so the AI doesn't have to guess what document type are we extracting. |
Requestβ
- Node.js
- Python
import axios from "axios";
const { data } = await axios.post("https://api.verifik.co/v2/ocr/scan-prompt", {
image: "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",
cropFace: true,
documentType: "DNI"
}, {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`
},
});
console.log(data);
import os, requests
url = "https://api.verifik.co/v2/ocr/scan-prompt"
headers = {"Content-Type": "application/json", "Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}"}
payload = {
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ...",
"cropFace": True,
"documentType": "DNI"
}
r = requests.post(url, json=payload, headers=headers)
print(r.json())
Responseβ
- 200
- 404
{
"id": "xjicp",
"data": {
"__v": 0,
"_id": "64d3ed6aed1c7d7ea391e617",
"url": "https://cdn.verifik.co/ocr/64404b1f9856cc8cebd762e7/1691610471704-image.jpeg",
"type": "ocr",
"client": "64404b1f9856cc8cebd762e7",
"status": "ACTIVE_BUT_UNVERIFIED",
"deleted": false,
"createdAt": "2023-08-09T19:47:54.214Z",
"updatedAt": "2023-08-09T19:47:54.214Z",
"requires2FA": false,
"documentType": "CUSTOM",
"OCRExtraction": {
"fullName": "Juan Miguel RodrΓguez LΓ³pez",
"lastName": "RodrΓguez LΓ³pez",
"firstName": "Juan Miguel",
"documentNumber": "01101101 01100001"
},
"documentNumber": "01101101 01100001",
"imageValidated": false,
"validationMethod": "SCAN_GPT"
},
"signature": {
"message": "Certified by Verifik.co",
"dateTime": "August 9, 2023 7:47 PM"
}
}
{
"message": "Document not found",
"code": "DOCUMENT_NOT_FOUND"
}
Featuresβ
- AI-Powered Document Type Extraction: Automatically identifies the type of legal document.
- Precise data extraction: Employs custom technology to extract relevant information with high accuracy.
- Flexible prompt templates: Uses pre-designed system prompts for efficient out-of-the-box extraction. Also allows users to create custom templates to refine logic, adjust extracted fields, or enhance the process by adding/removing data points.
Notesβ
- Use Base64 encoded images or direct URLs for the
imageparameter. - The
cropFaceparameter helps improve accuracy by focusing on document content. - Specify
documentTypewhen you know the document type for better results.