API Reference
Update Guard Config
Update a Guard configuration via API Key — adjust rate limits, blocked topics, tone rules, or any other guard setting programmatically.
PATCH/api/guard/:id
Partially updates a guard config. Only the fields you send are changed.
Authentication
http
PATCH /api/guard/:id
X-Reliant-Key: rel_your_api_key
Content-Type: application/json
Allowed fields
| Field | Type | Description |
|---|---|---|
| name | string | Guard config name. |
| description | string | What this guard protects against. |
| provider | string | AI provider for LLM-based checks. |
| model | string | Model used for LLM-based checks. |
| allowed_topics | string[] | Only these topics are allowed in responses. |
| blocked_topics | string[] | These topics are never allowed. |
| blocked_keywords | string[] | Responses containing these keywords are blocked. |
| blocked_phrases | string[] | Exact phrases that trigger a block. |
| tone_rules | string | Natural-language tone requirements. |
| safe_response | string | Message returned when content is blocked. |
| limit_response | string | Message returned when a rate limit is hit. |
| max_executions_per_period | number | Max requests per project per period. |
| period_type | string | hourly | daily | monthly |
| max_executions_per_user | number | Max requests per end-user per period. |
| user_period_type | string | hourly | daily | monthly |
Example
json — body
{
"max_executions_per_user": 200,
"user_period_type": "daily",
"blocked_topics": ["violence", "adult content"]
}
Error responses
| Status | Cause |
|---|---|
400 | No recognized field was sent in the body. |
401 | Missing or invalid X-Reliant-Key. |
404 | Guard config ID not found. |