- Regex Match: Checks if the request or response text matches a specific regex pattern.
- JSON Schema: Verifies that the response JSON adheres to a defined schema.
- Code Detection: Detects code snippets in formats such as SQL, Python, or TypeScript.
- …and more.
How to use Guardrails AI
Putting Obiguard guardrails in production is just a 4-step process:- Create a policy group
- Add validators to the policy group
- Generate an API key for the policy group
- Attach the API key to a request
1. Create a Policy Group
Navigate to the Project page, select guardrail Policies, and click Create to set up a new policy group. Give your policy group a name and, if desired, add a description for easier identification later.2. Add Validators to the Policy Group
In Obiguard, you can assign a guardrail validator to either theINPUT (PROMPT) or the OUTPUT. Ensure each validator is configured to check only one: either the input or the output.
Each guardrail Check provides a specific input field tailored to its purpose—simply fill in the required details and save your check.
You can include multiple checks within a single validator.
Each check returns a simple boolean (passed/failed) result.

3. Generate an API Key for the Policy Group
Once your policy group is set up with the desired validators, generate an API key for it. This key will be used to authenticate requests that require the guardrails defined in this policy group. You can generate multiple API keys for the same policy group if needed.4. Attach the API Key to a Request
To use the guardrails in your application, attach the generated API key to your requests. This is where Obiguard’s magic comes into play. The guardrail you created above is yet not an Active guardrail because it is not attached to any request. Provide the API key whenever you make a request to Obiguard, and it will apply the guardrails defined in your policy group to that request.- Python SDK
- OpenAI Python
- cURL

