Model API · OpenAI-compatible← Developers

AnrakConductor — grounded legal reasoning as a model

A drop-in model for Indian legal reasoning, OpenAI-compatible. Point the OpenAI SDK athttps://anrak.legal/api/v1, use modelanrak-conductor, and you get a grounded, cited answer — a panel of four AI jurists, a corpus-checked verifier, and the full reasoning trace, all behind one familiar API.

Drop-in with the OpenAI SDK

Two changes from a normal OpenAI call: the base_url and your ANRAK- key. Everything else — streaming,messages,usage — works exactly as you expect.

Streaming
from openai import OpenAI

client = OpenAI(
    base_url="https://anrak.legal/api/v1",
    api_key="ANRAK-xxxxx",           # from https://anrak.legal/console
)

stream = client.chat.completions.create(
    model="anrak-conductor",         # adaptive depth; see variants below
    messages=[{"role": "user",
               "content": "Can a Section 138 NI Act complaint be quashed if the debt is time-barred?"}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta
    # The glass-box narration (jurists drafting, verifier verdicts) streams
    # as reasoning_content — plain clients can simply ignore it.
    reasoning = getattr(delta, "reasoning_content", None)
    if reasoning:
        print(f"\033[2m{reasoning}\033[0m", end="")
    if delta.content:
        print(delta.content, end="")
Non-streaming (JSON)
from openai import OpenAI

client = OpenAI(base_url="https://anrak.legal/api/v1", api_key="ANRAK-xxxxx")

resp = client.chat.completions.create(
    model="anrak-conductor",
    messages=[{"role": "user", "content": "Draft an anticipatory bail application under BNSS Section 482."}],
)
print(resp.choices[0].message.content)
print(resp.usage.total_tokens)

# The non-standard glass box rides along under `anrak`:
extra = resp.model_extra or {}
print(extra.get("anrak", {}).get("verify"))          # 3-cop verifier verdict
print(extra.get("anrak", {}).get("orchestration"))   # jurist drafts + merge

Two model families

The model string picks the pipeline family and how hard it thinks. Any other model id returns an OpenAI-shaped 404 (model_not_found).

Legal Conductor — anrak-conductor*

The full Indian-law pipeline: planner → live research (case law, statutes, court records, web) → citation manifest → grounded scoring → the 3-cop verifier panel.

ModelDepthPriceWhen to use it
anrak-conductorAdaptive router₹39.12/ requestAdaptive Indian-law reasoning. Routes each question to the depth it actually needs — solo for lookups, the full bench when it is hard.
anrak-conductor-ensembleFull panel (4 jurists)₹53.63/ requestAlways convene the full four-jurist bench plus the three-cop verifier. Maximum scrutiny per answer.
anrak-conductor-deepDeep search (grounded scorer)₹181.49/ requestGrounded tree search over the bench. Branches are scored symbolically against retrieved authority, not by a judge model.
anrak-conductor-fastSingle grounded pass₹25.73/ requestOne grounded pass plus the verifier. Lowest-latency way to get a cited Indian-law answer.

Pure Ensemble — anrak-ensemble*

The same multi-model panel with no legal machinery: no planner, no research lanes, no citation manifest. Your messages (system prompt included) go straight to the four experts, a Trusted Researcher consolidates the drafts, and the route-aware three-cop panel verifies the buffered final answer before release. Use it for general reasoning, code, strategy — anything where you want ensemble quality without Indian-law grounding.

ModelDepthPriceWhen to use it
anrak-ensembleFull panel (4 experts)₹27.20/ requestThe four-expert bench on your messages as-is. No planner, no research, no legal framing — your system prompt governs.
anrak-ensemble-deepDeep search (LLM-judge scorer)₹150.23/ requestTree search over the general-reasoning panel. Branches scored by an LLM judge — a weaker signal than the legal family's grounded scorer.
anrak-ensemble-fastSingle pass₹12.32/ requestOne pass on the platform's configured default model. No fan-out, no verifier, lowest latency and lowest price.
Deep-scoring caveat. anrak-conductor-deep scores every explored branch symbolically against retrieved authorities (manifest → verification cache → live corpus). anrak-ensemble-deep has no retrieval corpus to check against, so branches are scored by an LLM judge (consistency, completeness, instruction-following) — a strictly weaker signal that a confident fabrication can fool. Prefer the legal family whenever your question is about Indian law.

Durable Deep Ensemble — anrak-*-long

Long tasks use a separate asynchronous endpoint so ordinary OpenAI-compatible completions keep their expected response shape. Submit the work once, close the client, and poll the task URL. Long drafts are planned and generated section by section without restarting completed sections; every section targets all four model families, requires a three-model quorum, and is withheld unless the cops pass it.

ModelDepthPriceWhen to use it
anrak-conductor-longDurable legal ensemble₹53.63/ sectionDurable asynchronous legal research and long-form drafting. Every section is a full four-jurist checkpoint that must clear a three-model quorum and the cops.
anrak-ensemble-longDurable general ensemble₹29.95/ sectionDurable asynchronous long-form work under your own system prompt, with four-model section checkpoints and the three-cop delivery gate.
# Durable Deep Ensemble — submit, close the client, poll later.
import time, requests

headers = {
    "Authorization": "Bearer " + ANRAK_API_KEY,
    "Content-Type": "application/json",
}

task = requests.post(
    "https://anrak.legal/api/v1/orchestra/tasks",
    headers=headers,
    json={
        "model": "anrak-conductor-long",
        "task_type": "long_draft",  # or "answer"
        "messages": [
            {"role": "user", "content": "Draft a comprehensive technology services agreement..."}
        ],
    },
).json()

while task["status"] in ("pending", "processing"):
    time.sleep(3)
    task = requests.get(
        "https://anrak.legal/api/v1/orchestra/tasks/" + task["id"],
        headers=headers,
    ).json()

print(task["output"][0]["content"])

Per-request override: anrak.legal_research

Both families accept an optional anrak object in the request body. {"legal_research": false} makes an anrak-conductor* call behave pure; {"legal_research": true} makes an anrak-ensemble* call run the full legal pipeline. The depth carries across (router/ensemble ↔ full panel, deep ↔ deep, fast ↔ fast).

# The pure family with the OpenAI SDK — any general question,
# your own system prompt, no legal machinery:
resp = client.chat.completions.create(
    model="anrak-ensemble",
    messages=[
        {"role": "system", "content": "You are a terse staff engineer."},
        {"role": "user", "content": "Design a rate limiter for a multi-tenant API."},
    ],
)

# Flip either family per-request with the anrak.legal_research override:
resp = client.chat.completions.create(
    model="anrak-conductor",                     # legal family…
    messages=[{"role": "user", "content": "..."}],
    extra_body={"anrak": {"legal_research": False}},  # …run PURE this time
)
# and the reverse: model="anrak-ensemble" + {"legal_research": True}
# runs the full legal pipeline under the pure family's name.

Beyond the answer: anrak and reasoning_content

The response stays 100% OpenAI-shaped (choices[].message.content, usage), but two additions carry what makes this a legal model. Ignore them and it's just a chat model; read them and you get the glass box:

  • anrak.verify — the verifier verdict (clean / issues_found). On the legal family: the full 3-cop panel, corpus-checked against live Indian case law and statutes, with flagged fabrications corrected before the answer returns. On the pure family: all three cops switch to a general claim-support, logic, and high-stakes precision profile. Every Model API answer is buffered until a two-cop quorum passes.
  • anrak.orchestration — the jurists' drafts (Athena, Vikram, Themis, Chanakya) with grounded scores (0–100, citations checked against retrieved authority) and how they were consolidated.
  • anrak.reasoning — the ordered reasoning trace (planner → research → drafting → verification), actor-tagged.

When streaming, public work updates arrive live as delta.reasoning_content (the o1/DeepSeek convention). Answer delta.content is deliberately buffered until the verification gate passes, then released in normal OpenAI chunks. The final chunk carries usage and the anrak extension.

Pricing

The Model API bills per request (per section for the durable ids), not per token. Your cost is driven by fan-out you never see — four drafters, a consolidation pass, and a verifier panel, plus live research on the legal family — so a per-token price would be both unstable and misleading. A long answer never costs you more than a short one.

Pay as you go

Calls draw down your pay-as-you-go balance, the same balance that covers Data API calls outside a plan. Add credit (minimum ₹5,000) on the Billing tab of the console.

Failures are free

Errors and answers withheld by the verifier are refunded automatically — you are never billed for an answer you did not receive.

Downgrades bill down

If a deep request runs the standard pipeline instead, you are charged the lower price and anrak.downgraded says so.

Per-model prices are listed in the tables above; each model page carries a monthly estimator.

Try it live

Runs against your signed-in account (enable AnrakConductor in Labs first). Ask an Indian-law question and watch the panel deliberate and verify.

Try the orchestrator
⌘/Ctrl + Enter
Or try:
Research preview. Requires the AnrakConductor Labs feature on your account. Rate-limited and metered against your plan; behaviour may change. Not legal advice — verify every authority before relying on it.