Aletura ยท API

Analyze contracts via the API

The same analysis as the web app, over HTTP: POST a file, get structured JSON back. The same quotas and file limits as the web interface apply.

Quick start

Four steps with curl. Every mutating call sends the session cookie plus the CSRF header.

  1. Get the session and CSRF cookie

    ShellSession + CSRF
    curl -c cookies.txt https://aletura.eu/api/auth/session
    TOKEN=$(grep XSRF-TOKEN cookies.txt | awk '{print $NF}')
  2. Optional Sign in for the Individual quota

    ShellAccount session
    curl -b cookies.txt -c cookies.txt -H "X-XSRF-TOKEN: $TOKEN" \
      -d "username=you@example.eu&password=your-password" \
      https://aletura.eu/api/auth/login
  3. Analyze a contract

    ShellMultipart upload
    curl -b cookies.txt -H "X-XSRF-TOKEN: $TOKEN" \
      -F "file=@contract.pdf" \
      https://aletura.eu/api/reviews

    The response is the structured result JSON. If the deployment asks for context confirmation, this call returns 400 โ€” then use POST /api/reviews/prepare and POST /api/reviews/preparations/{preparationId}/complete.

  4. Poll or cancel a running operation

    ShellProgress lifecycle
    curl -b cookies.txt -H "X-XSRF-TOKEN: $TOKEN" \
      https://aletura.eu/api/progress/{operationId}   # 200 with progress, 204 when done/unknown
    
    curl -b cookies.txt -H "X-XSRF-TOKEN: $TOKEN" -X DELETE \
      https://aletura.eu/api/progress/{operationId}   # cancel; the quota is refunded

Limits โ€” identical to the web app

OpenAPI / Swagger specification

The full machine-readable contract, including auth, parameters and error shapes:

Download openapi.json (Swagger)

Import it into Swagger UI, Postman or any OpenAPI client generator. The API version is 1.0.0; breaking changes would ship as a new version.

Privacy and persistence

Detected personal identifiers are masked locally before any model call; the model receives placeholders only. Uploads, extracted text and mappings are not persisted unless you explicitly save a result from a signed-in account. Analysis runs against the configured Mistral EU regional inference endpoint.