Deploy a Policy (API)
These are instructions for integrating your guardrails with an AI/LLM via API. If you simply want to use policies on the platform, then the next step is to create an AI Assistant.
API Guardrail Integration
curl \
-X POST \
-H "X-API-Key: API_KEY_PLACHOLDER" \
-H "Content-Type: application/json" \
"https://api.preamble.com/_PLACHOLDER" \
-d '{
"policyId": "ID_PLACHOLDER",
"versionId": "ID_PLACHOLDER",
"modelId": "MODEL_PLACHOLDER",
"applyGuardrails": 1,
"history": [{ "role": "user", "content": "YOUR_TEXT_TO_TEST" }]
}'Last updated