Quickstart, authentication, endpoint reference, and async patterns for OCR, Aadhaar Masking, Extraction Basic + Pro, and Document Analysis.
From signup to first API call in 5 minutes. Pick a language SDK or use REST directly.
Go to abscode.com/signup. No credit card required. You'll receive free trial credit and an API key immediately.
pip install abscode
from abscode import DocumentAI client = DocumentAI(api_key="abs_sk_...") result = client.ocr.extract( file="path/to/document.pdf" ) print(result.text) print(result.confidence)
All API calls require an API key passed in the Authorization header. Keys are issued in the portal and can be rotated at any time.
API keys start with abs_sk_ (live) or abs_test_ (sandbox). Never expose live keys in client-side code — use a server-side proxy for browser and mobile contexts.
curl -X POST https://api.abscode.com/v1/ocr/extract \ -H "Authorization: Bearer abs_sk_..." \ -F "file=@document.pdf"
Per-account rate limits prevent runaway costs and protect fair-use for all customers. Scale with your top-up pack.
| Pack | Requests/sec | Concurrent | Burst |
|---|---|---|---|
| Free trial | 2 req/sec | 4 | 10 |
| Mini Pack + | 10 req/sec | 20 | 50 |
| Starter Pack + | 30 req/sec | 60 | 150 |
| Growth Pack + | 60 req/sec | 120 | 300 |
| Scale Pack | 200 req/sec | 400 | 1000 |
| Enterprise | Custom | Custom | Custom |
Rate-limit headers on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.
All errors return a JSON body with code, message, and request_id.
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Bad parameter, malformed file, unsupported format |
| 401 | invalid_api_key | Missing or revoked key |
| 402 | insufficient_credit | Wallet credit exhausted — top up to continue |
| 413 | file_too_large | File above the per-call size limit |
| 429 | rate_limited | Slow down — see Retry-After header |
| 500 | server_error | Transient — retry with exponential backoff |
POST /v1/ocr/extractPricing: flat per-page
Extract every word from PDFs, TIFFs, scanned images, and photos. Returns raw text, per-page confidence, and an optional searchable PDF overlay.
| Param | Type | Notes |
|---|---|---|
file | multipart | PDF, TIFF, JPG, PNG (required) |
languages | string[] | e.g. ["en", "hi", "ta"] — defaults to auto-detect |
output_searchable_pdf | boolean | If true, returns URL to PDF with text overlay |
async | boolean | If true, returns a job_id instead of inline result |
result = client.ocr.extract( file="document.pdf", languages=["en", "hi"], output_searchable_pdf=True ) print(result.text) print(result.searchable_pdf_url)
POST /v1/aadhaar-masking/redactPricing: flat per-page
Availability: India only.
UIDAI-compliant automatic Aadhaar number redaction. Detects 12-digit Aadhaar patterns and QR code regions across documents. Output preserves the original document layout.
| Param | Type | Notes |
|---|---|---|
file | multipart | PDF, TIFF, JPG, PNG (required) |
async | boolean | For large multi-page KYC bundles |
result = client.aadhaar_masking.redact( file="customer_kyc_pack.pdf" ) print(result.masked_pdf_url) print(result.redactions_count)
POST /v1/extraction/basicPricing: flat per-page
Pre-trained extraction for invoices, bank statements, receipts, KYC forms, contracts, payslips, lab reports, and ID documents. Returns named fields with bounding boxes.
| Param | Type | Notes |
|---|---|---|
file | multipart | PDF, TIFF, JPG, PNG (required) |
document_type | string | e.g. invoice, bank_statement, receipt, kyc, payslip |
schema | object | Optional override of the default field schema |
result = client.extraction.basic( file="invoice.pdf", document_type="invoice" ) print(result.fields) # {'invoice_number': 'INV-2026-001', 'total': 12450.00, ...}
POST /v1/extraction/proPricing: flat per-page
Everything in Extraction Basic, plus per-field confidence scores, format validation (GSTIN, IFSC, PAN, Aadhaar VID, IBAN), and cross-field guardrails (invoice total reconciles, bank statement balances, date plausibility).
{
"invoice_number": { "value": "INV-2026-0017", "confidence": 0.99 },
"vendor_gstin": { "value": "27AAAAA0000A1Z5", "confidence": 0.94,
"validation": "passed", "check_digit": "verified" },
"total_amount": { "value": 12450.00, "confidence": 0.97,
"reconciles_with_line_items": true },
"guardrails": { "all_passed": true, "warnings": [] }
}
POST /v1/analysis/runPricing: Custom — contact sales for scoping
Rule-based intelligent document review — NDA gap analysis, contract compliance, regulatory filing validation, policy adherence checks. Rules are codified per use case during onboarding, then exposed as an endpoint scoped to your account.
Discovery call → rule configuration on your sample document set → sandbox endpoint → production integration → quarterly rule tuning. Most engagements ship within 4–6 weeks. Learn more →
For multi-page documents, batches, or any workload where synchronous response time matters less than throughput, use the async pattern:
# 1. Create job job = client.jobs.create(api="extraction.basic") # 2. Upload one or more documents client.jobs.upload(job.id, file="batch_001.pdf") # 3. Poll or receive webhook status = client.jobs.get(job.id)
Register a callback URL in the portal. We POST job.completed events with a signed payload (HMAC-SHA256). Retry policy: exponential backoff for 24 hours.
{
"event": "job.completed",
"job_id": "job_01HZ...",
"api": "extraction.basic",
"result_url": "https://api.abscode.com/v1/jobs/job_01HZ.../result",
"timestamp": "2026-06-08T05:21:11Z"
}
| SDK | Latest | Package |
|---|---|---|
| Python | 1.0.0 | abscode |
| Node.js / TypeScript | 1.0.0 | @abscode/sdk |
| Java | 1.0.0 | com.abscode:sdk |
| .NET | 1.0.0 | Abscode.Sdk |
| Go | 1.0.0 | github.com/abscode/go-sdk |
Full documentation will include interactive API explorers, request/response schemas, embedded sandbox per endpoint, OpenAPI / Swagger spec, and per-use-case tutorial guides. This page shows the structure and entry points.