Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

OpenAI Guardrails

guardrails.openai.com

  • Web
  • API
  • Self-hosted

What OpenAI Guardrails is

OpenAI Guardrails is an open-source project for adding configurable safety and compliance checks to LLM applications. Its SDKs validate inputs and outputs, with built-in checks for PII masking, moderation, jailbreaks, off-topic prompts, URL filtering, and hallucinations. Prompt-injection detection for agent tool calls is experimental. The Python package provides wrapped OpenAI clients for Chat Completions and Responses API calls and integrates with the OpenAI Agents SDK. The quickstart also documents Azure OpenAI clients and OpenAI-compatible APIs, including a local Ollama example. Developers can build pipeline configurations with the Guardrails Wizard or write them as JSON, then measure performance on labeled datasets with evaluation tooling. Python and TypeScript/JavaScript SDKs are available. The Python project is marked Preview and uses the MIT license. It requires Python 3.11 or newer; configurations using Contains PII also need the spaCy model during build or deployment. Guardrails calls paid OpenAI APIs, and developers are responsible for those charges. It may use third-party services such as Presidio, which OpenAI says it does not develop or verify.

Who it suits

It suits developers adding configurable checks to LLM inputs and outputs, including teams using OpenAI, Azure OpenAI, compatible APIs, or local Ollama examples. Python users need version 3.11 or newer.

Good to know, and what to watch

  • Checks cover PII, moderation, jailbreaks, and hallucinations
  • Supports configurable pipelines through a wizard or JSON
  • Includes evaluation tools for labeled datasets
  • Offers Python and TypeScript/JavaScript SDKs
  • Python project is labeled Preview
  • Python package requires Python 3.11 or newer
  • Paid OpenAI API charges are the developer's responsibility
  • Contains PII configurations need a spaCy model

The verdict

OpenAI Guardrails offers a broad set of configurable checks, SDK integrations, and evaluation tooling. Account for its Preview status, Python requirements, API charges, and possible third-party services before adopting it.

What the maker publishes

Agents integration
The Python SDK integrates with the OpenAI Agents SDK through GuardrailAgent. source
Availability
The Python project is labeled Preview and is available under the MIT license. source
Checks
Built-in checks include PII masking, moderation, jailbreak detection, off-topic prompt checks, URL filtering, hallucination detection, and experimental prompt injection detection for agent tool calls. source
Checks
Available checks include moderation, jailbreak detection, PII detection, URL filtering, secret key detection, hallucination detection, prompt injection detection, and custom prompt checks. source
Client integration
The Python package provides drop-in replacements for OpenAI clients and integrates with the OpenAI Agents SDK. source
Configuration
The Guardrails Wizard creates pipeline configurations that can also be defined manually as JSON. source
Configuration
The Guardrails Wizard creates pipeline configurations that can be exported for use with the SDK. source
Evaluation
Guardrail performance can be measured on labeled datasets using the exported configuration and the evaluation dependencies. source
Evaluations
The Python package includes evaluation tooling for measuring guardrail performance on labeled datasets. source
Founded
2015 source
Headquarters
San Francisco, California, United States source
Maker
OpenAI describes itself as an AI research and deployment company; it was founded in 2015 and is based in San Francisco. source
Maturity
The Python repository labels OpenAI Guardrails as a preview. source
OpenAI clients
The Python SDK provides wrapped OpenAI clients for Chat Completions and Responses API calls. source
Other providers
The quickstart documents Azure OpenAI clients and compatibility with OpenAI-compatible APIs, including a local Ollama example. source
Platform support
The maker provides Python and TypeScript/JavaScript Guardrails SDKs for use in applications. source
Provider compatibility
The quickstart documents Azure OpenAI clients and compatibility with OpenAI-compatible APIs, including a local Ollama example. source
Purpose
OpenAI Guardrails adds configurable safety and compliance checks to LLM applications by validating inputs and outputs. source
Requirements
The Python package requires Python 3.11 or newer; configurations using Contains PII also require its spaCy model during build or deployment. source
Third-party component
Guardrails may use third-party services such as the Presidio open-source framework, which OpenAI says it does not develop or verify. source
Third-party services
Guardrails may use third-party services such as the Presidio open-source framework, which is subject to its own terms and is not developed or verified by OpenAI. source
Usage costs
Guardrails calls paid OpenAI APIs, and developers are responsible for the associated charges. source
Usage costs
Guardrails calls paid OpenAI APIs, and developers are responsible for the associated charges. source

Checked against the maker's pages on 4 Oct 2026.