> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# NSR API

> Verified decisions, the knowledge base and rules behind them, NSR-L, machines, the learning flywheel and billing — 259 endpoints on api.nsr.stateset.com, generated from the engine's own OpenAPI.

NSR answers one question with a proof attached: *is this action allowed, given what we know?* The
API is everything around that question — the facts and rules it reasons over, the decisions it
returns, the outcomes you record afterwards, and the flywheel that turns those outcomes into better
rules.

|          |                                                                                                                                      |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Base URL | `https://api.nsr.stateset.com`                                                                                                       |
| Auth     | `X-API-Key: nsr_…` (a `Authorization: Bearer nsr_…` header is also accepted); three billing endpoints also take an `X-Org-ID` header |
| Spec     | `GET /api-docs/openapi.json` — the server publishes its own document, version 0.9.6                                                  |

<Note>
  Generated from the running server's document, which matches the engine repository at 0.9.6 exactly.
  The [Verified Decisions](/stateset-nsr-decisions) page is the narrative for the thirteen decision
  endpoints; the [MCP server](/stateset-nsr-mcp) exposes 36 of these operations as agent tools; the
  [SDKs](/stateset-nsr-sdks) wrap them in four languages.
</Note>

## Where to start

<CardGroup cols={2}>
  <Card title="Make a decision" icon="gavel" href="/api-reference/nsr/verified-decisions/v1-decisions-create">
    `approved`, `denied` or `refused`, with the cited proof chain that produced it. A refusal is
    the safe answer when a premise is missing, not an error.
  </Card>

  <Card title="Teach it a rule" icon="scroll" href="/api-reference/nsr/rules/rules-create">
    Rules are Horn clauses over your facts. Lint one before you commit it; dry-run a policy change
    against logged decisions before you ship it.
  </Card>

  <Card title="Record what happened" icon="rotate" href="/api-reference/nsr/verified-decisions/v1-decisions-by-outcome-create">
    Honored, reversed, overridden, escalated. This is what makes reported confidence mean anything —
    the calibration curve is built from it.
  </Card>

  <Card title="Verify a proof yourself" icon="shield-check" href="/api-reference/nsr/verified-decisions/v1-proofs-verify-create">
    A self-contained bundle — derivation, facts, rules — checked without trusting the engine that
    produced it.
  </Card>
</CardGroup>

## The groups

| Group                                                                                  | What lives there                                                         |
| -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **Verified Decisions**                                                                 | Decide, batch, outcomes, calibration, refusal gaps, policy impact        |
| **Knowledge Base**, **Entities**, **Triples**, **Types**, **Beliefs**, **Constraints** | The facts NSR reasons over, and the schema that governs them             |
| **Rules**, **NSR-L**, **Reasoning**                                                    | The policy — authoring, linting, forward and backward chaining           |
| **NSR Machine**, **Machines**                                                          | Long-running governed executors: the state machines an agent runs inside |
| **Flywheel**                                                                           | Rules mined from decision traffic, and their promotion status            |
| **Macros**, **Templates**, **Answer**, **Conversations**, **Sessions**                 | Turning a decision into a customer-facing reply                          |
| **Ingestion**, **Jobs**, **Model**, **Provider Compatibility**                         | Getting data in, and using NSR where a model provider is expected        |
| **Agents**, **Sandbox**, **Webhooks**                                                  | Agents that act through NSR, and being told when something changed       |
| **Billing**, **Metering / Marketplace**, **Authentication**                            | Keys, usage, entitlements, and the three cloud marketplaces              |

## Related

* [Neuro-Symbolic Architecture](/stateset-nsr) — what NSR is and why proofs matter
* [Verified Decisions API](/stateset-nsr-decisions) — the decision contract in depth, with the 0.9.4 verification changes
* [Agent Gate](/stateset-nsr-agent-gate) — a decision in front of every tool call
* [NSR Console & Billing](/stateset-nsr-console) — the operator side of the same engine
