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
| Field | Required | Type | Description |
|---|---|---|---|
| name | Yes | string | Guard config name. |
| provider | Yes | string | AI provider for LLM-based checks (anthropic, openai, gemini, groq, mistral). |
| model | Yes | string | Model used for checks (e.g. claude-sonnet-4-6). |
| description | No | string | What this guard protects against. |
| allowed_topics | No | string[] | Only these topics are allowed in responses. |
| blocked_topics | No | string[] | These topics are never allowed. |
| blocked_keywords | No | string[] | Responses containing these keywords are blocked. |
| blocked_phrases | No | string[] | Exact phrases that trigger a block. |
| tone_rules | No | string | Natural-language tone requirements. |
| safe_response | No | string | Message returned when content is blocked. |
| limit_response | No | string | Message returned when a rate limit is hit. |
| max_executions_per_period | No | number | Max requests per project per period. |
| period_type | No | string | hourly | daily | monthly |
| max_executions_per_user | No | number | Max requests per end-user per period. |
| user_period_type | No | string | hourly | 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
| Status | Cause |
|---|---|
400 | Missing required field (name, provider, or model). |
401 | Missing or invalid X-Reliant-Key. |
404 | Guard config ID not found. |