API Reference

Create & Delete Guard Config

Create new Guard configurations or delete existing ones via API Key.


GET/api/guard

Lists all guard configurations in the project.

http
GET /api/guard X-Reliant-Key: rel_your_api_key
json — 200 OK
{ "configs": [ { "id": "grd_...", "name": "Customer Support Guard", "provider": "anthropic", "model": "claude-sonnet-4-6", "created_at": "2026-08-05T03:00:00Z" } ] }

GET/api/guard/:id

Returns full details of a single guard configuration.

http
GET /api/guard/:id X-Reliant-Key: rel_your_api_key

POST/api/guard

Creates a new Guard configuration.

Authentication

http
POST /api/guard X-Reliant-Key: rel_your_api_key Content-Type: application/json

Body

FieldRequiredTypeDescription
nameYesstringGuard config name.
providerYesstringAI provider for LLM-based checks (anthropic, openai, gemini, groq, mistral).
modelYesstringModel used for checks (e.g. claude-sonnet-4-6).
descriptionNostringWhat this guard protects against.
allowed_topicsNostring[]Only these topics are allowed in responses.
blocked_topicsNostring[]These topics are never allowed.
blocked_keywordsNostring[]Responses containing these keywords are blocked.
blocked_phrasesNostring[]Exact phrases that trigger a block.
tone_rulesNostringNatural-language tone requirements.
safe_responseNostringMessage returned when content is blocked.
limit_responseNostringMessage returned when a rate limit is hit.
max_executions_per_periodNonumberMax requests per project per period.
period_typeNostringhourly | daily | monthly
max_executions_per_userNonumberMax requests per end-user per period.
user_period_typeNostringhourly | daily | monthly

Example

json — body
{ "name": "Customer Support Guard", "provider": "anthropic", "model": "claude-sonnet-4-6", "blocked_topics": ["violence", "politics"], "tone_rules": "Always professional and empathetic", "safe_response": "I can only help with support-related topics.", "max_executions_per_user": 100, "user_period_type": "daily" }
json — 200 OK
{ "id": "grd_...", "name": "Customer Support Guard", "provider": "anthropic", "model": "claude-sonnet-4-6", "created_at": "2026-08-05T03:00:00Z" }

DELETE/api/guard/:id

Permanently deletes a Guard configuration.

http
DELETE /api/guard/:id X-Reliant-Key: rel_your_api_key
json — 200 OK
{ "success": true }

Error responses

StatusCause
400Missing required field (name, provider, or model).
401Missing or invalid X-Reliant-Key.
404Guard config ID not found.