OpenAI Guardrails

Web · Self-hosted · API

Freedom report

One barScore 5.4

  • Free tierNo free tier on record
  • Open codeNo open-source code on record
  • Runs widely1 of 6 device platforms
  • DocumentedPlans, terms and facts published

OpenAI Guardrails is an open-source project for adding configurable safety and compliance checks to LLM applications by validating inputs and outputs. The Python project is labeled Preview and available under the MIT license. Its built-in checks include PII masking, moderation, jailbreak detection, off-topic prompt checks, URL filtering and hallucination detection, with experimental prompt-injection detection for agent tool calls. The Python SDK provides wrapped OpenAI clients for Chat Completions and Responses API calls and integrates with the OpenAI Agents SDK through GuardrailAgent. The quickstart also documents Azure OpenAI clients and compatible APIs, including a local Ollama example. Developers can create pipeline configurations with the Guardrails Wizard or define them as JSON, then use evaluation tools to measure performance on labeled datasets. OpenAI provides Python and TypeScript/JavaScript SDKs. The Python package requires Python 3.11 or newer; configurations using Contains PII also need its spaCy model during build or deployment. Guardrails calls paid OpenAI APIs, whose charges are the developer’s responsibility. It may use third-party components such as Presidio, which OpenAI says it does not develop or verify.

Who it is for

It suits developers adding configurable checks to LLM applications, including projects using OpenAI, Azure OpenAI or compatible APIs. Developers need Python 3.11 or newer for the Python package and must account for paid OpenAI API usage.

What is good

  • Checks include PII masking and jailbreak detection.
  • Supports Python and TypeScript/JavaScript SDKs.
  • Configurations can be built with a wizard or JSON.
  • Evaluation tools measure performance on labeled datasets.

What to know first

  • The Python project is labeled Preview.
  • The Python package requires Python 3.11 or newer.
  • OpenAI API usage charges are the developer’s responsibility.
  • Some configurations require a spaCy model.

Verdict

OpenAI Guardrails offers configurable checks and evaluation tools for LLM applications, with documented integrations for OpenAI, Azure OpenAI and compatible APIs. Its Preview status, Python requirements and paid API usage are important considerations.

Compared on AI guardrail software

Deployment
hybrid
Prompt injection defense
Yes
PII detection
Yes
Jailbreak detection
Yes
Custom policies
Yes
SDK languages
Python, TypeScript

Best OpenAI Guardrails alternatives

See all 20