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

FieldTypeDescription
namestringGuard config name.
descriptionstringWhat this guard protects against.
providerstringAI provider for LLM-based checks.
modelstringModel used for LLM-based checks.
allowed_topicsstring[]Only these topics are allowed in responses.
blocked_topicsstring[]These topics are never allowed.
blocked_keywordsstring[]Responses containing these keywords are blocked.
blocked_phrasesstring[]Exact phrases that trigger a block.
tone_rulesstringNatural-language tone requirements.
safe_responsestringMessage returned when content is blocked.
limit_responsestringMessage returned when a rate limit is hit.
max_executions_per_periodnumberMax requests per project per period.
period_typestringhourly | daily | monthly
max_executions_per_usernumberMax requests per end-user per period.
user_period_typestringhourly | daily | monthly

Example

json — body
{ "max_executions_per_user": 200, "user_period_type": "daily", "blocked_topics": ["violence", "adult content"] }

Error responses

StatusCause
400No recognized field was sent in the body.
401Missing or invalid X-Reliant-Key.
404Guard config ID not found.