organization-guardrail-definitions

Test Organization Guardrail Definition

Changed on

Run a definition's guardrail over some text and return its verdict.

Organization owners and admins only. The guardrail is the one the worker that answered already holds built, so this tests what is running rather than building it again. Nothing is stored and no mandate is involved; validate_kwargs stands in for what a mandate would pass with each check.

A definition this worker does not hold built answers 409, and its build_state says why. A vendor call that fails answers 502, and the reason is in the gateway's log only: a vendor library may put the credentials it was handed into its own message.

post/api/v1/organizations/me/guardrail-definitions/{definition_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

definition_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, as a mandate's validate_kwargs would hand them to this guardrail

Response

Successful Response

explanationstring nullable required

The vendor's reason, when it gives one

scorenumber nullable required

The vendor's score, when it gives one

validboolean required

False when the guardrail flagged the text

Changes