Technical documentation for the Universal Judgment Engine (UJE). Validate documents against version-pinned, SHA-secured rulebooks and produce cryptographically signed Evidence Packs.
Get started with the WordSentinel™ API in minutes
Obtain authentication token from your authentication flow. Never embed secrets in code.
curl -s -H "Authorization: Bearer $TOKEN" \ "https://universal-judgment-engine-985987917853.us-central1.run.app/profiles" | jq
curl -s -H "Authorization: Bearer $TOKEN" \ -F "file=@doc.pdf" \ "https://universal-judgment-engine-985987917853.us-central1.run.app/validate?profile=ops.ksa.hse.ptw@0.1" | jq
Returns a job_id and status of "queued"
JOB_ID="..." curl -s -H "Authorization: Bearer $TOKEN" \ "https://universal-judgment-engine-985987917853.us-central1.run.app/jobs/$JOB_ID" | jq
When completed, a signed evidence_url will be present
EVIDENCE_URL="..." curl -s "$EVIDENCE_URL" | jq '.header, .findings | length'
What to expect from validation results
profile
Exact profile and version usedrulebook_version
Specific rulebook versionlanguages_detected
Array of detected languagesrulebook_sha
64-char hex for provenancerun_ts
ISO8601 timestampsignature
ES256 signature via Cloud KMSEach finding is deterministic and includes:
rule_id
- Unique rule identifierseverity
- Critical, warning, or inforationale
- Human-readable explanationmeasured_vs_required
- Comparison valuestext_spans
- Matched document sectionscitation_ids
- Regulatory referencesFor auditors and security teams
gcloud kms keys versions get-public-key \ --location=us-central1 --keyring=ws-evidence --key=evidence-signing \ --version=1 --output-file=pubkey.pem
import json, hashlib, base64 from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import ec def canonicalize(d): return json.dumps(d, separators=(",",":"), sort_keys=True).encode() def b64url_decode(s): s += "=" * (-len(s) % 4) return base64.urlsafe_b64decode(s.encode()) pub_key = serialization.load_pem_public_key(open("pubkey.pem", "rb").read()) evidence_pack = json.load(open("evidence.json")) signature = evidence_pack["signature"]["value"] header = evidence_pack["header"] digest = hashlib.sha256(canonicalize(header)).digest() pub_key.verify(b64url_decode(signature), digest, ec.ECDSA(hashes.SHA256())) print("Signature OK")
Available validation profiles for operators
ops.ksa.hse.ptw@0.1
Permit to Work PDF (EN/AR)
finance.ch.disclosure@0.3
Marketing/disclosure PDF/TXT (DE/FR/IT/EN)
energy.uae.agreements@0.1
Agreement PDF (EN/AR)
For admins and product teams
Conservative 'guard bands' prevent false criticals and 'context gating' ensures rules only apply where relevant.
Client-specific rule adjustments (e.g., tighter thresholds) via SHA-pinned overlays.
Internal tool for authoring, testing, and publishing new version-pinned rulebooks.
REQUIRE_JWT=true, no unpinned configurations (ALLOW_UNPINNED=false), evidence signing enabled.
Dashboards for latency, error rates, key metrics, with alerts for 99.9% uptime SLA deviations.
Every Evidence Pack tied to release_set, ensuring perfect judgment reproduction for audits.
Get help from our technical team
Ready to get started with WordSentinel™?
Technical documentation and API references
Evidence verification guides and SBOMs available
401
Invalid or expired JWT token
404
Profile not found or inactive
422
Invalid document format or size