API Reference
Base URL https://api.reviewintelligence.dev/v1 · local
http://localhost:3000/v1. Contract Intelligence runs on the shared WizerAI API
platform — all responses are JSON and include an X-Request-Id header plus
X-RateLimit-* headers.
Quickstart
Run the API locally in mock mode (no credentials needed):
npm install
npm run dev # boots on :3000 in mock mode
# authenticate with the Contract Intelligence dev key:
curl localhost:3000/v1/contracts/analyze \
-H "Authorization: Bearer cik_local_dev_key" \
-H "Content-Type: application/json" \
-d '{"text":"MASTER SERVICES AGREEMENT effective 2026-07-01 ... (100+ chars)","document_type":"msa"}'
Authentication
Send your key as a bearer token. Keys are shown once and stored only as a hash. Keys are
product-bound: a cik_ key works on /v1/contracts/* plus
the shared /v1/usage and /v1/billing endpoints, and gets
403 forbidden on other products' routes.
Authorization: Bearer cik_live_xxx
Errors
Every error uses a stable envelope:
{ "error": { "code": "rate_limited", "message": "Too many requests", "request_id": "req_..." } }
| HTTP | code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 402 | quota_exceeded |
| 403 | forbidden (key bound to another product) |
| 422 | unprocessable |
| 429 | rate_limited |
| 503 | ai_unavailable |
POST /v1/contracts/analyze · 12 AU + 1/1,250 chars
Synchronous first-pass review of one contract. text is required
(100–150,000 characters); title, counterparty are optional labels;
document_type is one of
msa | nda | sow | employment | lease | services | license | other.
{ "text": "…raw contract text…",
"title": "MSA — Acme Corp", "counterparty": "Acme Corp", "document_type": "msa" }
{ "id": "...",
"summary": "Plain-language summary of the agreement…",
"risk_flags": [
{ "flag": "no_liability_cap", "severity": "high",
"explanation": "No limitation of liability clause was detected; exposure may be uncapped." } ],
"key_terms": { "parties": ["Acme Corp"], "effective_date": "2026-07-01", "term": "12 months",
"termination_notice": "30 days", "governing_law": "Victoria, Australia",
"payment_terms": "Net 30", "auto_renewal": true },
"clauses": { "indemnification": { "present": true, "evidence": "…verbatim excerpt…" },
"limitation_of_liability": { "present": false }, "confidentiality": { "present": true, "evidence": "…" },
"termination_for_convenience": { "present": false }, "auto_renewal": { "present": true, "evidence": "…" },
"governing_law": { "present": true, "evidence": "…" }, "dispute_resolution": { "present": false },
"ip_assignment": { "present": false } },
"disclaimer": "Automated first-pass analysis. Not legal advice.",
"cached": false, "usage": { "au_cost": 32 } }
Risk flag severity is low | medium | high. evidence fields
are short verbatim excerpts (≤200 chars) included when available. All eight clause keys are always
returned.
GET /v1/usage
Current-period consumption for the key's product (Contract Intelligence usage is isolated from other products).
{ "plan": "starter", "period": "2026-06", "included_au": 10000,
"used_au": 1240, "remaining_au": 8760, "overage_au": 0,
"rate_limit": { "limit_per_min": 60 } }
Caching
Re-analyzing byte-identical input within the same organization is free: the
response returns "cached": true with "au_cost": 0 and never re-calls the
model. The cache is org-scoped — identical text submitted by a different organization is analyzed
(and billed) independently. Rate limits always apply.
Privacy
Raw contract text is never persisted. The API stores a SHA-256 content hash, your
optional labels (title, counterparty, document_type), and
the structured result — the text itself is processed and discarded.
Disclaimer
Every response carries "disclaimer": "Automated first-pass analysis. Not legal advice."
Contract Intelligence accelerates triage; it does not replace review by a qualified lawyer.