Async

Enqueue an asynchronous analysis job

Creates a job and returns 202 with {jobId}. The client can collect the result by polling (GET /api/v1/jobs/[id]) or register a webhook (POST /api/v1/webhooks) that receives analysis.completed, analysis.failed, citation.broken (≥1 citation verified as broken) or analysis.flagged (human review), signed with HMAC-SHA256.

Supports Idempotency-Key: if the client retries with the same key + kind, it returns the original jobId without duplicating it.

Kind consensus — full server-side multi-agent Node A↔B loop: primary analysis + adversarial audit + re-evaluation against the auditor objections (max. 2 iterations) and deterministic citation veto (broken citations ⇒ never CONSENSO_TOTAL, fail-closed). payload: { text (required, ≤50,000 chars), jurisdiction (required and EXPLICIT — no default), legalBranch?, language?, mode?, jurisdictionB?, useJurisprudencia? (jurisdiction-agnostic case-law RAG), referenceDate? (YYYY-MM-DD) }. result (encrypted at rest, via GET /api/v1/jobs/[id]): { analysis, audit, consensusVerdict: "CONSENSO_TOTAL"|"CONSENSO_PARCIAL", consensusLabel, termination, secondPassRan, nodoBVerdict, confidenceScore, iterations: [{iteration, nodoBVerdict, confidenceScore, consensus, analysisChars, auditChars}], citationChecks, jurisdiction, processingMs }. READ termination BEFORE consensusVerdict: CONSENSO_PARCIAL covers two different endings — max_iterations (the two agents reviewed and did not agree) and caller_stopped (the second review NEVER RAN, so the report went through a single pass; secondPassRan: false). agreement is the only case in which Node B signed off. Both fields were dropped by the async lane until 2026-07-26. Cost: aggregated per piece (A+B per iteration; ≤50k chars ⇒ 3 cr on the 1st, 7 cr with a 2nd round); the debit is applied when the job completes, for the iterations actually executed.

post/api/v1/jobs

Request

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

Headers

Idempotency-Keystring

Request body

kind'analyze' | 'analyze_batch' | 'debate' | 'consensus' required
payloadobject required

Payload equivalent to the synchronous endpoint. For consensus: { text, jurisdiction (required, explicit), legalBranch?, language?, mode?, jurisdictionB?, useJurisprudencia?, referenceDate? }.

Response

Job accepted.

jobIdstring uuid
status'pending'
createdAtstring date-time
pollUrlstring

Changes

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