Developer Reference & SDK

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.

Document processing dashboard and developer workspace
API workflowSchema ready
Quickstart Request
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.

POST/scan

The primary document extraction endpoint. Accepts multipart PDF/image or base64. Executes layout analysis, table reconstruction, and generates editable Word DOCX.

Content-Type: multipart/form-data
POST/upload

Bulk or multi-page ingestion endpoint for streaming document batches directly into background processing queues.

Content-Type: multipart/form-data
GET/usage

Query real-time monthly page quota consumption, remaining credits, and historical processing statistics.

Response: JSON { processed: number, limit: number }
GET/download/:filename

Stream and download generated Microsoft Word (.docx) documents directly to your local file system or cloud storage bucket.

Content-Type: application/vnd.openxmlformats-officedocument...

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.