Skip to main content

Write a custom probe

Where: Guardrails → Content Guardrails → Add Guardrail → Create custom probe
  1. Choose Create probe with policy (You can define your own LLM policy) and click Next.
  2. Fill in Add Custom GuardRail using the table below, then click Save. If required fields are empty you see Please fill in all required fields.
  3. On Guard Rail details fill in the second table and click Finish. The probe is then available in every profile.
Write at least a few training examples for every violation category and for safe content. Examples are how the probe learns the edge of your policy.

Use a standalone guardrail endpoint

Open the profile and click Use Guardrail. It shows ready-made curl, Python and JavaScript snippets with Copy. Call /v1/moderations with the profile name as model and the text as input, and your API key in the Authorization header: