DocumentationAPI Reference
Features

Contract Upload

Flexible contract ingestion options - Web drag-and-drop, raw text paste, batch uploads, and REST API integration.

OutRiskAI supports multiple ingestion pathways to suit manual reviews, team workflows, and automated backend software integrations.

All uploaded contract files are scanned, encrypted at rest, and parsed into searchable text clauses before being queued for AI analysis.

Ingestion Methods

┌─────────────────────────────────────────────────────────────┐
│                      Ingestion Options                      │
├──────────────┬──────────────┬───────────────┬───────────────┤
│ Web File     │ Text Paste   │ Batch Upload  │ REST API      │
│ (.pdf, .txt) │ (Direct Input│ (Multiple PDF)│ (File or URL) │
└──────┬───────┴──────┬───────┴───────┬───────┴───────┬───────┘
       │              │               │               │
       └──────────────┴───────┬───────┴───────────────┘
                              ▼
           [ Validation & Content Byte Check ]
                              │
                              ▼
           [ AES-256 Storage & Text Extraction ]
                              │
                              ▼
           [ AI Risk Processing Queue (202) ]

Method 1: Web Drag-and-Drop Upload

  1. Navigate to the Contracts page and click + New Contract.
  2. Drag and drop your file or click Browse Files.
  3. Supported Formats:
    • PDF (.pdf) — Searchable, text-based PDF (recommended).
    • Plain Text (.txt) — Standard text agreements.
  4. File Limits:
    • Maximum size: 20 MB per document.
    • Page count: Up to 100 pages per file.

Method 2: Text Paste Mode

Ideal for quick testing, email snippet evaluation, or partial clause review:

  1. In the upload dialog, click Paste Text.
  2. Paste the contract text into the input canvas.
  3. Enter a title and click Analyze Text.

Method 3: Programmatic API Upload (POST /documents)

For developers integrating OutRiskAI into CRMs or custom backends:

Option A: Direct File Upload (multipart/form-data)

curl -s -X POST http://localhost:3000/api/public/v1/documents \
  -H "Authorization: Bearer ork_live_your_secret_key" \
  -H "Idempotency-Key: upload-msa-2026-001" \
  -F "file=@./vendor-contract.pdf"

Option B: Public HTTPS URL Registration (application/json)

curl -s -X POST http://localhost:3000/api/public/v1/documents \
  -H "Authorization: Bearer ork_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: upload-url-2026-002" \
  -d '{
    "document_url": "https://storage.example.com/agreements/contract.pdf"
  }'

Validation & Extraction Pipeline

StepActionEnforcement
1. File ValidationFile size and magic byte checkBlocks files over 20 MB or non-PDF/PNG/JPEG binaries
2. Text ExtractionText parsing via PDF extractorsExtracts paragraphs, defined terms, and section numbers
3. Text SanitizationWhitespace normalizationRemoves invalid null bytes and control characters
4. Storage & EncryptionFile copy saved to Object StorageEncrypted with AES-256; unique UUID generated
5. Queue AssignmentBackground job createdReturns immediate 202 Accepted response

Best Practices for Optimal Extraction

  • Searchable PDFs: Ensure your PDF contains selectable text (not flattened scanned images).
  • Clean Structure: Standard section headings (e.g. Section 1: Definitions, Section 7: Limitation of Liability) yield the highest extraction accuracy.
  • Descriptive Titles: Include counterparty names and dates in contract titles for easy searching in your analytics dashboard.

Next Steps

On this page