Mexico โ INE OCR
One-shot flow for a Mexican INE (Credencial para Votar):
- Verifik Gemini OCR extracts credential fields from front (and optional back) images
- Verifik builds identifier params from that extraction
- Nexcar validate runs with numbers only (no vendor image OCR)
- Response returns
ocr,validation, andvalidateParamsUsed
Send JSON with:
front(required) โ public URL or base64 image of the credential frontback(optional) โ public URL or base64 of the reverse; strongly recommended for CIC, OCR, and MRZ
For numbers-only electoral validation (no images), use Mexico โ INE Validation (GET v2/mx/ine). For CURP identity lookup, use Mexican Citizen (CURP) (v2/mx/curp).
API referenceโ
Endpointโ
https://api.verifik.co/v2/mx/ine/ocr
Submit front (and optional back) images. Verifik optimizes image size, runs Gemini OCR, then validates extracted identifiers with Nexcar. Allow client timeouts of at least 60 seconds.
Headersโ
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
Parametersโ
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
front | string | Yes | Front image as a public URL or base64 string (with or without data: prefix). | https://example.com/ine-front.jpg |
back | string | No | Back image as a public URL or base64 string. Improves CIC/OCR accuracy. | https://example.com/ine-back.jpg |
Requestโ
- Node.js
- Python
import axios from "axios";
const { data } = await axios.post(
"https://api.verifik.co/v2/mx/ine/ocr",
{
front: "https://example.com/ine-front.jpg",
back: "https://example.com/ine-back.jpg",
},
{
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.VERIFIK_TOKEN}`,
},
}
);
console.log(data);
import os, requests
url = "https://api.verifik.co/v2/mx/ine/ocr"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {os.getenv('VERIFIK_TOKEN')}",
}
payload = {
"front": "https://example.com/ine-front.jpg",
"back": "https://example.com/ine-back.jpg",
}
r = requests.post(url, headers=headers, json=payload)
print(r.json())
Responseโ
- 200
- 404
- 409
{
"data": {
"ocr": {
"birthDate": "11/06/1976",
"cic": "187639699",
"citizenIdentifier": "031206745",
"curp": "MAFC760611MYNRLR03",
"documentType": "INE",
"electorKey": "CSFTGV76061131H400",
"firstName": "CARLA ISABEL",
"fullName": "CARLA ISABEL MARTINEZ FERNANDEZ",
"ocr": "0276031206745",
"subType": "E",
"type": "INE",
"validity": "2029"
},
"validation": {
"cic": "187639699",
"documentNumber": "187639699",
"documentType": "INE",
"electorKey": "CSFTGV76061131H400",
"ocr": "0276031206745",
"status": "OK",
"validity": "31 de diciembre de 2030"
},
"validateParamsUsed": {
"documentType": "INE",
"documentNumber": "187639699",
"ocr": "0276031206745",
"citizenIdentifier": "031206745",
"model": "E"
}
},
"signature": {
"dateTime": "July 14, 2026 10:00 AM",
"message": "Certified by Verifik.co"
}
}
{
"code": "NotFound",
"message": "Record not found."
}
{
"code": "MissingParameter",
"message": "front is required"
}
Notesโ
- Billed as
mexico_api_ine_ocronce for the combined Gemini OCR + Nexcar validate shot. frontis required;backis optional but recommended for CIC, OCR, citizen identifier, and MRZ.- Images are resized/compressed before Gemini to reduce payload size.
- If OCR cannot extract a usable identifier (
cic,ocr, or clave de elector), the request returns 409 and Nexcar is not called. - If identifiers are extracted but Nexcar validate fails, the endpoint fails like
GET /v2/mx/inewith those numbers. - Sandbox: any valid
frontstring returns a nested fixture; afrontvalue containing404returns 404. - Related: Mexico โ INE Validation, Mexican Citizen (CURP).