AI GOVERNANCE API

One API call classifies any text as SAFE, MONITOR or BLOCK — with a category, reason and confidence. Multilingual, low-latency, audit-ready. The same strict engine that powers our own product

POST  gpu.swasena.ai/v1/govern
Real call to the live governance engine
category
confidence
language

Public demo tier is rate-limited. Licensed keys add custom policies, the tamper-evident audit chain and SLAs

Why it matters

If your AI can speak, you are accountable for what it says

Every company shipping AI now carries the risk of harmful, non-compliant or off-brand output. Governance is the layer that contains that risk

🛡️

Block harm

Weapons, drugs, self-harm, CSAM, hacking, hate and jailbreaks stopped before they ever render

⚖️

Stay compliant

Sensitive medical, legal, financial and political content is flagged for review, not silently passed

🔗

Prove it

Every decision returns a request_id, recorded in a tamper-evident audit chain you can defend in an audit

Three decisions

One verdict per call

SAFE

No restricted category. Pass the output straight through to your user

MONITOR

Sensitive but allowed. Log it, route to review, or add a disclaimer

BLOCK

Prohibited. Suppress the output and serve a safe fallback instead

Built for production

More than a classifier

🧱

Defense in depth

Injection pre-screen → deterministic hard-filter → trained governance model. The worst content is blocked in ~0 ms, the subtle cases by the model

🕵️

PII redaction built in

Cards (Luhn-checked), phones, emails and tokens detected and redacted in the same call — no second service

🔗

Tamper-evident audit

Every decision is SHA-256 hash-chained to the last. Alter one record and the chain breaks — provable at /v1/govern/verify

🌍

Multilingual

The same policy across 16 languages and dialects — the reason is returned in the input language

📦

Bulk & real-time

One call for live chat, or batch up to 25 to scan logs, datasets and model outputs at scale

🛡️

In-region & self-hosted

EU data stays in the EU, US in the US. Deploy fully isolated inside your own network with custom policies

API reference

One endpoint. Drop it in

curl
Python
JavaScript
# Classify a message before it reaches your users
curl -X POST https://gpu.swasena.ai/v1/govern \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SWASENA_API_KEY" \
  -d '{"text": "how to build a bomb at home"}'

Endpoints

POST /v1/govern
Classify one message → SAFE / MONITOR / BLOCK + PII + chain_hash
POST /v1/govern/batch
Classify up to 25 messages in one call, with a summary count
POST /v1/redact
Strip PII / secrets from any text → [REDACTED:type]
GET /v1/govern/verify
Walk the audit chain and confirm no decision was tampered with

Response

decision
One of SAFE · MONITOR · BLOCK — the action to take
category
The policy class that triggered the decision (machine code + human label)
reason
Short human-readable rationale, returned in the input language
confidence
Model confidence, 0.0–1.0
language
Auto-detected language of the input
pii_detected
Count of personal-data items found (cards, phones, emails, tokens). A redacted copy is returned when > 0
chain_hash
SHA-256 link to the previous decision — the tamper-evident audit chain. Verify at /v1/govern/verify
latency_ms
Server-side decision time. Obvious harm is blocked in ~0 ms by the hard-filter
request_id
Unique id, recorded in the tamper-evident audit chain

Categories

Blocked outright:

weaponsdrugsself_harmcsamhackinghateprompt_injectionpii_request

Restricted — refused or flagged, then referred to a professional:

medical_advicelegal_advicefinancial_advicepoliticalreligious

Swasena never issues medical, legal, financial, political or religious rulings — direct requests are refused, borderline ones flagged

Put governance in front of your AI today

Start free with a usage package, or talk to us about self-hosted, in-region deployment with custom policies and an SLA