API Documentation

The Resilentra API is built on REST principles. It accepts JSON and multipart form data, and returns JSON responses. All endpoints require a valid Bearer token for authentication.

Authentication

To make an API call, include your API token in the Authorization header as a Bearer token.

Authorization: Bearer YOUR_API_TOKEN_HERE

ID Document Analysis

Extract key fields from ID cards, driver's licenses, and residence permits.

POST /api/v1/analyze/iddocument

Request

curl -X POST https://api.resilentra.com/api/v1/analyze/iddocument \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -F "file=@/path/to/your/id.jpg"

Response

{
  "request_id": "123e4567-e89b-12d3-a456-426614174000",
  "status": "succeeded",
  "document_type": "idDocument.driverLicense",
  "fields": [
    {
      "field_name": "FirstName",
      "field_value": "Jane",
      "confidence": 0.99
    }
  ]
}

Passport Analysis

Extract biographical data and MRZ from international passports.

POST /api/v1/analyze/passport

Request

curl -X POST https://api.resilentra.com/api/v1/analyze/passport \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -F "file=@/path/to/your/passport.jpg"

Forgery Detection

Check documents for signs of tampering or manipulation. This endpoint consumes 2 units per call.

POST /api/v1/analyze/forgery

Request

curl -X POST https://api.resilentra.com/api/v1/analyze/forgery \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -F "file=@/path/to/your/document.jpg"

Unstructured Analysis

Automatically classify and extract structured data from any document type (invoices, contracts, etc.).

POST /api/v1/analyze/unstructured

Request

curl -X POST https://api.resilentra.com/api/v1/analyze/unstructured \
  -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \
  -F "file=@/path/to/your/document.pdf"