Documentation / Quickstart

Quickstart

Read both sides of an INE from your backend and receive structured JSON.

INE API reads the printed text on a Mexican INE credential. Send one front image and one back image from your server. The English API returns eight scalar fields and an optional three-line MRZ.

Every result requires review. The service does not verify the document's authenticity, the person's identity, or registration status with INE. Accuracy and response time depend on the photographs; neither perfect accuracy nor a fixed completion time is guaranteed.

Get access

Contact ecodevcontact@gmail.com to arrange a plan and receive an API key. Provisioning and billing are handled manually. Keep the key in your backend's secret storage.

The base URL is:

https://ocr.ecostudios.dev/api/v3

Send one reading

Set INE_API_KEY privately in your server environment. Save a stable business transaction identifier before making the request. The example below sends one POST and does not retry it automatically.

export INE_API_URL='https://ocr.ecostudios.dev'

curl --max-time 90 --include \
  "$INE_API_URL/api/v3/ine" \
  -H "X-API-Key: $INE_API_KEY" \
  -H 'Idempotency-Key: onboarding-0001' \
  -H 'Accept: application/json' \
  -H 'User-Agent: ine-api-backend-example/1.0' \
  -F 'front=@front.jpg' \
  -F 'back=@back.jpg'

Use a different transaction identifier for each new reading. A retry of the same transaction must retain the same identifier and exact image bytes. Do not add cURL's automatic retry or redirect-following options.

This command prints the response, which can contain personal data. Run it in a private environment and keep its output out of shared logs.

Handle the result

ResponseWhat to do
200 with status: succeededReview data and warnings. Save any result you need before expires_at.
202 with status: processingWait for Retry-After, then GET the returned status_url on the same API origin.
ErrorFollow error.action. Keep the transaction key and image bytes.
Connection lost or client timeoutThe outcome is unconfirmed. Check the known request_id; do not automatically create a new key.

Results are available for 23 hours from reservation. GET and valid same-job replay do not consume another unit. See create a reading, retrieve a result, and errors and retries.

Versions and fallback

/api/v3/ine is the recommended route. /v3/ine exposes the same English contract; /v1/ine and /v2/ine retain their older contracts. All versions share jobs, idempotency and quota.

The fallback origin is https://ine-api.acessloop.workers.dev, with the same /api/v3 paths and credentials. Changing origins does not create a separate quota or make an uncertain POST safe to repeat with a new key.