Upload a contract, deed, or everyday legal PDF. The backend extracts text, retries OCR when needed, runs practical issue spotting, and returns risk cards with next steps you can understand.
Start here: upload one PDF and get OCR-aware issue spotting, key risks, next steps, and source snippets.
Uses paths and disk on the machine running the API (not Vercel).
Files are sent to
POST /v1/ingest
on your backend.
Server-sent events from
/v1/analyze/stream. Final event includes merged state + optional run_id.
Run diligence to see the memo here.
One question per line →
POST /v1/query/batch (≤24 lines). Shared optional scope below.
Uses the same embedding backend as RAG
(POST /v1/embeddings/similarity).
Non-empty lines →
POST /v1/embeddings/embed-texts (≤48 lines). Preview hides raw vectors.
POST /v1/embeddings/embed-local-text-files — requires LEGAL_INTEL_ALLOW_LOCAL_PATHS
on the API host (same as PDF local ingest). UTF-8, ≤256KiB per file, ≤16 paths.
POST /v1/rag/document-summary
(or …/stream SSE) — retrieves chunks for one doc_id, then synthesis-model summary
(Ollama when configured).
POST /v1/rag/compare-documents
(or …/stream SSE) — retrieval per doc + specialist comparison (grounded).
POST /v1/rag/cross-document-summary — one synthesis memo across many indexed doc_id
values (shared retrieval query).
POST /v1/rag/structured-extract
— retrieval + json_object fields you name (e.g. parties, consideration).
Non-empty lines → native daemon
POST /api/embed (/v1/ollama/embed-proxy). Uses OLLAMA_EMBEDDING_MODEL
if model omitted.
Proxies to the daemon’s
POST /api/generate (non-streaming). Model must exist in ollama list.
POST /v1/ollama/chat —
multi-turn messages (non-streaming). Uses your local daemon.
Pairwise cosine similarity within one
indexed doc_id (POST /v1/rag/near-duplicate-chunks). Uses the same embeddings as
ingestion.