A drop-in proxy that automatically protects your AI features — blocking prompt injection, redacting PII, filtering topics, and validating outputs before they reach your users.
Most teams build the same safety checks from scratch, every time. sAIfety means you build them once.
sAIfety is a transparent proxy — it speaks the same API as OpenAI and Anthropic, so your existing code needs no modification.
Run sAIfety alongside your app. It listens on port 8000 and forwards requests to whichever AI API you're using.
Point your OpenAI or Anthropic client at the proxy instead of the AI API directly. That's the only code change needed.
Edit policy.yaml to define which guardrails apply to
which tenants. No code deploys — just save the file.
Six guardrails run on every request and response, configurable per tenant.
Detects sensitive personal data in user messages before they reach the model. Choose to silently redact or block the request entirely.
Blocks attempts to override your system instructions — jailbreaks, persona hijacking, "ignore all previous instructions" patterns.
Blocks requests that mention any topic you configure as off-limits. Useful for brand safety, legal compliance, or competitive reasons.
Inspects model responses before they reach your users, blocking hate speech, slurs, and harmful content.
Enforce a maximum response length, or require the model's response to conform to a JSON schema — useful for structured data pipelines.
Every request is logged — tenant, API used, outcome, reason if blocked, and message preview. Queryable via API or the dashboard.
Compatible with the official OpenAI and Anthropic SDKs in Python and JavaScript — no wrapper libraries, no lock-in.
# The only change needed in your entire codebase from openai import OpenAI client = OpenAI( api_key="sk-...", base_url="http://localhost:8000/v1", # ← add this ) # Everything else stays identical response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello!"}], extra_headers={"X-Tenant-ID": "my-app"} # optional )
// The only change needed in your entire codebase import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.OPENAI_API_KEY, baseURL: "http://localhost:8000/v1", // ← add this }); // Everything else stays identical const response = await client.chat.completions.create({ model: "gpt-4o", messages: [{ role: "user", content: "Hello!" }], });
# Works with the official Anthropic SDK too from anthropic import Anthropic client = Anthropic( api_key="sk-ant-...", base_url="http://localhost:8000", # ← add this ) response = client.messages.create( model="claude-opus-4-6", max_tokens=1024, messages=[{"role": "user", "content": "Hello!"}], )
A live dashboard shows every request in real time — what was blocked, why, and by which guardrail. Edit your guardrail rules per-tenant directly from the UI. No YAML files, no restarts.
Run sAIfety on your own infrastructure for free — forever. Or use our hosted service and skip the ops work entirely.
Open source, self-hosted, and running in under two minutes.