Analysis

Analyze a legal document

Send the text of a legal document and receive a structured analysis generated by the Nexus Legal multi-agent engine. The credit is debited only after a successful analysis.

Supports the optional Idempotency-Key header (8-200 alphanumeric chars + -_). If sent, repeating the same request with the same key returns the cached response WITHOUT charging additional credits (24h TTL). If the body changes, it returns 409 Conflict.

⚠️ This endpoint is synchronous, and the gateway closes the connection at 300 s. That ceiling is not ours and cannot be raised from your side. MEASURED on 2026-08-18: a BYO account whose engine is a reasoning model (DeepSeek V-pro, o1-style, Claude 5 with thinking) running mode: "auditoria" over a ~5 KB contract went past it and returned 502 — the engine spends a large part of its budget on internal reasoning before it starts writing, and a second pass with a wider budget is issued automatically when it runs out. That combination belongs on the asynchronous path: POST /api/v1/jobs with kind: "analyze" returns 202 and a jobId to poll, with no wall clock. The synchronous endpoint remains the right one for platform engines and for mode: "standard".

post/api/v1/analyze

Request

  • Base URL: https://legal.nexusquantum.legal
  • URL: https://legal.nexusquantum.legal/api/v1/analyze
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional idempotency key. Repeating with the same key returns the cached response (24h TTL).

Request body

textstring required

Legal document text to analyze.

jurisdictionstring required

ISO country code. REQUIRED — no jurisdiction is assumed by default (400 MISSING_JURISDICTION if absent). A declared but unserved jurisdiction returns 422 JURISDICTION_NOT_SERVED, and the message lists the served ones. See GET /api/v1/jurisdictions for the full declared list.

legalBranch'adgm' | 'administratif' | 'administrativo' | 'agrario' | 'all' | 'ambiental' | 'amministrativo' | 'amparo' | 'appi' | 'arbeids' | 'arbeitsrecht' | 'arbitraje' | 'arbitration' | 'ayudas' | 'bankruptcy' | 'basic_law' | 'bbbee' | 'belasting' | 'bestuurs' | 'betreibungsrecht' | 'burgerlijk' | 'chiteki' | 'civil' | 'civile' | 'comercial' | 'commercial' | 'commerciale' | 'company' | 'competencia' | 'competition' | 'concursal' | 'constitucional' | 'constitutional' | 'constitutionnel' | 'consumidor' | 'consumo' | 'contract' | 'corporate' | 'costituzionale' | 'criminal' | 'datos' | 'difc' | 'dpdp' | 'employment' | 'empresarial' | 'equity' | 'eu' | 'eu_recht' | 'eu_retained' | 'europeen' | 'europeo' | 'europeu' | 'family' | 'fema' | 'financial' | 'finanzrecht' | 'fiscal' | 'foral' | 'fundamentales' | 'geunlobeop' | 'gyosei' | 'haengjeong' | 'handelsrecht' | 'heonbeop' | 'hyeongbeop' | 'immigration' | 'immobiliare' | 'immobilienrecht' | 'imobiliario' | 'inmobiliario' | 'insolvency' | 'insolvenzrecht' | 'intellectual' | 'intellectueel' | 'internacional' | 'inversiones' | 'investment' | 'jijeokjaesan' | 'keiji' | 'laboral' | 'labour' | 'lavoro' | 'ma' | 'mercado' | 'mercantil' | 'minbeop' | 'minero' | 'minpo' | 'minsa' | 'minso' | 'native_title' | 'obligationenrecht' | 'ondernemings' | 'pdpa' | 'pdpo' | 'penal' | 'penale' | 'pipa' | 'popia' | 'privacy' | 'procesal' | 'processual' | 'processuale' | 'processuel' | 'property' | 'propiedad' | 'propriete' | 'prozessrecht' | 'quebec' | 'rodo' | 'sangbeop' | 'sebeop' | 'sharia' | 'shoho' | 'steuerrecht' | 'straf' | 'strafrecht' | 'tax' | 'tort' | 'trabalho' | 'travail' | 'tributario' | 'verfassungsrecht' | 'verwaltungsrecht' | 'zei' | 'zivilrecht'

Legal branch of the analysis. The enum is the union of the branches of ALL supported jurisdictions — contract, corporate, employment, property, pdpa, arbitration, financial and the rest of the common-law ones alongside the continental-law codes — and the server validates against that same union: the branch is NOT restricted per jurisdiction. Send the branch your jurisdiction actually uses.

⚠️ Omitting the field falls back to civil, a continental civil-law branch that carries no meaning in a common-law jurisdiction. That default is documented because the server really applies it, not because it is a sensible one — always send legalBranch explicitly.

language'es' | 'en'

Response language. Optional — when omitted, the language FOLLOWS the jurisdiction (per-jurisdiction registry: SG→en, ES/CO→es, CH→de, …). An explicit supported value takes precedence.

mode'standard' | 'deep'

Analysis mode.

• standard (1 credit): Node A only (Claude Opus 4.7). • deep (2 credits): Node A + Node B (DeepSeek V4-Pro) audits it adversarially, looking for hallucinations, false citations, omissions and jurisdictional errors. The response includes an audit object with structured findings.

Accepted compat aliases: agil ⇄ standard, auditoria ⇄ deep.

professionalRole'persona' | 'abogado' | 'fiscal' | 'notario' | 'registrador' | 'juez' | 'asesor'

Professional role the document is analyzed from. Changes the report's perspective.

The values are Spanish-language IDENTIFIERS — send them verbatim, they are not display text: Either spelling works: lawyer/solicitor/barrister, prosecutor, notary, registrar, judge, in-house, individual - or the original wire values, which keep working unchanged: abogado (lawyer), fiscal (prosecutor), notario (notary), registrador (registrar), juez (judge), asesor (adviser), persona (non-professional individual).

roleVariantstring

Optional local seat when a jurisdiction splits one function into more than one office. England & Wales splits abogado into solicitor and barrister, which look at different things: the first at client risk, deadlines and SRA conduct duties; the second at the strength of the argument before the court and the overriding duty to it.

Additive — it never replaces professionalRole, which stays the wire value. A variant that does not exist in the active jurisdiction is not an error: that function simply is not split there, and the most common seat is used.

proceduralSide'demandante' | 'demandado' nullable

Client's procedural position (demandante = claimant, demandado = respondent). Omit or null = neutral, no position. Modulates the perspective for the abogado and persona roles.

negotiationProfile'conservador' | 'equilibrado' | 'agresivo'

Analysis profile. Spanish-language IDENTIFIERS, sent verbatim: conservador (conservative — maximizes risk alerts), equilibrado (balanced) or agresivo (aggressive — filters out non-blocking alerts).

referenceDatestring

Date of the case FACTS (lex temporis, YYYY-MM-DD). Deterministic citation verification checks that the cited rules were in force on this date, not today. Omit = today.

Example request

{
  "jurisdiction": "GB",
  "roleVariant": "barrister"
}

Response

Analysis completed successfully.

skill'standard' | 'agil' | 'auditoria' required

WHICH ANALYSIS CORE RAN. mode and skill are two different questions that share a name on the way IN: mode is the BILLING axis (does Node B audit? standard vs deep), skill is which Node A core was loaded. Sending mode: "auditoria" bills as deep AND loads the forensic-audit core, so the response comes back with mode: "deep" and skill: "auditoria" — and the report header says MODE: auditoria. Until 2026-08-18 only the billing axis came back, so that header looked like it contradicted the JSON. It never did.

analysisstring required

Legal analysis generated by Node A (Claude Opus 4.7).

jurisdictionstring required

ISO code of the processed jurisdiction.

legalBranchstring required

Legal branch applied.

modelstring required

Label of the engine that ANSWERED, not a stable model identifier. It is the chain's own label — 'DeepSeek V4-Pro', 'Opus 4.8 · OpenRouter' — or, when the firm brings its own engine, that engine's model id. In mode=deep it is composed as '<analyst>+<auditor>'. unknown means nobody could be named: the value is never guessed. Under partner or neutral branding it is replaced by a neutral label. Do NOT key logic on this string: which engine answers is a deployment decision and the chain falls back on its own.

processingMsnumber required

Total analysis latency in milliseconds.

mode'standard' | 'deep' required

Canonical mode applied (aliases normalized).

creditsChargedinteger

Credits charged for this analysis (1 standard / 2 deep).

Example response

{
  "model": "DeepSeek V4-Pro+deepseek-v4-pro",
  "audit": {
    "auditor": "deepseek-v4-pro",
    "audited": true
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.