Guardrails API¶
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/guardrails |
Create guardrail |
GET |
/api/guardrails |
List guardrails |
GET |
/api/guardrails/{id} |
Get guardrail |
PUT |
/api/guardrails/{id} |
Update guardrail |
DELETE |
/api/guardrails/{id} |
Delete guardrail |
Create Guardrail¶
{
"name": "no-pii",
"description": "Blocks prompts containing PII",
"type": "prompt",
"config": {
"patterns": ["\\b\\d{3}-\\d{2}-\\d{4}\\b"]
}
}
Response: 201 Created
List Guardrails¶
Response: 200 OK — Array of guardrail objects.
Get Guardrail¶
Response: 200 OK
Update Guardrail¶
Response: 200 OK
Delete Guardrail¶
Response: 204 No Content