---
name: systemone-models
description: Publish, package, deploy and call System One decision models on systemonemodels.ai. Covers the systemonemodels CLI and Python SDK 0.7 (browser login, SYSTEMONE_TOKEN, push, pull, systemone.yaml, private repositories, decide), NoulXP 0.4 packages (export, conformance, validate, check, run, serve, mcp, calibrate, bench), organizations and their roles, deploying a model to the System One Engine, the inference API (API keys, served models, free and paid credit, 402 and 429 errors) and the read-only Live API. Use when the user wants to publish, package, run, serve, deploy or call a System One model, make one NoulXP compatible, work in an organization, or read Live games.
---

# System One Models: publish, package, deploy and call decision models

A **System One model** answers typed questions about a state (`choice`: pick an option;
`score`: place it on an ordered scale; `noul`: true or false) with a calibrated probability
for every option, in one forward pass, without generating text. **System One Models**
(https://dev.systemonemodels.tech) is the registry and developer platform for them: publish a model, deploy it on
the System One Engine (the platform's hosted inference engine), and call it through the
inference API. **NoulXP** is the open standard (Apache-2.0) that makes a model a package any
engine runs without the model's own code. All the documentation, as Markdown:
https://dev.systemonemodels.tech/llms.txt

## Rules

- Ask first: which model (a folder of weights, or a Hugging Face repository), which namespace
  (the user's username or an organization), public or private, and its licence.
- Never publish weights whose licence forbids redistribution. Never invent evaluation
  numbers: report only what a run produced. Never call a model NoulXP compatible unless
  `noulxp check` passed.
- Never print, log or commit a token or an API key: read them from the environment.
- Run every push with `--dry-run` first and show the plan. Published versions are immutable.
- Publishing, creating an organization and the free credit need an account with a verified
  email.

## 1. Install and sign in

```bash
pip install -U systemonemodels        # 0.7: the systemone CLI and Python SDK (Python 3.10+)
systemone login                       # browser sign-in: a one-time code a person approves
systemone login --no-browser          # over SSH: open the printed address on any device
systemone whoami                      # the account, and a warning if its email is not verified
```

`login` needs a person at a browser. Without one (CI, an agent on its own), the user creates
an access token at https://dev.systemonemodels.tech/settings/tokens and sets `SYSTEMONE_TOKEN`; no login step is
needed. That token publishes and pulls but cannot call models: for the inference API set
`SYSTEMONE_API_KEY` (step 7). A `systemone login` token does both. `systemone logout`
revokes the stored token.

## 2. Publish a model

```bash
systemone push ./my-model --repo NAMESPACE/NAME --dry-run   # always look first
systemone push ./my-model --repo NAMESPACE/NAME
systemone pull NAMESPACE/NAME --dest ./my-model-copy         # --version V, --variant FOLDER
```

`push` finds the weights (`model.safetensors`, `model.onnx`, a `.gguf`, a `.mlpackage`),
builds the manifest (`systemone.yaml`), the model card (the folder's README.md, else one
generated) and the evaluation from the files, creates the repository if it does not exist,
and uploads only files the registry does not already hold. Options: `--namespace ORG`,
`--version` (default: the next minor version, from 0.1.0), `--variant FOLDER`,
`--manifest PATH`, `--readme PATH`, `--license`, `--notes`, `--private`, `--all` (every
model under a folder), `--yes`. Without a terminal it never prompts: name the model's own
folder, or pass `--all`. `systemone validate systemone.yaml` checks a manifest;
`systemone search QUERY` and `systemone show NAMESPACE/NAME` find and describe models.
Manifest reference: https://dev.systemonemodels.tech/docs/manifest.md

## 3. Organizations and private models

- **Create one** at https://dev.systemonemodels.tech/orgs/new: you become its owner. An organization the platform
  started for a company is handed over with an invitation link from System One Models, or
  claimed from its page (an admin approves the claim).
- **Roles.** Owners: everything, including who the owners are. Admins: edit the organization
  and its members; publish, unpublish and delete its models. Developers: create private
  repositories, push and pull its models (private ones too), and call the API on the
  organization's credits. Members: see and call its private models. Owners and admins add
  people with a role on the organization's Edit page, Members. An organization can require
  two-factor sign-in for everyone who publishes.
- **Private first.** `systemone push ./my-model --namespace ORG --private` (or
  `systemone create ORG/NAME --private`) creates the repository private; `--private` applies
  only when the push creates it, and a developer must pass it (a public repository is an
  owner's or admin's call). Only the organization's members see a private model, pull it or
  call it. Making it public: the model's Edit page, Visibility (owners and admins).

## 4. Make it NoulXP compatible

The full procedure: https://dev.systemonemodels.tech/docs/noulxp-compatible.md. The specification:
https://github.com/systemonemodels/noulxp/blob/main/SPEC.md

```bash
pip install "noulxp[onnx]"            # 0.4, Python 3.11+: encoder-markers; "noulxp[gguf]" for causal-letters
pip install "noulxp[export,laya]"     # the converters; "noulxp[gguf,anyjev]" for AnyJev
noulxp info                           # this machine's backends and devices
```

1. **Profile.** `encoder-markers`: a bidirectional encoder scoring one marker token per
   option (Laya, Julia 1), as ONNX plus `template.json`. `causal-letters`: a language model
   reading each option letter's probability at an answer slot (Decider), or an
   instruction-tuned model asked in its chat template with its options rotated (AnyJev), as
   GGUF plus `prompt.json`. A model that fits neither cannot be packaged yet; it can still be
   published and run with its own code.
2. **Package.** Converters: `noulxp export laya CHECKPOINT noulxp/` (or `julia`),
   `noulxp export decider CHECKPOINT noulxp/`, and
   `noulxp export anyjev CHECKPOINT noulxp/ --gguf MODEL.gguf`. Any other model: write the
   package by hand (ONNX with the standard signature, or the GGUF unchanged, F16 for BF16
   weights; the input described as data in `template.json` or `prompt.json`; nothing in a
   package may be code), and test the description against the model's own prompt builder on
   a few hundred random requests: the token ids must be identical.
3. **Calibration.** `calibration.json`: the temperature the model's own code applies, per
   question type (optionally per option count).
4. **Conformance.** Record the model's own answers:
   `noulxp conformance generate noulxp/ --native CHECKPOINT --runtime laya` (`--runtime` is
   `laya`, `julia`, `decider` or `anyjev`). For any other model, wrap its own inference
   (`predict(state, questions)` returning `{"answers": ...}`) in `NativeModel(name, predict)`
   from `noulxp.native`, and call `generate(Path("noulxp"), native, read_jsonl(DEFAULT_REQUESTS))`
   from `noulxp.conformance`.
5. **Check.**
   ```bash
   noulxp validate noulxp/            # schemas, parsers, coverage, hashes
   noulxp check noulxp/               # replays conformance.jsonl through the reference runtime, on the CPU
   ```
   It passes when every question gets the same decision and every probability is within 0.01
   of the model's own code. If it fails, look at tokenization at piece boundaries, the
   llama.cpp settings (flash attention, an f32 cache), an undeclared temperature clamp, or
   quantized weights (a derived package: check it, do not expect it to pass).
6. **Publish.** Put the package in a `noulxp/` folder next to the model's files and push the
   version (step 2). The engine finds it by its `noulxp.json`: it checks a public version's
   packages by itself (up to 2.5 GB) and any package it serves. When the check passes, the
   model's page and its publisher's profile show **NoulXP compatible**: the only NoulXP badge,
   earned only by publishing a model that passes.

## 5. Run it anywhere

```bash
noulxp run noulxp/ --request request.json --device cpu      # or auto, coreml, cuda, gpu
noulxp serve noulxp/        # POST /v1/systemone and GET /v1/models on 127.0.0.1:8790 (--host needs --token to listen beyond it)
noulxp mcp noulxp/          # the package as an MCP tool for AI agents, on stdio
noulxp calibrate noulxp/ labelled.jsonl --test held-out.jsonl --out my-calibration.json
noulxp bench noulxp/ --rounds 3      # decisions per second and latency; --usd-per-hour PRICE adds the cost per 1,000
systemone run noulxp NAMESPACE/NAME --state "Customer: where is my parcel?" \
    --questions '{"intent": {"type": "choice", "instructions": "What does the customer want?", "criteria": ["refund", "track delivery", "cancel order"]}}'
```

`systemone run noulxp` pulls a published model (only the checkpoint it needs) and answers on
this machine; a Laya, Julia 1 or Decider model without a package gets one built once.

A request is `{"state": "...", "questions": {"ID": {"type": "choice" | "score" | "noul",
"instructions": "...", "criteria": ...}}}`. Choice criteria: a list of 2 to 20 names, or
`{name: description or null}`; score criteria: 2 to 10 levels, lowest first; noul criteria:
left out, or `{"false": "...", "true": "..."}`. A choice answer has `choice` and
`probabilities`, a score answer `score`, `legend` and `probabilities`, and a noul answer
`noul`: the probability that the statement is true.

## 6. Deploy it to the System One Engine

The System One Engine is the platform's own hosted inference engine. It runs Laya
checkpoints, Julia-style encoders, Decider GGUF builds and NoulXP packages, from files
published here with `systemone push` (a version that only points at Hugging Face is listed
but does not run): safetensors, GGUF or ONNX weights, no pickles, and no configs that name
code to import (`auto_map`), up to about 2.5B parameters on the CPU servers.

1. On the model's page, **Deploy to engine** (shown to the model's owner, or an
   organization's owners, admins and developers) opens the Playground tab: **Request
   deployment**, with an optional note. The same from code:
   `POST https://api.systemonemodels.ai/v1/models/NAMESPACE/NAME/playground/request` with `{"note": "..."}` and a
   token that can write. If the page says **Make it deployable** instead (or the request
   answers 422 `engine_unsupported`), the engine cannot run these files: package them for
   NoulXP (step 4).
2. An admin approves it within the engine's capacity; a version with a passing NoulXP package
   is the quickest to approve.
3. Once approved the engine loads it: anyone signed in can try it in the model's Playground
   tab, the owner sees its Analytics page, and it answers through the inference API.

## 7. Call it through the inference API

Every path here is on https://api.systemonemodels.ai.

- **Key.** Create an API key at https://dev.systemonemodels.tech/settings/api (`s1_pat_…`, shown once; it calls
  models and nothing else). A `systemone login` token works too; a token from
  https://dev.systemonemodels.tech/settings/tokens does not (403 `insufficient_scope`). Keep keys on a server, in
  `SYSTEMONE_API_KEY`, never in a web page.
- **Which models.** `GET /v1/systemone/models` (no key needed; `client.served_models()`)
  lists the served models: `state` (`ready`; `available`, loaded on its first call;
  `starting`; `offline`; `unavailable`), `available_checkpoints` (callable now), `limits`,
  and on priced models `price_per_million_tokens` and `gpu`. Pass one of
  `available_checkpoints` as `checkpoint` to choose; left out, the first one answering does.
  A private model answers only its organization's members, and the list shows it only to a
  signed-in caller (a `systemone login` token or an access token): with an API key it lists the
  public models, and a private model the key's owner may call is still called by its
  `NAMESPACE/NAME`.

```python
import time
from systemone import ApiError, Client, CreditsRequired, RateLimited   # systemonemodels 0.7

client = Client()  # SYSTEMONE_API_KEY, else the systemone login
questions = {"intent": {"type": "choice", "instructions": "What does the customer want?",
                        "criteria": ["refund", "track delivery", "cancel order"]}}
for attempt in range(3):
    try:
        result = client.decide("NAMESPACE/NAME", "Customer: I was charged twice.", questions)
        break
    except RateLimited as exc:    # 429
        if exc.code != "rate_limited":
            raise                 # quota_exceeded: the plan's decisions are used up; stop
        time.sleep(exc.retry_after or 5)
    except CreditsRequired:       # 402 credits_required: a GPU-only model, no credit left
        raise                     # stop: the user adds credit, or picks another model
    except ApiError as exc:       # exc.status, exc.code, exc.detail
        if exc.status != 503 or exc.code in ("too_big", "load_failed"):
            raise
        time.sleep(5)             # loading, starting, busy: try again. The SDK exposes
                                  # Retry-After only on 429; 503 api_paused asks for 300 s
else:
    raise RuntimeError("the model is still not answering; try later")
print(result["answers"]["intent"]["choice"], result["answers"]["intent"]["probabilities"])
```

```bash
systemone decide NAMESPACE/NAME --request request.json --json      # request.json: {"state", "questions"}
curl -s https://api.systemonemodels.ai/v1/systemone -H "Authorization: Bearer $SYSTEMONE_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "NAMESPACE/NAME", "state": "Customer: where is my parcel?", "questions": {"angry": {"type": "noul", "instructions": "The customer is angry."}}}'
```

A request carries 1 to 8 questions and a state of up to 8,000 characters. A decision is one
question answered; a request that fails costs nothing.

**Credit.** A verified account claims $5 of free credit once, at https://dev.systemonemodels.tech/settings/billing;
it lasts 90 days and is spent only on the inference API and the playground. Paid credit,
bought there too, never expires. While credit covers a request (the most it can cost is set
aside first, and it is charged no more), priced models answer on GPUs at their price per million
input tokens (`GET /v1/systemone/pricing`), paid from credit and not counted against the plan's
decisions. Without enough credit, models on the CPU servers answer free within the plan's
decisions (`GET /v1/systemone/plans`), and a model only GPUs answer is refused with 402
(`credits_required`, saying about how much the request needs).
`GET /v1/billing/balance` gives `credit_micros` (1 USD = 1,000,000) and `GET /v1/usage`
(`client.usage()`) the plan, what is left of it and the calls by day; answers on a plan with
a decision limit carry `X-Quota-Remaining` and `X-Quota-Reset`. An organization's owners,
admins and developers call on its API credits when it has them.

**Errors** are `{"detail", "code", "errors"}`, plus NoulXP's `error`. The SDK raises
`RateLimited` for 429 (with `retry_after`), `CreditsRequired` (an `ApiError`) for 402
`credits_required`, `AuthError` for 401, `NotFound` for 404 and `ApiError` (with
`status` and `code`) for the rest.

| Status | `code` | What to do |
| --- | --- | --- |
| 402 | `credits_required` | Stop, do not retry: the model answers only on GPUs and the account has no credit. Tell the user to add credit at https://dev.systemonemodels.tech/settings/billing, or use a model without a price |
| 429 | `rate_limited` | Wait `Retry-After` seconds, then retry |
| 429 | `quota_exceeded` | The plan's decisions are used up until `X-Quota-Reset`: ask fewer questions or stop; never loop |
| 503 | `loading`, `no_room`, `starting`, `busy`, `timeout`, `unreachable`, `failed`, `api_paused` | Retry after `Retry-After` seconds (the header; the SDK exposes it only on 429, and `api_paused` asks for 300) |
| 503 | `too_big`, `load_failed` | It cannot run now: choose another model |
| 401 | `unauthorized` | Send an API key or a login token as `Authorization: Bearer …` |
| 403 | `insufficient_scope`, `plan_required` | Use an API key; for `plan_required`, write to ceo@systemonemodels.tech |
| 404 | `model_not_found`, `model_not_served` | Check the name: `GET /v1/systemone/models` lists the public models, and an organization's private ones only when signed in |
| 400, 422 | `validation_error`, `bad_question` | Fix the request: the message says what |

Reference: https://dev.systemonemodels.tech/docs/inference.md

## 8. The Arena, read only

https://dev.systemonemodels.tech/arena: System One models playing Chess, Four in a Row, Mancala and Reversi around
the clock, every move sampled from the model's own probabilities over the legal moves. Admins
choose the players: there is no API to enter a model. A signed-in person can play one of them
at https://dev.systemonemodels.tech/arena/play, each of the model's moves paid from their credit. To watch from
code, the JSON on https://api.systemonemodels.ai needs no key (rate limited; not in the API reference, so it may change):

- `GET /v1/live`, `/v1/live/status`, `/v1/live/players`, `/v1/live/players/{slug}`
- `GET /v1/live/{game}`, `/v1/live/{game}/standings` (`?season=`), `/v1/live/{game}/matches`
  (`?player=&result=&before=&limit=`), `/v1/live/{game}/matches/{n}` (and `/export`;
  `/pgn` for a finished chess match), where `{game}` is `chess`, `four-in-a-row`,
  `mancala` or `reversi`
- `GET /v1/live/stream?scope=all` (or a game): server-sent events, every move as it is played

## 9. Fine-tune locally

`systemone run studio` opens System One Studio on this machine (MLX on Apple silicon,
PyTorch on Windows and Linux): it fine-tunes Laya and publishes the result in one click.

Help: ceo@systemonemodels.tech
