Docs / API
API quickstart
POST a model graph with what the job will do, and the pre-check comes back as JSON. Arithmetic over the graph, no model call, deterministic.
Base URL https://www.neurarch.com, with www: the apex domain redirects and drops the Authorization header. Every endpoint and field: API reference. What we keep from a call: trust page. Each command below was run on 2026-10-18.
1. Get a graph
The API takes a graph ({ components, connections }). The command below fetches a ready-made one for Qwen3-8B. To make one from your own PyTorch model, trace it with neurarch-trace or the MCP server's trace_model.
$ curl -s https://www.neurarch.com/templates/qwen3-8b/model.json | jq '{model: .}' > body.json
2. Sizing, no key needed
$ curl -s https://www.neurarch.com/api/v1/plan -H 'content-type: application/json' -d @body.json \
| jq -c '.plan | {params: .model.params, legal: .run.legal, peakGb: (.cost.peakGb|round), smallestFitGpu: .cost.smallestFitGpu, gpuVerdict: .cost.gpuVerdict}'
{"params":8190878080,"legal":true,"peakGb":564,"smallestFitGpu":null,"gpuVerdict":{"T4":"does_not_fit","A100_40":"does_not_fit","H100_80":"does_not_fit"}}
The peak is a full fine-tune at the default batch 32 and 2048 tokens; smallestFitGpu: null means no single card holds it. Run on 2026-11-28.
Keyless calls are rate limited per hour by IP. With a key, your own outcome history is attached.
3. The pre-check, with what the job will do
POST /api/v1/check needs a key (Authorization: Bearer nrk_...; create one from the account menu, API keys). Add any of three fields to the body:
| Field | Example | Adds to the answer |
|---|---|---|
data | {"seq_len": 65536, "tokenizer_size": 151700} | dataFit: sequence against the context, tokenizer against the embedding, labels against the head, image size and channels. |
layout | {"tp": 2, "pp": 2, "dp": 2, "micro_batch": 1, "global_batch": 64, "seq_len": 2048, "gpu": "h100-80gb"} | layout: whether the split is legal, stage balance, bubble, per-stage memory. |
serve | {"command": "vllm serve Qwen/Qwen3-8B -tp 3", "gpu": "l4", "gpus": 3} | serve: whether that vLLM, SGLang or llama.cpp launch is legal for the model and fits the card. |
$ curl -s https://www.neurarch.com/templates/qwen3-8b/model.json \
| jq '{model: ., serve: {command: "vllm serve Qwen/Qwen3-8B -tp 3", gpu: "l4", gpus: 3}}' > serve.json
$ curl -s https://www.neurarch.com/api/v1/check -H "Authorization: Bearer $NEURARCH_API_KEY" \
-H 'content-type: application/json' -d @serve.json | jq '.serve.findings[] | {severity, title}'
{ "severity": "block", "title": "TP 3 does not divide 32 attention heads" }
{ "severity": "block", "title": "TP 3 neither divides nor is a multiple of 8 KV heads" }
...
How this was run: the hosted endpoint answered 401 without a key, as it should; the findings above are from the same request to the self-hosted container, which runs the same code (below).
4. The same calls inside your network
The self-hosted container answers plan, check, lint and rank at /v1/<action> with the same code, and runs with the network removed:
$ docker run --rm --network none -p 8080:8080 neurarch/verifier:local
$ curl -s localhost:8080/v1/check -H 'content-type: application/json' -d @serve.json
The image is not on a public registry yet; we send it, with the offline proof described on the trust page.
5. The admission record
With neurarch gate --ledger https://www.neurarch.com/api/v1/gate and NEURARCH_API_KEY set, each gate run is one line in your account's admission record (line format). POST /api/v1/gate, /api/v1/submit and /api/v1/outcome write it; GET /api/v1/ledger reads it, with a key:
$ curl -s https://www.neurarch.com/api/v1/ledger -H "authorization: Bearer $NEURARCH_API_KEY"
$ curl -s 'https://www.neurarch.com/api/v1/ledger?since=2026-11-01&until=2026-11-30&format=csv' -H "authorization: Bearer $NEURARCH_API_KEY" -o november.csv
| Parameter | Meaning |
|---|---|
since | First UTC day to include, YYYY-MM-DD. Optional. |
until | Last UTC day to include, YYYY-MM-DD. Optional. |
format | json (default) or csv. |
Without any of the three, the answer is the newest 200 rows and a summary, as before. With any of them, it is every row in the range, oldest first, up to 10,000; truncated: true says the range held more. The JSON carries summary, range, count, truncated and rows (each row as stored). The CSV has one line per record with the columns received_at, kind, verdict, override_by, override_reason, repo, commit, ref, by, run_url, models, launches, because. A run let through with gate --override keeps the gate's verdict; override_by and override_reason say who let it through and why. An unknown format or a date that is not YYYY-MM-DD is a 400. npx neurarch ledger export reads the same route (CLI), and a self-hosted verifier answers the same parameters at GET /v1/ledger.
GET /api/v1/ledger?view=live answers what is live instead of rows: per repository and model id, the newest gate run whose verdict is admit or that carries an override.
$ curl -s 'https://www.neurarch.com/api/v1/ledger?view=live' -H "authorization: Bearer $NEURARCH_API_KEY"
The JSON carries counts (models_live, repositories, overrides_30d, refused_30d, gate_runs), as_of, truncated and live, one entry per line with repo, model, commit, pinned, engine, card, verdict, override ({ by, reason, at } or null), by, at, run_url and later_not_admitted (a newer run that was refused or held for review and did not go live, or null). Lines are ordered by repository, with (no repository recorded) last, then by model. The view reads the newest 10,000 gate runs; truncated: true says there were more. view=live takes no since, until or format, and any other view is a 400. A self-hosted verifier answers the same at GET /v1/ledger?view=live, and npx neurarch ledger live prints it (CLI).
Other endpoints
POST /api/v1/lint: the structural rules alone (key).GET /api/v1/history: what this structure did the last time it trained under your key.GET /api/v1/report: the anonymous corpus, as aggregates only (no key).
The full list, request and response fields, and errors are in the API reference.