Verify a graph over HTTP

Run Neurarch's deterministic structural verifier from CI or a script. POST a model graph, get back the same blocking / warning findings the app surfaces as you edit — no browser, no LLM, sub-millisecond grading.

Authentication

Mint a key in the app under Settings → Developer API. It's shown once — copy it then. Send it as a bearer token:

Authorization: Bearer nrk_your_key_here

Keys are hashed at rest (we store only a SHA-256); revoke any key from the same screen.

Verify a model

POST https://neurarch.com/api/v1/lint

Request

{
  "model": {
    "components": [
      { "id": "in",   "type": "input",  "name": "input",
        "params": { "shape": [1, 128] } },
      { "id": "attn", "type": "groupedQueryAttention", "name": "attn",
        "params": { "embedDim": 512, "numHeads": 8, "numKVHeads": 3 } },
      { "id": "out",  "type": "output", "name": "output", "params": {} }
    ],
    "connections": [
      { "from": "in",   "to": "attn" },
      { "from": "attn", "to": "out" }
    ]
  }
}

The graph format is the same JSON the app exports (File → Export → JSON), so the easiest way to get a valid payload is to design once in the app and export.

Response

{
  "verdict": "fail",
  "counts": { "block": 1, "warn": 0, "info": 0 },
  "findings": [
    {
      "rule": "gqa-head-divisibility",
      "severity": "block",
      "message": "numHeads (8) must be divisible by numKVHeads (3)…",
      "componentName": "attn",
      "componentType": "groupedQueryAttention"
    }
  ]
}
FieldMeaning
verdictfail if any blocker, else warn if any warning, else pass. Wire it to your CI exit code.
countsFindings by severity.
findings[].ruleStable rule id (e.g. gqa-head-divisibility, full-mha-serving-cost). Catalogue at /rules.html.
findings[].severityblock (won't run) · warn · info.

Example: fail CI on a blocker

curl -sS https://neurarch.com/api/v1/lint \
  -H "Authorization: Bearer $NEURARCH_API_KEY" \
  -H "Content-Type: application/json" \
  --data @model.json \
  | tee result.json \
  | grep -q '"verdict":"fail"' && { echo "Structural blockers found"; exit 1; } || true

Errors

StatusWhen
401Missing or invalid / revoked API key.
400Body isn't { model: { components: [...] } }.
413More than 2000 components.
422The graph couldn't be verified (malformed shapes).