Authentication
At launch, all requests will require an API key in the Authorization header:
Authorization: Bearer gharauni_sk_live_xxxxxxxxxxxxxJoin the waitlist at /parser/signup. We will email your sandbox key the day v1 ships.
POST /v1/parse
Planned: parses a single Gharauni card from a PDF or image. Target latency 1.4s median.
Request via cURL
curl -X POST https://api.gharauni.com/v1/parse \
-H "Authorization: Bearer gharauni_sk_live_xxx" \
-F "file=@/path/to/card.pdf"Or by URL
curl -X POST https://api.gharauni.com/v1/parse \
-H "Authorization: Bearer gharauni_sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/card.pdf"}'Response schema (planned)
{
"id": "parse_01HXYZ...",
"durationMs": 1380,
"data": {
"gharauniId": "091434-78921-04",
"plotNumber": "178/2",
"ownerName": "Ramesh Yadav",
"area": { "value": 200, "unit": "sqYd" },
"village": "Sikandrabad",
"tehsil": "Bulandshahr",
"district": "Bulandshahr",
"state": "Uttar Pradesh",
"coordinates": { "lat": 28.4543, "lng": 77.6912 },
"issueDate": "2024-03-18"
},
"confidence": {
"gharauniId": 0.99,
"plotNumber": 0.96,
"ownerName": 0.97,
"area": 0.94,
"coordinates": 0.91,
"overall": 0.95
}
}Fields with confidence below 0.85 should be flagged for human review in your LOS.
Error codes (planned)
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_file | File not a valid PDF or image, or greater than 10MB |
| 401 | unauthorized | Missing or invalid API key |
| 402 | quota_exceeded | Monthly free tier exhausted, upgrade required |
| 422 | not_gharauni | Document does not appear to be a SVAMITVA card |
| 429 | rate_limited | Too many requests per minute. Backoff and retry. |
| 500 | internal_error | Try again. Persistent errors: status.gharauni.com |
SDKs (planned)
Official SDKs will be MIT-licensed at launch.
Python
pip install gharauni-sdk
from gharauni import Client
client = Client(api_key="gharauni_sk_live_xxx")
result = client.parse(file=open("card.pdf", "rb"))
print(result.data.gharauni_id) # 091434-78921-04Node.js
npm install @gharauni/sdk
import { Client } from '@gharauni/sdk';
import fs from 'fs';
const client = new Client({ apiKey: 'gharauni_sk_live_xxx' });
const result = await client.parse({ file: fs.createReadStream('card.pdf') });
console.log(result.data.gharauniId);Rate limits (planned)
- Free: 100 req/min, 50 parses/month total
- Starter (₹5/parse): 1,000 req/min, capped at ₹5k/month
- Growth (₹3/parse): 5,000 req/min
- Enterprise: Up to 10,000 req/min, reserved capacity
Rate limit headers returned on every response.