sovereign-router — Python client for the Sovereign Frontier AIEM registry
and SovereignRouter inference gateway. Covers artifact publish/verify/pull, attested chat
completions, streaming, and supply-chain endpoints.
$ pip install sovereign-router
# or with optional PyNaCl for manifest signing helpers$ pip install sovereign-router pynacl
Requires requests ≥ 2.31. No other runtime dependencies.
Quickstart
python — AIEM registry
from sovereign_router importAiemRegistryClient
sf = AiemRegistryClient(api_key="sk-sf-...")
# list top sealed models
models = sf.list_artifacts("models", tier="sealed", limit=10)
for m in models:
print(m["id"], m["tier"])
# cryptographically verify an artifact
result = sf.verify("models", "qwen/qwen3-235b-a22b")
assert result["valid"]
python — inference gateway
from sovereign_router importSovereignRouterClient
sr = SovereignRouterClient(
base_url="https://router.example.com",
api_key="sk-router-...",
policy="clinical-strict",
)
reply = sr.chat(
model="qwen/qwen3-235b-a22b",
messages=[{"role": "user", "content": "Summarise the study"}],
)
print(reply["choices"][0]["message"]["content"])
print("rekor_index:", reply["attestation"]["rekor_index"])
AiemRegistryClient
Interacts with the Sovereign Frontier AIEM artifact registry — publishing, verifying,
pulling, and listing attested AI artifacts. Connects to
https://api.sovereignfrontier.ai/api/v1 by default.
Fetch the full AIEM-1 manifest for an artifact, including all attestation fields.
status() · list_publishers()
sf.status() → dict
Registry health summary — tree size, federation state, active alerts.
sf.list_publishers() → list
All registered publishers with tier/revocation metadata.
SovereignRouterClient
Drop-in replacement for the OpenAI client targeting a SovereignRouter gateway.
Every response includes an attestation field with a Rekor index and
trust metadata.
Air-gapped environments: use verify_firmware_receipt()
to confirm an artifact's provenance without any network access. Only the receipt
bundle (pre-fetched) and the artifact binary SHA-256 are needed.
example
import hashlib, json
# pre-fetch the receipt once (can be done online)
receipt = sr.firmware_receipt("models", "qwen/qwen3-235b-a22b")
withopen("receipt.json", "w") as f:
json.dump(receipt, f)
# ── later, fully offline ──────────────────────────────────────────withopen("receipt.json") as f:
receipt = json.load(f)
withopen("model.safetensors", "rb") as f:
sha256 = hashlib.sha256(f.read()).hexdigest()
result = sr.verify_firmware_receipt(receipt, sha256)
if not result["ok"]:
raiseRuntimeError(result["errors"])