organization-guardrails

Test Organization Guardrail

Changed on

Post some text to the guardrails service a mandate names and return its verdict.

Organization owners and admins only. Uses the mandate's own endpoint and credential, or the deployment's guardrails URL when it names none, and faces the same safety check a request does. Nothing is stored. validate_kwargs replaces the stored arguments for this call, a *** in it keeps the value stored under that name, and omitting it sends the stored arguments.

A mandate that runs a configured guardrail answers 409: test that guardrail through /api/v1/organizations/me/guardrail-definitions. So does one with nowhere to send the check. A service that cannot be reached, or answers something malformed, answers 502, and the reason is in the gateway's log only.

post/api/v1/organizations/me/guardrails/{guardrail_id}/test

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Path parameters

guardrail_idstring uuid required

Request body

textstring required

The input to check, as a request's user text would reach it

validate_kwargsobject

Per-check arguments to send in place of the stored ones; omitted sends the stored ones. A *** keeps the value stored under that name

Response

Successful Response

explanationstring nullable required

The service's reason, when it gives one

scorenumber nullable required

The service's score, when it gives one

validboolean nullable required

False when the guardrail flagged the text, null when it gave no verdict

Changes