Integration
Guardrails & fact-checking in front of the OpenAI API
If your app uses an OpenAI SDK, the integration is one constructor argument: the proxy exposes the same /v1/chat/completions surface your code already calls, runs the guardrail pipeline on each request and response, and forwards upstream to OpenAI. Python, Node, Go, curl – anything that takes a base URL takes the proxy.
Nothing else changes: your models, your prompts, your parameters, and your response-parsing code all stay as they are. What you gain is the pipeline – PII screened before OpenAI sees it, answers grounded against their sources, structured output validated, tool calls checked against policy – plus per-request cost and violation visibility your provider dashboard cannot give you.
# before
client = OpenAI(api_key="sk-…")
# after – guardrails on every call
client = OpenAI(
base_url="https://api.inguardout.com/v1",
api_key="gr-…",
) 1. Create a key
Issue a gr- API key in the dashboard and configure which upstream it forwards to – your OpenAI account, with your models.
2. Swap the base URL
One line in the SDK constructor. Requests are OpenAI-shaped in, OpenAI-shaped out, plus X-Guardrails-* headers.
3. Pick your checks and mode
Core checks are on by default; agent checks and external grounding are opt-in. Start in FIX, enforce with PREVENT when the data says so.
4. Read the headers
Violations, cost, and run totals ride back on every response – your app can react programmatically, without polling a dashboard.
Is the proxy API-compatible with OpenAI?
It exposes the OpenAI chat-completions surface: existing SDK code works with a base-URL and key change. Structured output requests use the native support and add validation and repair on top.
Do responses change shape?
No – standard OpenAI JSON, plus X-Guardrails-* response headers. In PREVENT mode a violating request returns a 422 with the findings in the body instead of a completion.
Can I use function calling / tools?
Yes – and that is where the agent guardrails engage: the tool_calls in responses are validated against your tool policy, tiers, grounding, and taint rules before your app acts on them.
What latency does it add?
The deterministic stages add milliseconds; judge and classifier stages cost a model call where enabled. Every stage is timed per request and shown in the dashboard – measured on your traffic.
Keep your OpenAI SDK, change one line
Point your existing OpenAI client at the proxy base URL and every request runs the guardrail pipeline. We are running a limited demo - sign up and we will get you in as soon as we can.