Skip to main content

Scan Agent

Scan Agent extracts structured fields from a document image. Call POST https://api.verifik.co/v2/ocr/scan-gpt. image is required. documentType, backImage, and template are optional. There is no country field on this body. The stored extraction sets validationMethod to SCAN_AGENT.

What the call returns​

  • Extracted documentType, documentNumber, and name
  • validationMethod — SCAN_AGENT

Use cases​

  • Read an identity document from one image.
  • Add the back image when the card has a second side.
  • Pin a template when the layout is known.

API Reference​

Endpoint​

POST https://api.verifik.co/v2/ocr/scan-gpt

A hit includes the extracted document fields and validationMethod SCAN_AGENT. The URL stays /v2/ocr/scan-gpt.

Headers​

NameValueDescription
Content-Typeapplication/jsonRequest payload format
Acceptapplication/jsonResponse format
AuthorizationBearer <your_token>Client JWT

Parameters​

NameTypeRequiredExampleDescription
imagestringYesdata:image/jpeg;base64,AAAAFront image as base64 or a data URI. Required.
documentTypestringNoCCOptional document family, such as CC or DNI.
backImagestringNodata:image/jpeg;base64,BBBBOptional back image.
templatestringNotemplate_idOptional template id.

Request​

import axios from "axios";

const options = {
method: "POST",
url: "https://api.verifik.co/v2/ocr/scan-gpt",
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer <your_token>",
},
data: {
"image": "data:image/jpeg;base64,AAAA",
"documentType": "CC"
},
};

try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error.response ? error.response.data : error.message);
}

Response​

{
"data": {
"documentType": "CC",
"documentNumber": "1234567890",
"fullName": "MARIA LOPEZ",
"validationMethod": "SCAN_AGENT"
},
"signature": {
"dateTime": "November 27, 2026 12:00 PM",
"message": "Certified by Verifik.co"
}
}

Notes​

  • image is required. documentType, backImage, and template are optional.
  • Do not send a country field. This body does not accept one.
  • The recorded method is SCAN_AGENT and the URL remains /v2/ocr/scan-gpt.
  • Send a Bearer JWT in the Authorization header.
  • The JSON sample illustrates the fields. A live call returns the record for the values you send.
  • Do not send a cache-bypass flag. This page documents only the client parameters.

Sandbox​

ScenarioParametersResult
Record on fileimage plus documentType: "CC"200 with extracted fields and validationMethod SCAN_AGENT.
Missing required valueOmit image409 MissingParameter.
Unknown valueimage and backImage200 when a back image is also sent.

401 when the bearer token is missing or rejected.