AIForms API reference
Prepaid form extract API for DU Registered Graduate Enrollment images. Base URL https://aiforms.labmirai.org.
Overview
| URL | Purpose |
|---|---|
| / | Marketing portal + live demo |
| /login | Sign in / sign up |
| /app | Control panel (keys, balance, ledger) |
| /v1/extract | Keyed extract API |
| /demo/extract | Public demo (no key, daily IP cap) |
| /docs | This page |
Authentication
All /v1/* and /api/extract routes require an API key. Create keys in the dashboard (shown once). Send:
X-API-Key: aif_…
Also accepted: Authorization: Bearer aif_… or query ?api_key= (prefer the header).
Pricing
- ৳60 one-time signup bonus after email verification
- ৳20 per successful extract (any combo of photo / signature / fields)
- Failed jobs are not charged
- Top-ups: admin only (offline bKash / Nagad)
POST /v1/extract
Multipart form:
| Field | Required | Description |
|---|---|---|
| file | yes | Image or PDF |
| photo | no | true/false (default true) |
| signature | no | true/false (default true) |
| fields | no | true/false (default true) — extract typed fields |
curl -s -F "[email protected]" -F "photo=true" -F "fields=true" \ -H "X-API-Key: $AIFORMS_KEY" \ https://aiforms.labmirai.org/v1/extract
Success includes fields, billing.charged_taka, billing.balance_taka, and asset URLs (page, photo, signature, original) under /v1/jobs/{id}/… (same API key required). Internal processing details are not returned.
Errors
| Status | Meaning |
|---|---|
| 400 | Bad upload / no extract flags |
| 401 | Missing or invalid API key |
| 402 | Insufficient balance |
| 403 | Account/key disabled |
| 429 | Demo daily limit |
| 503 | Service or field extraction unavailable |
GET /api/health
No key. Returns service status, readiness flags, and pricing.
Demo
POST /demo/extract — same multipart fields, no key. Default fields=false. Limited to 1 request per IP per day.