Create Organization Guardrail Definition
Changed onDefine a guardrail this deployment will build and call itself. Organization owners and admins only.
guardrail_name must be one the built-in guardrail catalog lists (GET /api/v1/tool-settings/guardrails/catalog), and create_kwargs must satisfy that guardrail's constructor as the catalog describes it: no argument it does not declare, nothing it types as a live object rather than configuration, and every required argument no environment variable can supply. Arguments the catalog marks secret are encrypted at rest.
A definition on its own changes no request. Mandate it through /api/v1/organizations/me/guardrails for it to run.
The definition is saved first and built second, so a guardrail this deployment cannot construct is still stored and answers build_state: "failed" rather than refusing the write. Why it failed is not reported: a vendor library may put the arguments it was handed, which are your credentials, into its own error message. The reason is in the gateway's log.
Request
- The document declares no server URL.
- Auth: one of:
- API key in header Otari-Key
- API key in header x-api-key
Request body
Example request
{
"create_kwargs": {
"api_key": "lakera-...",
"endpoint": "https://api.lakera.ai"
},
"enabled": true,
"guardrail_name": "lakera_guard",
"name": "prod-lakera"
}Response
Successful Response
Changes
- info
added the optional property
to the response with the status
- info
- info
endpoint added
- info