Skip to main content
The Dome API allows you to manage guardrail configurations for your agents. Configurations define which guards run on inputs and outputs, and what detection methods each guard uses.

Actions

ActionDescription
GetAgentConfigGet guardrail configuration for an agent
GetDefaultConfigGet the default guardrail configuration
UpdateAgentConfigUpdate an agent’s guardrail configuration
DeleteConfigDelete a guardrail configuration
ListDetectorsList available detection methods
GetDetectorInfoGet details for a specific detector

GetAgentConfig

Retrieves the guardrail configuration for a specific agent.

Request Syntax

GET /v1/dome/agents/{agent_id}/config HTTP/1.1
Authorization: Bearer {api_key}

URI Parameters

ParameterTypeRequiredDescription
agent_idStringYesThe agent identifier. Format: agent-{uuid}.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "string",
  "agent_id": "string",
  "input-guards": ["string"],
  "output-guards": ["string"],
  "input-early-exit": boolean,
  "output-early-exit": boolean,
  "input-run-parallel": boolean,
  "output-run-parallel": boolean,
  "<guard-name>": {
    "type": "string",
    "methods": ["string"],
    "threshold": number
  }
}

Response Elements

ElementTypeDescription
idStringConfiguration identifier. Format: dome-config-{uuid}.
agent_idStringAssociated agent identifier.
input-guardsArray of StringGuards to run on input.
output-guardsArray of StringGuards to run on output.
input-early-exitBooleanStop on first input guard trigger. Default: false.
output-early-exitBooleanStop on first output guard trigger. Default: false.
input-run-parallelBooleanRun input guards in parallel. Default: false.
output-run-parallelBooleanRun output guards in parallel. Default: false.
<guard-name>ObjectGuard configuration. See Guard Object.

Guard Object

ElementTypeDescription
typeStringGuard type: security, moderation, or privacy.
methodsArray of StringDetection methods to use. See Available Detectors.
thresholdNumberDetection threshold (0.0–1.0). Default varies by method.

Errors

ErrorHTTP StatusDescription
AgentNotFoundException404Agent does not exist.
ConfigNotFoundException404No configuration exists for this agent.

Example

Request:
curl -X GET "https://api.vijil.ai/v1/dome/agents/agent-abc123/config" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Response:
{
  "id": "dome-config-xyz789",
  "agent_id": "agent-abc123",
  "input-guards": ["security-guard"],
  "output-guards": ["privacy-guard", "moderation-guard"],
  "input-early-exit": true,
  "output-early-exit": false,
  "security-guard": {
    "type": "security",
    "methods": ["prompt-injection-deberta-v3-base", "encoding-heuristics"]
  },
  "privacy-guard": {
    "type": "privacy",
    "methods": ["privacy-presidio"]
  },
  "moderation-guard": {
    "type": "moderation",
    "methods": ["moderation-flashtext"]
  }
}
Python:
config = vijil.dome_configs.get_config(agent_id="agent-abc123")

GetDefaultConfig

Retrieves the default guardrail configuration. Use this as a starting point for custom configurations.

Request Syntax

GET /v1/dome/config/default HTTP/1.1
Authorization: Bearer {api_key}

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "input-guards": ["string"],
  "output-guards": ["string"],
  "<guard-name>": {
    "type": "string",
    "methods": ["string"]
  }
}

Example

Request:
curl -X GET "https://api.vijil.ai/v1/dome/config/default" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
default_config = vijil.dome_configs.get_default_config()

UpdateAgentConfig

Updates or creates a guardrail configuration for an agent. The configuration is replaced entirely—include all guards you want active.

Request Syntax

PUT /v1/dome/agents/{agent_id}/config HTTP/1.1
Content-Type: application/json
Authorization: Bearer {api_key}

{
  "input-guards": ["string"],
  "output-guards": ["string"],
  "input-early-exit": boolean,
  "output-early-exit": boolean,
  "input-run-parallel": boolean,
  "output-run-parallel": boolean,
  "<guard-name>": {
    "type": "string",
    "methods": ["string"],
    "threshold": number
  }
}

URI Parameters

ParameterTypeRequiredDescription
agent_idStringYesThe agent identifier.

Request Parameters

ParameterTypeRequiredDescription
input-guardsArray of StringNoGuards to run on input. Default: [].
output-guardsArray of StringNoGuards to run on output. Default: [].
input-early-exitBooleanNoStop on first input guard trigger. Default: false.
output-early-exitBooleanNoStop on first output guard trigger. Default: false.
input-run-parallelBooleanNoRun input guards in parallel. Default: false.
output-run-parallelBooleanNoRun output guards in parallel. Default: false.
<guard-name>ObjectYesConfiguration for each guard listed in input-guards or output-guards.

Guard Configuration

ParameterTypeRequiredDescription
typeStringYesGuard type: security, moderation, or privacy.
methodsArray of StringYesDetection methods. See Available Detectors.
thresholdNumberNoDetection threshold (0.0–1.0).

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "string",
  "agent_id": "string",
  "updated_at": "string"
}

Errors

ErrorHTTP StatusDescription
InvalidRequestException400Configuration is malformed.
AgentNotFoundException404Agent does not exist.
InvalidDetectorException400One or more detection methods do not exist.

Example

Request:
curl -X PUT "https://api.vijil.ai/v1/dome/agents/agent-abc123/config" \
  -H "Authorization: Bearer $VIJIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input-guards": ["security-guard"],
    "output-guards": ["privacy-guard"],
    "input-early-exit": true,
    "security-guard": {
      "type": "security",
      "methods": ["prompt-injection-deberta-v3-base"]
    },
    "privacy-guard": {
      "type": "privacy",
      "methods": ["privacy-presidio"]
    }
  }'
Python:
vijil.dome_configs.update_dome_config(
    agent_id="agent-abc123",
    config={
        "input-guards": ["security-guard"],
        "output-guards": ["privacy-guard"],
        "input-early-exit": True,
        "security-guard": {
            "type": "security",
            "methods": ["prompt-injection-deberta-v3-base"]
        },
        "privacy-guard": {
            "type": "privacy",
            "methods": ["privacy-presidio"]
        }
    }
)

DeleteConfig

Permanently deletes a guardrail configuration.

Request Syntax

DELETE /v1/dome/config/{dome_config_id} HTTP/1.1
Authorization: Bearer {api_key}

URI Parameters

ParameterTypeRequiredDescription
dome_config_idStringYesThe configuration identifier.

Response Syntax

HTTP/1.1 204 No Content

Errors

ErrorHTTP StatusDescription
ConfigNotFoundException404Configuration does not exist.

Example

Request:
curl -X DELETE "https://api.vijil.ai/v1/dome/config/dome-config-xyz789" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
vijil.dome_configs.delete_dome_config(dome_config_id="dome-config-xyz789")

ListDetectors

Returns a list of available detection methods that can be used in guard configurations.

Request Syntax

GET /v1/dome/detectors HTTP/1.1
Authorization: Bearer {api_key}

Query Parameters

ParameterTypeRequiredDescription
typeStringNoFilter by detector type: security, moderation, or privacy.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": [
    {
      "id": "string",
      "name": "string",
      "type": "string",
      "description": "string",
      "default_threshold": number
    }
  ]
}

Response Elements

ElementTypeDescription
data[].idStringDetector identifier used in configurations.
data[].nameStringHuman-readable detector name.
data[].typeStringDetector type: security, moderation, or privacy.
data[].descriptionStringWhat the detector catches.
data[].default_thresholdNumberDefault detection threshold.

Example

Request:
curl -X GET "https://api.vijil.ai/v1/dome/detectors?type=security" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
detectors = vijil.detectors.list()

GetDetectorInfo

Retrieves detailed information about a specific detection method.

Request Syntax

GET /v1/dome/detectors/{detector_id} HTTP/1.1
Authorization: Bearer {api_key}

URI Parameters

ParameterTypeRequiredDescription
detector_idStringYesThe detector identifier.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "string",
  "name": "string",
  "type": "string",
  "description": "string",
  "default_threshold": number,
  "supported_on": ["string"],
  "latency_ms": number
}

Errors

ErrorHTTP StatusDescription
DetectorNotFoundException404Detector does not exist.

Example

Request:
curl -X GET "https://api.vijil.ai/v1/dome/detectors/prompt-injection-deberta-v3-base" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
info = vijil.detectors.get_detector_info("prompt-injection-deberta-v3-base")

Available Detectors

Security Detectors

Detector IDDescription
prompt-injection-mbertMultilingual BERT-based injection detection
prompt-injection-deberta-v3-baseDeBERTa-based injection detection (recommended)
encoding-heuristicsBase64, Unicode, and encoding attack detection
security-embeddingsSemantic similarity to known attack patterns

Moderation Detectors

Detector IDDescription
moderation-flashtextFast keyword-based toxicity detection
moderation-debertaNeural toxicity classification
moderations-oai-apiOpenAI Moderation API
moderation-llamaguardLlama Guard safety model

Privacy Detectors

Detector IDDescription
privacy-presidioPII detection (names, emails, SSN, etc.)
detect-secretsAPI keys, passwords, credentials

Loading Configuration in Dome SDK

Pull configuration from the API when initializing the Dome SDK locally:
from vijil_dome import Dome
import os

dome = Dome.create_from_vijil_agent(
    agent_id="agent-abc123",
    api_key=os.environ["VIJIL_API_KEY"]
)

# Use the guardrails
input_result = dome.guard_input(user_message)
output_result = dome.guard_output(agent_response)

See Also

Last modified on March 19, 2026