Integrate Layout-Aware AI OCR
In Under 5 Minutes
Simple, robust REST endpoints built for automation engineers. Convert PDFs, scans, and images into structured tables, JSON schemas, and editable Word documents.

import requests
API_ENDPOINT = "https://cognitivestring.com/scan"
API_KEY = "YOUR_API_KEY"
# Send document for layout-aware OCR & DOCX generation
with open("invoice_scan.pdf", "rb") as f:
files = {"file": f}
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.post(
API_ENDPOINT,
files=files,
headers=headers,
data={"preserve_tables": "true", "output_format": "docx"}
)
result = response.json()
print(f"Status: {result.get('status')}")
print(f"Extracted Table Rows: {len(result.get('tables', []))}")
print(f"Word DOCX Download: {result.get('download_url')}")Core API Endpoints
All requests require TLS 1.3 encryption and an Authorization header.
/scanThe primary document extraction endpoint. Accepts multipart PDF/image or base64. Executes layout analysis, table reconstruction, and generates editable Word DOCX.
/uploadBulk or multi-page ingestion endpoint for streaming document batches directly into background processing queues.
/usageQuery real-time monthly page quota consumption, remaining credits, and historical processing statistics.
/download/:filenameStream and download generated Microsoft Word (.docx) documents directly to your local file system or cloud storage bucket.
Ready to Test API Keys or Webhooks?
Launch our browser studio to generate instant test requests or talk to our developer relations team for enterprise SDK support.
