# Guardrails
URL: https://docs.datarobot.com/en/docs/api/reference/public-api/guardrails.html

> Use the endpoints described below to manage guardrails. Model guardrails are a set of rules or machine learning models that ensure the output of a language model is safe, accurate, and ethical.

# Guardrails

Use the endpoints described below to manage guardrails. Model guardrails are a set of rules or machine learning models that ensure the output of a language model is safe, accurate, and ethical.

## The list of resource tags

Operation path: `GET /api/v2/guardConfigurations/`

Authentication requirements: `BearerAuth`

The list of resource tags.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| offset | query | integer | false | This many results will be skipped. |
| limit | query | integer | false | At most this many results are returned. |
| entityId | query | string | true | Filter guard configurations by the given entity ID. |
| entityType | query | string | true | The entity type of the given entity ID. |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| entityType | [customModel, customModelVersion, playground] |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of guard configurations.",
      "items": {
        "properties": {
          "additionalGuardConfig": {
            "description": "Additional configuration for the guard.",
            "properties": {
              "agentGuideline": {
                "description": "How to calculate agent guideline adherence for this guard.",
                "maxLength": 4096,
                "type": [
                  "string",
                  "null"
                ],
                "x-versionadded": "v2.42"
              },
              "cost": {
                "description": "How to calculate cost information for this guard.",
                "properties": {
                  "currency": {
                    "description": "ISO 4217 Currency code for display.",
                    "maxLength": 255,
                    "type": "string"
                  },
                  "inputPrice": {
                    "description": "Cost per unit measure of tokens for input.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "inputUnit": {
                    "description": "Number of tokens related to input price.",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "outputPrice": {
                    "description": "Cost per unit measure of tokens for output.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "outputUnit": {
                    "description": "Number of tokens related to output price.",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "currency",
                  "inputPrice",
                  "inputUnit",
                  "outputPrice",
                  "outputUnit"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              },
              "toolCall": {
                "description": "How to calculate tool call metrics for this guard.",
                "properties": {
                  "comparisonMetric": {
                    "description": "How tool calls should be compared for metrics calculations.",
                    "enum": [
                      "exactMatch",
                      "doNotCompare"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "comparisonMetric"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              }
            },
            "type": "object",
            "x-versionadded": "v2.37"
          },
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "awsAccount": {
            "description": "The ID of the user credential containing an AWS account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "createdAt": {
            "description": "When the configuration was created.",
            "format": "date-time",
            "type": "string"
          },
          "creatorId": {
            "description": "The ID of the user who created the guard configuration.",
            "type": [
              "string",
              "null"
            ]
          },
          "creatorName": {
            "description": "The name of the user who created the guard configuration.",
            "maxLength": 1000,
            "type": "string"
          },
          "deploymentId": {
            "description": "The ID of the deployed model for model guards.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "The guard configuration description.",
            "maxLength": 4096,
            "type": "string"
          },
          "entityId": {
            "description": "The ID of the custom model or playground for this guard.",
            "type": [
              "string",
              "null"
            ]
          },
          "entityType": {
            "description": "The type of the associated entity.",
            "enum": [
              "customModel",
              "customModelVersion",
              "playground"
            ],
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleServiceAccount": {
            "description": "The ID of the user credential containing a Google service account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "id": {
            "description": "The guard configuration object ID.",
            "type": "string"
          },
          "intervention": {
            "description": "Intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "message": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "default": false,
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "message"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": false,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "description": "Whether the guard is valid or not.",
            "type": "boolean"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "The guard configuration name.",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "Guard configuration \"NeMo Evaluator\" metric type",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "description": "The NeMo guardrails actions file.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "Guard template \"Out of the Box\" metric type",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiCredential": {
            "description": "The ID of the user credential containing an OpenAI token.",
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAPI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "stages": {
            "description": "The stages where the guard is configured to run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "type": {
            "description": "The guard configuration type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "description",
          "entityId",
          "entityType",
          "id",
          "name",
          "stages",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardConfigurationListResponse |
| 400 | Bad Request | Request invalid, refer to messages for detail. | None |
| 404 | Not Found | User permissions problem. | None |

## Create a guard configuration

Operation path: `POST /api/v2/guardConfigurations/`

Authentication requirements: `BearerAuth`

Create a guard configuration.

### Body parameter

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Guard configuration description",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "Guard configuration name",
      "maxLength": 255,
      "type": "string"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard can run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "templateId": {
      "description": "The ID of the template this guard is based on.",
      "type": "string"
    }
  },
  "required": [
    "entityId",
    "entityType",
    "name",
    "stages",
    "templateId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | GuardConfigurationCreate | false | none |

### Example responses

> 201 Response

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the configuration was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard configuration.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard configuration.",
      "maxLength": 1000,
      "type": "string"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "The guard configuration description.",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": [
        "string",
        "null"
      ]
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard configuration object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": false,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "description": "Whether the guard is valid or not.",
      "type": "boolean"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard configuration name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "Guard configuration \"NeMo Evaluator\" metric type",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "Guard template \"Out of the Box\" metric type",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard is configured to run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "type": {
      "description": "The guard configuration type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "description",
    "entityId",
    "entityType",
    "id",
    "name",
    "stages",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | Created | none | GuardConfigurationRetrieveResponse |
| 404 | Not Found | Either the resource does not exist or the user does not have permission to create the configuration. | None |
| 409 | Conflict | The proposed configuration name is already in use for the same entity. | None |

## Show the prediction environments in use

Operation path: `GET /api/v2/guardConfigurations/predictionEnvironmentsInUse/`

Authentication requirements: `BearerAuth`

Show the prediction environments in use for moderation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| offset | query | integer | false | This many results will be skipped. |
| limit | query | integer | false | At most this many results are returned. |
| customModelVersionId | query | string | true | Show prediction environment information for this custom model version. |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "list of prediction environments in use for this custom model version.",
      "items": {
        "properties": {
          "id": {
            "description": "ID of prediction environment.",
            "type": "string"
          },
          "name": {
            "description": "Name of prediction environment.",
            "type": "string"
          },
          "usedBy": {
            "description": "Guards using this prediction environment.",
            "items": {
              "properties": {
                "configurationId": {
                  "description": "ID of guard configuration.",
                  "type": "string"
                },
                "deploymentId": {
                  "description": "ID of guard model deployment.",
                  "type": "string"
                },
                "name": {
                  "description": "Name of guard configuration.",
                  "type": "string"
                }
              },
              "required": [
                "configurationId",
                "deploymentId",
                "name"
              ],
              "type": "object",
              "x-versionadded": "v2.35"
            },
            "maxItems": 32,
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "usedBy"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 32,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardConfigurationPredictionEnvironmentsInUseListResponse |
| 404 | Not Found | Either the resource does not exist or the user does not have permission to view the configuration. | None |

## Apply moderation configuration

Operation path: `POST /api/v2/guardConfigurations/toNewCustomModelVersion/`

Authentication requirements: `BearerAuth`

Apply moderation configuration to a new custom model version.

### Body parameter

```
{
  "properties": {
    "customModelId": {
      "description": "The ID of the custom model the user is working with.",
      "type": "string"
    },
    "data": {
      "description": "The list of complete guard configurations to push.",
      "items": {
        "description": "Complete guard configuration to push",
        "properties": {
          "additionalGuardConfig": {
            "description": "Additional configuration for the guard.",
            "properties": {
              "agentGuideline": {
                "description": "How to calculate agent guideline adherence for this guard.",
                "maxLength": 4096,
                "type": [
                  "string",
                  "null"
                ],
                "x-versionadded": "v2.42"
              },
              "cost": {
                "description": "How to calculate cost information for this guard.",
                "properties": {
                  "currency": {
                    "description": "ISO 4217 Currency code for display.",
                    "maxLength": 255,
                    "type": "string"
                  },
                  "inputPrice": {
                    "description": "Cost per unit measure of tokens for input.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "inputUnit": {
                    "description": "Number of tokens related to input price.",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "outputPrice": {
                    "description": "Cost per unit measure of tokens for output.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "outputUnit": {
                    "description": "Number of tokens related to output price.",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "currency",
                  "inputPrice",
                  "inputUnit",
                  "outputPrice",
                  "outputUnit"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              },
              "toolCall": {
                "description": "How to calculate tool call metrics for this guard.",
                "properties": {
                  "comparisonMetric": {
                    "description": "How tool calls should be compared for metrics calculations.",
                    "enum": [
                      "exactMatch",
                      "doNotCompare"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "comparisonMetric"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              }
            },
            "type": "object",
            "x-versionadded": "v2.37"
          },
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "awsAccount": {
            "description": "The ID of the user credential containing an AWS account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "deploymentId": {
            "description": "The ID of the deployed model for model guards.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Guard configuration description",
            "maxLength": 4096,
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleServiceAccount": {
            "description": "The ID of the user credential containing a Google service account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "intervention": {
            "description": "Intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "message": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "default": false,
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "message"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": false,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "description": "Whether the guard is valid or not.",
            "type": "boolean"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "Guard configuration name",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "Guard configuration \"NeMo Evaluator\" metric type",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "description": "The NeMo guardrails actions file.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "Guard template \"Out of the Box\" metric type",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiCredential": {
            "description": "The ID of the user credential containing an OpenAI token.",
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "parameters": {
            "description": "Parameter list, not used, deprecated.",
            "items": {
              "maxLength": 1,
              "type": "string"
            },
            "maxItems": 1,
            "type": "array"
          },
          "stages": {
            "description": "The stages where the guard is configured to run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "type": {
            "description": "The guard configuration type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "description",
          "name",
          "stages",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "overallConfig": {
      "description": "Overall moderation configuration to push (not specific to one guard)",
      "properties": {
        "nemoEvaluatorDeploymentId": {
          "description": "ID of NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "timeoutAction": {
          "description": "Action to take if timeout occurs",
          "enum": [
            "block",
            "score"
          ],
          "type": "string"
        },
        "timeoutSec": {
          "description": "Timeout value in seconds for any guard",
          "minimum": 2,
          "type": "integer"
        }
      },
      "required": [
        "timeoutAction",
        "timeoutSec"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    }
  },
  "required": [
    "customModelId",
    "data"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | GuardConfigurationToCustomModelVersion | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "customModelVersionId": {
      "description": "The ID of the new custom model version created.",
      "type": "string"
    }
  },
  "required": [
    "customModelVersionId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardConfigurationToCustomModelResponse |
| 404 | Not Found | Either the resource does not exist or the user does not have permission to create the configuration. | None |
| 409 | Conflict | The destination custom model version is frozen. Create a new version to save configuration. | None |

## Delete a guard config by config ID

Operation path: `DELETE /api/v2/guardConfigurations/{configId}/`

Authentication requirements: `BearerAuth`

Delete a guard config.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| configId | path | string | true | The ID of the configuration. |

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 204 | No Content | none | None |
| 404 | Not Found | Either the config does not exist or the user does not have permission to delete it. | None |

## Retrieve info about a guard configuration by config ID

Operation path: `GET /api/v2/guardConfigurations/{configId}/`

Authentication requirements: `BearerAuth`

Retrieve info about a guard configuration.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| configId | path | string | true | The ID of the configuration. |

### Example responses

> 200 Response

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the configuration was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard configuration.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard configuration.",
      "maxLength": 1000,
      "type": "string"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "The guard configuration description.",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": [
        "string",
        "null"
      ]
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard configuration object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": false,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "description": "Whether the guard is valid or not.",
      "type": "boolean"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard configuration name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "Guard configuration \"NeMo Evaluator\" metric type",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "Guard template \"Out of the Box\" metric type",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard is configured to run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "type": {
      "description": "The guard configuration type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "description",
    "entityId",
    "entityType",
    "id",
    "name",
    "stages",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardConfigurationRetrieveResponse |
| 404 | Not Found | Either the config does not exist or the user does not have permission to view it. | None |

## Update a guard config by config ID

Operation path: `PATCH /api/v2/guardConfigurations/{configId}/`

Authentication requirements: `BearerAuth`

Update a guard config.

### Body parameter

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Guard configuration description",
      "maxLength": 4096,
      "type": "string"
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "Guard configuration name",
      "maxLength": 255,
      "type": "string"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| configId | path | string | true | The ID of the configuration. |
| body | body | GuardConfigurationUpdate | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the configuration was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard configuration.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard configuration.",
      "maxLength": 1000,
      "type": "string"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "The guard configuration description.",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": [
        "string",
        "null"
      ]
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard configuration object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": false,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "description": "Whether the guard is valid or not.",
      "type": "boolean"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard configuration name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "Guard configuration \"NeMo Evaluator\" metric type",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "Guard template \"Out of the Box\" metric type",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard is configured to run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "type": {
      "description": "The guard configuration type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "description",
    "entityId",
    "entityType",
    "id",
    "name",
    "stages",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardConfigurationRetrieveResponse |
| 404 | Not Found | Either the resource does not exist or the user does not have permission to create the configuration. | None |
| 409 | Conflict | The proposed configuration name is already in use for the same entity. | None |

## List guard templates

Operation path: `GET /api/v2/guardTemplates/`

Authentication requirements: `BearerAuth`

List guard templates.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| offset | query | integer | false | This many results will be skipped. |
| limit | query | integer | false | At most this many results are returned. |
| includeAgentic | query | string | false | Include agentic and non-agentic templates in results (by default, agentic templates are not included). |
| isAgentic | query | string | false | Limit results to agentic templates. If true, this overrides either includeAgentic setting. |
| forPlayground | query | string | false | Filter for templates suitable for playground (exclude production-only templates). |
| forProduction | query | string | false | Filter for templates suitable for production (exclude playground-only templates). |
| name | query | string,null | false | Search for templates by name. |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| includeAgentic | [false, False, true, True] |
| isAgentic | [false, False, true, True] |
| forPlayground | [false, False, true, True] |
| forProduction | [false, False, true, True] |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of guard templates.",
      "items": {
        "properties": {
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "allowedStages": {
            "description": "The stages where the guard can run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "createdAt": {
            "description": "When the template was created.",
            "format": "date-time",
            "type": "string"
          },
          "creatorId": {
            "description": "The ID of the user who created the guard template.",
            "type": [
              "string",
              "null"
            ]
          },
          "creatorName": {
            "description": "The name of the user who created the guard template.",
            "maxLength": 1000,
            "type": "string"
          },
          "description": {
            "description": "The guard template description.",
            "maxLength": 4096,
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "id": {
            "description": "The guard template object ID.",
            "type": "string"
          },
          "intervention": {
            "description": "The intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "description": "The class name to match.",
                            "maxLength": 128,
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "modifyMessage": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "modifyMessage"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": true,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "default": true,
            "description": "True if the guard is fully configured and valid.",
            "type": "boolean"
          },
          "labels": {
            "description": "The list of short strings to associate with the template.",
            "items": {
              "description": "A short string to associate with the template.",
              "maxLength": 255,
              "type": "string"
            },
            "maxItems": 16,
            "type": "array",
            "x-versionadded": "v2.37"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "The guard template name.",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "The guard template \"NeMo Evaluator\" metric type.",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.41"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "default": "",
                "description": "The NeMo guardrails actions.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "default": "",
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "The guard template \"Out of the Box\" metric type.",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAPI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "orgId": {
            "description": "Organization ID of the user who created the Guard template.",
            "type": [
              "string",
              "null"
            ]
          },
          "playgroundOnly": {
            "description": "Whether the guard is for playground only, or if it can be used in production and playground.",
            "type": [
              "boolean",
              "null"
            ],
            "x-versionadded": "v2.37"
          },
          "productionOnly": {
            "description": "Whether the guard is for production only, or if it can be used in production and playground.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "type": {
            "description": "The guard template type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "allowedStages",
          "createdAt",
          "description",
          "id",
          "name",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardTemplateListResponse |
| 400 | Bad Request | Request invalid, refer to messages for detail. | None |
| 404 | Not Found | Missing feature flag. | None |

## Retrieve information about a guard template by template ID

Operation path: `GET /api/v2/guardTemplates/{templateId}/`

Authentication requirements: `BearerAuth`

Retrieve information about a guard template.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| templateId | path | string | true | The ID of the template. |

### Example responses

> 200 Response

```
{
  "properties": {
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "allowedStages": {
      "description": "The stages where the guard can run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the template was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard template.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard template.",
      "maxLength": 1000,
      "type": "string"
    },
    "description": {
      "description": "The guard template description.",
      "maxLength": 4096,
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard template object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "The intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "description": "The class name to match.",
                      "maxLength": 128,
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "modifyMessage": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "modifyMessage"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": true,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "default": true,
      "description": "True if the guard is fully configured and valid.",
      "type": "boolean"
    },
    "labels": {
      "description": "The list of short strings to associate with the template.",
      "items": {
        "description": "A short string to associate with the template.",
        "maxLength": 255,
        "type": "string"
      },
      "maxItems": 16,
      "type": "array",
      "x-versionadded": "v2.37"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard template name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "The guard template \"NeMo Evaluator\" metric type.",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.41"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "default": "",
          "description": "The NeMo guardrails actions.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID.",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "default": "",
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "The guard template \"Out of the Box\" metric type.",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "orgId": {
      "description": "Organization ID of the user who created the Guard template.",
      "type": [
        "string",
        "null"
      ]
    },
    "playgroundOnly": {
      "description": "Whether the guard is for playground only, or if it can be used in production and playground.",
      "type": [
        "boolean",
        "null"
      ],
      "x-versionadded": "v2.37"
    },
    "productionOnly": {
      "description": "Whether the guard is for production only, or if it can be used in production and playground.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "type": {
      "description": "The guard template type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "allowedStages",
    "createdAt",
    "description",
    "id",
    "name",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | GuardTemplateRetrieveResponse |
| 404 | Not Found | Either the template does not exist or the required feature flag is missing. | None |

## The list of supported LLMs

Operation path: `GET /api/v2/moderationSupportedLlms/`

Authentication requirements: `BearerAuth`

The list of supported LLMs for moderation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| offset | query | integer | false | This many results will be skipped. |
| limit | query | integer | false | At most this many results are returned. |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of supported LLMs for moderation.",
      "items": {
        "properties": {
          "description": {
            "description": "The description of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "id": {
            "description": "The ID for this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "llmType": {
            "description": "The general category of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "model": {
            "description": "The specific model of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "name": {
            "description": "The display name of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "provider": {
            "description": "The provider of access to this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "vendor": {
            "description": "The vendor of this LLM.",
            "maxLength": 1024,
            "type": "string"
          }
        },
        "required": [
          "description",
          "id",
          "llmType",
          "model",
          "name",
          "provider",
          "vendor"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | SupportedLlmListResponse |
| 400 | Bad Request | Request invalid, refer to messages for detail. | None |
| 404 | Not Found | Missing feature flag. | None |

## Get the overall moderation configuration

Operation path: `GET /api/v2/overallModerationConfiguration/`

Authentication requirements: `BearerAuth`

Get the overall moderation configuration for an entity.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| entityId | query | string | true | Retrieve the overall moderation configuration for the given entity ID. |
| entityType | query | string | true | The entity type of the given entity ID. |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| entityType | [customModel, customModelVersion, playground] |

### Example responses

> 200 Response

```
{
  "properties": {
    "entityId": {
      "description": "The ID of the custom model or playground for this configuration.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "nemoEvaluatorDeploymentId": {
      "description": "The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "The action to take if timeout occurs.",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "The timeout value in seconds for any guard.",
      "minimum": 2,
      "type": "integer"
    },
    "updatedAt": {
      "description": "When the configuration was updated.",
      "format": "date-time",
      "type": "string"
    },
    "updaterId": {
      "description": "The ID of the user who updated the configuration.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "entityId",
    "entityType",
    "timeoutAction",
    "timeoutSec",
    "updaterId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | OverallModerationConfigurationResponse |
| 404 | Not Found | User permissions problem. | None |

## Update the overall moderation configuration

Operation path: `PATCH /api/v2/overallModerationConfiguration/`

Authentication requirements: `BearerAuth`

Update the overall moderation configuration for an entity.

### Body parameter

```
{
  "properties": {
    "entityId": {
      "description": "The ID of the custom model or playground for this configuration.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "nemoEvaluatorDeploymentId": {
      "description": "The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "The action to take if timeout occurs.",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "The timeout value in seconds for any guard.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "entityId",
    "entityType",
    "timeoutAction",
    "timeoutSec"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| entityId | path | string | true | Retrieve the overall moderation configuration for the given entity ID. |
| entityType | path | string | true | The entity type of the given entity ID. |
| body | body | OverallModerationConfigurationUpdate | false | none |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| entityType | [customModel, customModelVersion, playground] |

### Example responses

> 200 Response

```
{
  "properties": {
    "entityId": {
      "description": "The ID of the custom model or playground for this configuration.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "nemoEvaluatorDeploymentId": {
      "description": "The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "The action to take if timeout occurs.",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "The timeout value in seconds for any guard.",
      "minimum": 2,
      "type": "integer"
    },
    "updatedAt": {
      "description": "When the configuration was updated.",
      "format": "date-time",
      "type": "string"
    },
    "updaterId": {
      "description": "The ID of the user who updated the configuration.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "entityId",
    "entityType",
    "timeoutAction",
    "timeoutSec",
    "updaterId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | none | OverallModerationConfigurationResponse |
| 404 | Not Found | Either the resource does not exist or the user does not have permission to create the configuration. | None |

# Schemas

## DeploymentAndGuardResponse

```
{
  "properties": {
    "configurationId": {
      "description": "ID of guard configuration.",
      "type": "string"
    },
    "deploymentId": {
      "description": "ID of guard model deployment.",
      "type": "string"
    },
    "name": {
      "description": "Name of guard configuration.",
      "type": "string"
    }
  },
  "required": [
    "configurationId",
    "deploymentId",
    "name"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| configurationId | string | true |  | ID of guard configuration. |
| deploymentId | string | true |  | ID of guard model deployment. |
| name | string | true |  | Name of guard configuration. |

## GuardAdditionalConfig

```
{
  "description": "Additional configuration for the guard.",
  "properties": {
    "agentGuideline": {
      "description": "How to calculate agent guideline adherence for this guard.",
      "maxLength": 4096,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "cost": {
      "description": "How to calculate cost information for this guard.",
      "properties": {
        "currency": {
          "description": "ISO 4217 Currency code for display.",
          "maxLength": 255,
          "type": "string"
        },
        "inputPrice": {
          "description": "Cost per unit measure of tokens for input.",
          "minimum": 0,
          "type": "number"
        },
        "inputUnit": {
          "description": "Number of tokens related to input price.",
          "minimum": 0,
          "type": "integer"
        },
        "outputPrice": {
          "description": "Cost per unit measure of tokens for output.",
          "minimum": 0,
          "type": "number"
        },
        "outputUnit": {
          "description": "Number of tokens related to output price.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "currency",
        "inputPrice",
        "inputUnit",
        "outputPrice",
        "outputUnit"
      ],
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "toolCall": {
      "description": "How to calculate tool call metrics for this guard.",
      "properties": {
        "comparisonMetric": {
          "description": "How tool calls should be compared for metrics calculations.",
          "enum": [
            "exactMatch",
            "doNotCompare"
          ],
          "type": "string"
        }
      },
      "required": [
        "comparisonMetric"
      ],
      "type": "object",
      "x-versionadded": "v2.37"
    }
  },
  "type": "object",
  "x-versionadded": "v2.37"
}
```

Additional configuration for the guard.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| agentGuideline | string,null | false | maxLength: 4096 | How to calculate agent guideline adherence for this guard. |
| cost | GuardConfigurationCostInfo | false |  | How to calculate cost information for this guard. |
| toolCall | GuardToolCallInfo | false |  | How to calculate tool call metrics for this guard. |

## GuardConditionResponse

```
{
  "description": "The condition to trigger intervention.",
  "properties": {
    "comparand": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "items": {
            "description": "The class name to match.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        }
      ],
      "description": "The condition comparand (basis of comparison)."
    },
    "comparator": {
      "description": "The condition comparator (operator).",
      "enum": [
        "greaterThan",
        "lessThan",
        "equals",
        "notEquals",
        "is",
        "isNot",
        "matches",
        "doesNotMatch",
        "contains",
        "doesNotContain"
      ],
      "type": "string"
    }
  },
  "required": [
    "comparand",
    "comparator"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The condition to trigger intervention.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| comparand | any | true |  | The condition comparand (basis of comparison). |

anyOf

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | boolean | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | number | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | string | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | [string] | false | maxItems: 10 | none |

continued

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| comparator | string | true |  | The condition comparator (operator). |

### Enumerated Values

| Property | Value |
| --- | --- |
| comparator | [greaterThan, lessThan, equals, notEquals, is, isNot, matches, doesNotMatch, contains, doesNotContain] |

## GuardConfigurationConditionResponse

```
{
  "description": "The condition to trigger intervention.",
  "properties": {
    "comparand": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        }
      ],
      "description": "The condition comparand (basis of comparison)."
    },
    "comparator": {
      "description": "The condition comparator (operator).",
      "enum": [
        "greaterThan",
        "lessThan",
        "equals",
        "notEquals",
        "is",
        "isNot",
        "matches",
        "doesNotMatch",
        "contains",
        "doesNotContain"
      ],
      "type": "string"
    }
  },
  "required": [
    "comparand",
    "comparator"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The condition to trigger intervention.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| comparand | any | true |  | The condition comparand (basis of comparison). |

anyOf

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | boolean | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | number | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | string | false |  | none |

or

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| » anonymous | [string] | false | maxItems: 10 | none |

continued

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| comparator | string | true |  | The condition comparator (operator). |

### Enumerated Values

| Property | Value |
| --- | --- |
| comparator | [greaterThan, lessThan, equals, notEquals, is, isNot, matches, doesNotMatch, contains, doesNotContain] |

## GuardConfigurationCostInfo

```
{
  "description": "How to calculate cost information for this guard.",
  "properties": {
    "currency": {
      "description": "ISO 4217 Currency code for display.",
      "maxLength": 255,
      "type": "string"
    },
    "inputPrice": {
      "description": "Cost per unit measure of tokens for input.",
      "minimum": 0,
      "type": "number"
    },
    "inputUnit": {
      "description": "Number of tokens related to input price.",
      "minimum": 0,
      "type": "integer"
    },
    "outputPrice": {
      "description": "Cost per unit measure of tokens for output.",
      "minimum": 0,
      "type": "number"
    },
    "outputUnit": {
      "description": "Number of tokens related to output price.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "currency",
    "inputPrice",
    "inputUnit",
    "outputPrice",
    "outputUnit"
  ],
  "type": "object",
  "x-versionadded": "v2.37"
}
```

How to calculate cost information for this guard.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| currency | string | true | maxLength: 255 | ISO 4217 Currency code for display. |
| inputPrice | number | true | minimum: 0 | Cost per unit measure of tokens for input. |
| inputUnit | integer | true | minimum: 0 | Number of tokens related to input price. |
| outputPrice | number | true | minimum: 0 | Cost per unit measure of tokens for output. |
| outputUnit | integer | true | minimum: 0 | Number of tokens related to output price. |

## GuardConfigurationCreate

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Guard configuration description",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "Guard configuration name",
      "maxLength": 255,
      "type": "string"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard can run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "templateId": {
      "description": "The ID of the template this guard is based on.",
      "type": "string"
    }
  },
  "required": [
    "entityId",
    "entityType",
    "name",
    "stages",
    "templateId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| additionalGuardConfig | GuardAdditionalConfig | false |  | Additional configuration for the guard. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| awsAccount | string,null | false |  | The ID of the user credential containing an AWS account. |
| awsModel | string,null | false |  | AWS model. |
| awsRegion | string,null | false | maxLength: 255 | AWS model region. |
| deploymentId | string,null | false |  | The ID of the deployed model for model guards. |
| description | string | false | maxLength: 4096 | Guard configuration description |
| entityId | string | true |  | The ID of the custom model or playground for this guard. |
| entityType | string | true |  | The type of the associated entity. |
| googleModel | string,null | false |  | Google model. |
| googleRegion | string,null | false | maxLength: 255 | Google model region. |
| googleServiceAccount | string,null | false |  | The ID of the user credential containing a Google service account. |
| intervention | GuardConfigurationInterventionResponse | false |  | Intervention configuration for the guard. |
| llmGatewayModelId | string,null | false | maxLength: 255 | The LLM Gateway model ID to use as judge. |
| llmType | string,null | false |  | The type of LLM used by this guard. |
| modelInfo | GuardConfigurationPayloadModelInfo | false |  | The configuration info for guards using deployed models. |
| name | string | true | maxLength: 255 | Guard configuration name |
| nemoInfo | GuardConfigurationNemoInfoResponse | false |  | The configuration info for NeMo guards. |
| nemoLlmJudgeConfig | GuardNemoLlmJudgeConfigResponse | false |  | The configuration for the LLM Judge metric. |
| nemoResponseRelevancyConfig | GuardNemoResponseRelevancyConfigResponse | false |  | The configuration for the Response Relevancy metric. |
| nemoTopicAdherenceConfig | GuardNemoTopicAdherenceConfigResponse | false |  | The configuration for the Topic Adherence metric. |
| openaiApiBase | string,null | false | maxLength: 255 | The Azure OpenAI API Base URL. |
| openaiApiKey | string,null | false | maxLength: 255 | Deprecated; use openai_credential instead. |
| openaiCredential | string,null | false |  | The ID of the user credential containing an OpenAI token. |
| openaiDeploymentId | string,null | false | maxLength: 255 | The OpenAPI deployment ID. |
| stages | [string] | true | maxItems: 16 | The stages where the guard can run. |
| templateId | string | true |  | The ID of the template this guard is based on. |

### Enumerated Values

| Property | Value |
| --- | --- |
| awsModel | [amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus, anthropic-claude-3.5-sonnet-v1, anthropic-claude-3.5-sonnet-v2, amazon-nova-lite, amazon-nova-micro, amazon-nova-pro] |
| entityType | [customModel, customModelVersion, playground] |
| googleModel | [chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType | [openAi, azureOpenAi, google, amazon, datarobot, nim, llmGateway] |

## GuardConfigurationFullPost

```
{
  "description": "Complete guard configuration to push",
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Guard configuration description",
      "maxLength": 4096,
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": false,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "description": "Whether the guard is valid or not.",
      "type": "boolean"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "Guard configuration name",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "Guard configuration \"NeMo Evaluator\" metric type",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "Guard template \"Out of the Box\" metric type",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "parameters": {
      "description": "Parameter list, not used, deprecated.",
      "items": {
        "maxLength": 1,
        "type": "string"
      },
      "maxItems": 1,
      "type": "array"
    },
    "stages": {
      "description": "The stages where the guard is configured to run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "type": {
      "description": "The guard configuration type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "description",
    "name",
    "stages",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

Complete guard configuration to push

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| additionalGuardConfig | GuardAdditionalConfig | false |  | Additional configuration for the guard. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| awsAccount | string,null | false |  | The ID of the user credential containing an AWS account. |
| awsModel | string,null | false |  | AWS model. |
| awsRegion | string,null | false | maxLength: 255 | AWS model region. |
| deploymentId | string,null | false |  | The ID of the deployed model for model guards. |
| description | string | true | maxLength: 4096 | Guard configuration description |
| errorMessage | string,null | false |  | Error message if the guard configuration is invalid. |
| googleModel | string,null | false |  | Google model. |
| googleRegion | string,null | false | maxLength: 255 | Google model region. |
| googleServiceAccount | string,null | false |  | The ID of the user credential containing a Google service account. |
| intervention | GuardConfigurationInterventionResponse | false |  | Intervention configuration for the guard. |
| isAgentic | boolean | false |  | True if the guard is suitable for agentic workflows only. |
| isValid | boolean | false |  | Whether the guard is valid or not. |
| llmGatewayModelId | string,null | false | maxLength: 255 | The LLM Gateway model ID to use as judge. |
| llmType | string,null | false |  | The type of LLM used by this guard. |
| modelInfo | GuardModelInfoResponse | false |  | The configuration info for guards using deployed models. |
| name | string | true | maxLength: 255 | Guard configuration name |
| nemoEvaluatorType | string,null | false |  | Guard configuration "NeMo Evaluator" metric type |
| nemoInfo | GuardConfigurationNemoInfoResponse | false |  | The configuration info for NeMo guards. |
| nemoLlmJudgeConfig | GuardNemoLlmJudgeConfigResponse | false |  | The configuration for the LLM Judge metric. |
| nemoResponseRelevancyConfig | GuardNemoResponseRelevancyConfigResponse | false |  | The configuration for the Response Relevancy metric. |
| nemoTopicAdherenceConfig | GuardNemoTopicAdherenceConfigResponse | false |  | The configuration for the Topic Adherence metric. |
| ootbType | string,null | false |  | Guard template "Out of the Box" metric type |
| openaiApiBase | string,null | false | maxLength: 255 | The Azure OpenAI API Base URL. |
| openaiApiKey | string,null | false | maxLength: 255 | Deprecated; use openai_credential instead. |
| openaiCredential | string,null | false |  | The ID of the user credential containing an OpenAI token. |
| openaiDeploymentId | string,null | false | maxLength: 255 | The OpenAI deployment ID. |
| parameters | [string] | false | maxItems: 1 | Parameter list, not used, deprecated. |
| stages | [string] | true | maxItems: 16 | The stages where the guard is configured to run. |
| type | string | true |  | The guard configuration type. |

### Enumerated Values

| Property | Value |
| --- | --- |
| awsModel | [amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus, anthropic-claude-3.5-sonnet-v1, anthropic-claude-3.5-sonnet-v2, amazon-nova-lite, amazon-nova-micro, amazon-nova-pro] |
| googleModel | [chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType | [openAi, azureOpenAi, google, amazon, datarobot, nim, llmGateway] |
| nemoEvaluatorType | [llm_judge, context_relevance, response_groundedness, topic_adherence, agent_goal_accuracy, response_relevancy, faithfulness] |
| ootbType | [token_count, faithfulness, rouge_1, agent_goal_accuracy, agent_goal_accuracy_with_reference, cost, task_adherence, tool_call_accuracy, agent_guideline_adherence, agent_latency, agent_tokens, agent_cost, agentGoalAccuracy, agentGoalAccuracyWithReference, taskAdherence, toolCallAccuracy] |
| type | [guardModel, nemo, nemoEvaluator, ootb, pii, userModel] |

## GuardConfigurationInterventionResponse

```
{
  "description": "Intervention configuration for the guard.",
  "properties": {
    "action": {
      "description": "The action to take if conditions are met.",
      "enum": [
        "block",
        "report",
        "replace"
      ],
      "type": "string"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array"
    },
    "conditionLogic": {
      "default": "any",
      "description": "The action to take if conditions are met.",
      "enum": [
        "any"
      ],
      "type": "string"
    },
    "conditions": {
      "description": "The list of conditions to trigger intervention.",
      "items": {
        "description": "The condition to trigger intervention.",
        "properties": {
          "comparand": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              }
            ],
            "description": "The condition comparand (basis of comparison)."
          },
          "comparator": {
            "description": "The condition comparator (operator).",
            "enum": [
              "greaterThan",
              "lessThan",
              "equals",
              "notEquals",
              "is",
              "isNot",
              "matches",
              "doesNotMatch",
              "contains",
              "doesNotContain"
            ],
            "type": "string"
          }
        },
        "required": [
          "comparand",
          "comparator"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 1,
      "type": "array"
    },
    "message": {
      "description": "The message to use if the prompt or response is blocked.",
      "maxLength": 4096,
      "type": "string"
    },
    "sendNotification": {
      "default": false,
      "description": "The notification event to create if intervention is triggered.",
      "type": "boolean"
    }
  },
  "required": [
    "action",
    "conditions",
    "message"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

Intervention configuration for the guard.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| action | string | true |  | The action to take if conditions are met. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| conditionLogic | string | false |  | The action to take if conditions are met. |
| conditions | [GuardConfigurationConditionResponse] | true | maxItems: 1 | The list of conditions to trigger intervention. |
| message | string | true | maxLength: 4096 | The message to use if the prompt or response is blocked. |
| sendNotification | boolean | false |  | The notification event to create if intervention is triggered. |

### Enumerated Values

| Property | Value |
| --- | --- |
| action | [block, report, replace] |
| conditionLogic | any |

## GuardConfigurationListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of guard configurations.",
      "items": {
        "properties": {
          "additionalGuardConfig": {
            "description": "Additional configuration for the guard.",
            "properties": {
              "agentGuideline": {
                "description": "How to calculate agent guideline adherence for this guard.",
                "maxLength": 4096,
                "type": [
                  "string",
                  "null"
                ],
                "x-versionadded": "v2.42"
              },
              "cost": {
                "description": "How to calculate cost information for this guard.",
                "properties": {
                  "currency": {
                    "description": "ISO 4217 Currency code for display.",
                    "maxLength": 255,
                    "type": "string"
                  },
                  "inputPrice": {
                    "description": "Cost per unit measure of tokens for input.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "inputUnit": {
                    "description": "Number of tokens related to input price.",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "outputPrice": {
                    "description": "Cost per unit measure of tokens for output.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "outputUnit": {
                    "description": "Number of tokens related to output price.",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "currency",
                  "inputPrice",
                  "inputUnit",
                  "outputPrice",
                  "outputUnit"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              },
              "toolCall": {
                "description": "How to calculate tool call metrics for this guard.",
                "properties": {
                  "comparisonMetric": {
                    "description": "How tool calls should be compared for metrics calculations.",
                    "enum": [
                      "exactMatch",
                      "doNotCompare"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "comparisonMetric"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              }
            },
            "type": "object",
            "x-versionadded": "v2.37"
          },
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "awsAccount": {
            "description": "The ID of the user credential containing an AWS account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "createdAt": {
            "description": "When the configuration was created.",
            "format": "date-time",
            "type": "string"
          },
          "creatorId": {
            "description": "The ID of the user who created the guard configuration.",
            "type": [
              "string",
              "null"
            ]
          },
          "creatorName": {
            "description": "The name of the user who created the guard configuration.",
            "maxLength": 1000,
            "type": "string"
          },
          "deploymentId": {
            "description": "The ID of the deployed model for model guards.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "The guard configuration description.",
            "maxLength": 4096,
            "type": "string"
          },
          "entityId": {
            "description": "The ID of the custom model or playground for this guard.",
            "type": [
              "string",
              "null"
            ]
          },
          "entityType": {
            "description": "The type of the associated entity.",
            "enum": [
              "customModel",
              "customModelVersion",
              "playground"
            ],
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleServiceAccount": {
            "description": "The ID of the user credential containing a Google service account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "id": {
            "description": "The guard configuration object ID.",
            "type": "string"
          },
          "intervention": {
            "description": "Intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "message": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "default": false,
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "message"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": false,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "description": "Whether the guard is valid or not.",
            "type": "boolean"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "The guard configuration name.",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "Guard configuration \"NeMo Evaluator\" metric type",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "description": "The NeMo guardrails actions file.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "Guard template \"Out of the Box\" metric type",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiCredential": {
            "description": "The ID of the user credential containing an OpenAI token.",
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAPI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "stages": {
            "description": "The stages where the guard is configured to run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "type": {
            "description": "The guard configuration type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "description",
          "entityId",
          "entityType",
          "id",
          "name",
          "stages",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [GuardConfigurationRetrieveResponse] | true | maxItems: 200 | The list of guard configurations. |
| next | string,null(uri) | true |  | The URL of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The URL of the previous page (if null, there is no previous page). |
| totalCount | integer | true |  | The total number of items across all pages. |

## GuardConfigurationNemoInfoResponse

```
{
  "description": "The configuration info for NeMo guards.",
  "properties": {
    "actions": {
      "description": "The NeMo guardrails actions file.",
      "maxLength": 4096,
      "type": "string"
    },
    "blockedTerms": {
      "description": "The NeMo guardrails blocked terms list.",
      "maxLength": 4096,
      "type": "string"
    },
    "credentialId": {
      "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
      "type": [
        "string",
        "null"
      ]
    },
    "llmPrompts": {
      "description": "The NeMo guardrails prompts.",
      "maxLength": 4096,
      "type": "string"
    },
    "mainConfig": {
      "description": "The overall NeMo configuration YAML.",
      "maxLength": 4096,
      "type": "string"
    },
    "railsConfig": {
      "description": "The NeMo guardrails configuration Colang.",
      "maxLength": 4096,
      "type": "string"
    }
  },
  "required": [
    "blockedTerms",
    "mainConfig",
    "railsConfig"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The configuration info for NeMo guards.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| actions | string | false | maxLength: 4096 | The NeMo guardrails actions file. |
| blockedTerms | string | true | maxLength: 4096 | The NeMo guardrails blocked terms list. |
| credentialId | string,null | false |  | The NeMo guardrails credential ID (deprecated; use "openai_credential"). |
| llmPrompts | string | false | maxLength: 4096 | The NeMo guardrails prompts. |
| mainConfig | string | true | maxLength: 4096 | The overall NeMo configuration YAML. |
| railsConfig | string | true | maxLength: 4096 | The NeMo guardrails configuration Colang. |

## GuardConfigurationPayloadModelInfo

```
{
  "description": "The configuration info for guards using deployed models.",
  "properties": {
    "classNames": {
      "description": "The list of class names for multiclass models.",
      "items": {
        "description": "The class name.",
        "maxLength": 128,
        "type": "string"
      },
      "maxItems": 100,
      "type": "array"
    },
    "inputColumnName": {
      "description": "The input column name.",
      "maxLength": 255,
      "type": "string"
    },
    "modelId": {
      "description": "The ID of the registered model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "modelName": {
      "default": "",
      "description": "The ID of the registered model for .model guards.",
      "maxLength": 255,
      "type": "string"
    },
    "outputColumnName": {
      "description": "The output column name.",
      "maxLength": 255,
      "type": "string"
    },
    "replacementTextColumnName": {
      "default": "",
      "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
      "maxLength": 255,
      "type": "string"
    },
    "targetType": {
      "description": "The target type.",
      "enum": [
        "Binary",
        "Regression",
        "Multiclass",
        "TextGeneration"
      ],
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "inputColumnName",
    "outputColumnName"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The configuration info for guards using deployed models.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| classNames | [string] | false | maxItems: 100 | The list of class names for multiclass models. |
| inputColumnName | string | true | maxLength: 255 | The input column name. |
| modelId | string,null | false |  | The ID of the registered model for model guards. |
| modelName | string | false | maxLength: 255 | The ID of the registered model for .model guards. |
| outputColumnName | string | true | maxLength: 255 | The output column name. |
| replacementTextColumnName | string | false | maxLength: 255 | The name of the output column with replacement text. Required only if intervention.action is replace. |
| targetType | string,null | false |  | The target type. |

### Enumerated Values

| Property | Value |
| --- | --- |
| targetType | [Binary, Regression, Multiclass, TextGeneration] |

## GuardConfigurationPredictionEnvironmentsInUseListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "list of prediction environments in use for this custom model version.",
      "items": {
        "properties": {
          "id": {
            "description": "ID of prediction environment.",
            "type": "string"
          },
          "name": {
            "description": "Name of prediction environment.",
            "type": "string"
          },
          "usedBy": {
            "description": "Guards using this prediction environment.",
            "items": {
              "properties": {
                "configurationId": {
                  "description": "ID of guard configuration.",
                  "type": "string"
                },
                "deploymentId": {
                  "description": "ID of guard model deployment.",
                  "type": "string"
                },
                "name": {
                  "description": "Name of guard configuration.",
                  "type": "string"
                }
              },
              "required": [
                "configurationId",
                "deploymentId",
                "name"
              ],
              "type": "object",
              "x-versionadded": "v2.35"
            },
            "maxItems": 32,
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "usedBy"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 32,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [PredictionEnvironmentInUseResponse] | true | maxItems: 32 | list of prediction environments in use for this custom model version. |
| next | string,null(uri) | true |  | The URL of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The URL of the previous page (if null, there is no previous page). |
| totalCount | integer | true |  | The total number of items across all pages. |

## GuardConfigurationRetrieveResponse

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the configuration was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard configuration.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard configuration.",
      "maxLength": 1000,
      "type": "string"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "The guard configuration description.",
      "maxLength": 4096,
      "type": "string"
    },
    "entityId": {
      "description": "The ID of the custom model or playground for this guard.",
      "type": [
        "string",
        "null"
      ]
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard configuration object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": false,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "description": "Whether the guard is valid or not.",
      "type": "boolean"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard configuration name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "Guard configuration \"NeMo Evaluator\" metric type",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "Guard template \"Out of the Box\" metric type",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "stages": {
      "description": "The stages where the guard is configured to run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "type": {
      "description": "The guard configuration type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "description",
    "entityId",
    "entityType",
    "id",
    "name",
    "stages",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| additionalGuardConfig | GuardAdditionalConfig | false |  | Additional configuration for the guard. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| awsAccount | string,null | false |  | The ID of the user credential containing an AWS account. |
| awsModel | string,null | false |  | AWS model. |
| awsRegion | string,null | false | maxLength: 255 | AWS model region. |
| createdAt | string(date-time) | true |  | When the configuration was created. |
| creatorId | string,null | false |  | The ID of the user who created the guard configuration. |
| creatorName | string | false | maxLength: 1000 | The name of the user who created the guard configuration. |
| deploymentId | string,null | false |  | The ID of the deployed model for model guards. |
| description | string | true | maxLength: 4096 | The guard configuration description. |
| entityId | string,null | true |  | The ID of the custom model or playground for this guard. |
| entityType | string | true |  | The type of the associated entity. |
| errorMessage | string,null | false |  | Error message if the guard configuration is invalid. |
| googleModel | string,null | false |  | Google model. |
| googleRegion | string,null | false | maxLength: 255 | Google model region. |
| googleServiceAccount | string,null | false |  | The ID of the user credential containing a Google service account. |
| id | string | true |  | The guard configuration object ID. |
| intervention | GuardConfigurationInterventionResponse | false |  | Intervention configuration for the guard. |
| isAgentic | boolean | false |  | True if the guard is suitable for agentic workflows only. |
| isValid | boolean | false |  | Whether the guard is valid or not. |
| llmGatewayModelId | string,null | false | maxLength: 255 | The LLM Gateway model ID to use as judge. |
| llmType | string,null | false |  | The type of LLM used by this guard. |
| modelInfo | GuardModelInfoResponse | false |  | The configuration info for guards using deployed models. |
| name | string | true | maxLength: 255 | The guard configuration name. |
| nemoEvaluatorType | string,null | false |  | Guard configuration "NeMo Evaluator" metric type |
| nemoInfo | GuardConfigurationNemoInfoResponse | false |  | The configuration info for NeMo guards. |
| nemoLlmJudgeConfig | GuardNemoLlmJudgeConfigResponse | false |  | The configuration for the LLM Judge metric. |
| nemoResponseRelevancyConfig | GuardNemoResponseRelevancyConfigResponse | false |  | The configuration for the Response Relevancy metric. |
| nemoTopicAdherenceConfig | GuardNemoTopicAdherenceConfigResponse | false |  | The configuration for the Topic Adherence metric. |
| ootbType | string,null | false |  | Guard template "Out of the Box" metric type |
| openaiApiBase | string,null | false | maxLength: 255 | The Azure OpenAI API Base URL. |
| openaiApiKey | string,null | false | maxLength: 255 | Deprecated; use openai_credential instead. |
| openaiCredential | string,null | false |  | The ID of the user credential containing an OpenAI token. |
| openaiDeploymentId | string,null | false | maxLength: 255 | The OpenAPI deployment ID. |
| stages | [string] | true | maxItems: 16 | The stages where the guard is configured to run. |
| type | string | true |  | The guard configuration type. |

### Enumerated Values

| Property | Value |
| --- | --- |
| awsModel | [amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus, anthropic-claude-3.5-sonnet-v1, anthropic-claude-3.5-sonnet-v2, amazon-nova-lite, amazon-nova-micro, amazon-nova-pro] |
| entityType | [customModel, customModelVersion, playground] |
| googleModel | [chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType | [openAi, azureOpenAi, google, amazon, datarobot, nim, llmGateway] |
| nemoEvaluatorType | [llm_judge, context_relevance, response_groundedness, topic_adherence, agent_goal_accuracy, response_relevancy, faithfulness] |
| ootbType | [token_count, faithfulness, rouge_1, agent_goal_accuracy, agent_goal_accuracy_with_reference, cost, task_adherence, tool_call_accuracy, agent_guideline_adherence, agent_latency, agent_tokens, agent_cost, agentGoalAccuracy, agentGoalAccuracyWithReference, taskAdherence, toolCallAccuracy] |
| type | [guardModel, nemo, nemoEvaluator, ootb, pii, userModel] |

## GuardConfigurationToCustomModelResponse

```
{
  "properties": {
    "customModelVersionId": {
      "description": "The ID of the new custom model version created.",
      "type": "string"
    }
  },
  "required": [
    "customModelVersionId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| customModelVersionId | string | true |  | The ID of the new custom model version created. |

## GuardConfigurationToCustomModelVersion

```
{
  "properties": {
    "customModelId": {
      "description": "The ID of the custom model the user is working with.",
      "type": "string"
    },
    "data": {
      "description": "The list of complete guard configurations to push.",
      "items": {
        "description": "Complete guard configuration to push",
        "properties": {
          "additionalGuardConfig": {
            "description": "Additional configuration for the guard.",
            "properties": {
              "agentGuideline": {
                "description": "How to calculate agent guideline adherence for this guard.",
                "maxLength": 4096,
                "type": [
                  "string",
                  "null"
                ],
                "x-versionadded": "v2.42"
              },
              "cost": {
                "description": "How to calculate cost information for this guard.",
                "properties": {
                  "currency": {
                    "description": "ISO 4217 Currency code for display.",
                    "maxLength": 255,
                    "type": "string"
                  },
                  "inputPrice": {
                    "description": "Cost per unit measure of tokens for input.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "inputUnit": {
                    "description": "Number of tokens related to input price.",
                    "minimum": 0,
                    "type": "integer"
                  },
                  "outputPrice": {
                    "description": "Cost per unit measure of tokens for output.",
                    "minimum": 0,
                    "type": "number"
                  },
                  "outputUnit": {
                    "description": "Number of tokens related to output price.",
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "currency",
                  "inputPrice",
                  "inputUnit",
                  "outputPrice",
                  "outputUnit"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              },
              "toolCall": {
                "description": "How to calculate tool call metrics for this guard.",
                "properties": {
                  "comparisonMetric": {
                    "description": "How tool calls should be compared for metrics calculations.",
                    "enum": [
                      "exactMatch",
                      "doNotCompare"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "comparisonMetric"
                ],
                "type": "object",
                "x-versionadded": "v2.37"
              }
            },
            "type": "object",
            "x-versionadded": "v2.37"
          },
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "awsAccount": {
            "description": "The ID of the user credential containing an AWS account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "deploymentId": {
            "description": "The ID of the deployed model for model guards.",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "description": "Guard configuration description",
            "maxLength": 4096,
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleServiceAccount": {
            "description": "The ID of the user credential containing a Google service account.",
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "intervention": {
            "description": "Intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "message": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "default": false,
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "message"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": false,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "description": "Whether the guard is valid or not.",
            "type": "boolean"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "Guard configuration name",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "Guard configuration \"NeMo Evaluator\" metric type",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "description": "The NeMo guardrails actions file.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "Guard template \"Out of the Box\" metric type",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiCredential": {
            "description": "The ID of the user credential containing an OpenAI token.",
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "parameters": {
            "description": "Parameter list, not used, deprecated.",
            "items": {
              "maxLength": 1,
              "type": "string"
            },
            "maxItems": 1,
            "type": "array"
          },
          "stages": {
            "description": "The stages where the guard is configured to run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "type": {
            "description": "The guard configuration type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "description",
          "name",
          "stages",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "overallConfig": {
      "description": "Overall moderation configuration to push (not specific to one guard)",
      "properties": {
        "nemoEvaluatorDeploymentId": {
          "description": "ID of NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "timeoutAction": {
          "description": "Action to take if timeout occurs",
          "enum": [
            "block",
            "score"
          ],
          "type": "string"
        },
        "timeoutSec": {
          "description": "Timeout value in seconds for any guard",
          "minimum": 2,
          "type": "integer"
        }
      },
      "required": [
        "timeoutAction",
        "timeoutSec"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    }
  },
  "required": [
    "customModelId",
    "data"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| customModelId | string | true |  | The ID of the custom model the user is working with. |
| data | [GuardConfigurationFullPost] | true | maxItems: 200 | The list of complete guard configurations to push. |
| overallConfig | OverallConfigUpdate | false |  | Overall moderation configuration to push (not specific to one guard) |

## GuardConfigurationUpdate

```
{
  "properties": {
    "additionalGuardConfig": {
      "description": "Additional configuration for the guard.",
      "properties": {
        "agentGuideline": {
          "description": "How to calculate agent guideline adherence for this guard.",
          "maxLength": 4096,
          "type": [
            "string",
            "null"
          ],
          "x-versionadded": "v2.42"
        },
        "cost": {
          "description": "How to calculate cost information for this guard.",
          "properties": {
            "currency": {
              "description": "ISO 4217 Currency code for display.",
              "maxLength": 255,
              "type": "string"
            },
            "inputPrice": {
              "description": "Cost per unit measure of tokens for input.",
              "minimum": 0,
              "type": "number"
            },
            "inputUnit": {
              "description": "Number of tokens related to input price.",
              "minimum": 0,
              "type": "integer"
            },
            "outputPrice": {
              "description": "Cost per unit measure of tokens for output.",
              "minimum": 0,
              "type": "number"
            },
            "outputUnit": {
              "description": "Number of tokens related to output price.",
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "currency",
            "inputPrice",
            "inputUnit",
            "outputPrice",
            "outputUnit"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        },
        "toolCall": {
          "description": "How to calculate tool call metrics for this guard.",
          "properties": {
            "comparisonMetric": {
              "description": "How tool calls should be compared for metrics calculations.",
              "enum": [
                "exactMatch",
                "doNotCompare"
              ],
              "type": "string"
            }
          },
          "required": [
            "comparisonMetric"
          ],
          "type": "object",
          "x-versionadded": "v2.37"
        }
      },
      "type": "object",
      "x-versionadded": "v2.37"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "awsAccount": {
      "description": "The ID of the user credential containing an AWS account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "deploymentId": {
      "description": "The ID of the deployed model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "description": "Guard configuration description",
      "maxLength": 4096,
      "type": "string"
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleServiceAccount": {
      "description": "The ID of the user credential containing a Google service account.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "intervention": {
      "description": "Intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "message": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "default": false,
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "message"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "Guard configuration name",
      "maxLength": 255,
      "type": "string"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "description": "The NeMo guardrails actions file.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID (deprecated; use \"openai_credential\").",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiCredential": {
      "description": "The ID of the user credential containing an OpenAI token.",
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    }
  },
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| additionalGuardConfig | GuardAdditionalConfig | false |  | Additional configuration for the guard. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| awsAccount | string,null | false |  | The ID of the user credential containing an AWS account. |
| awsModel | string,null | false |  | AWS model. |
| awsRegion | string,null | false | maxLength: 255 | AWS model region. |
| deploymentId | string,null | false |  | The ID of the deployed model for model guards. |
| description | string | false | maxLength: 4096 | Guard configuration description |
| googleModel | string,null | false |  | Google model. |
| googleRegion | string,null | false | maxLength: 255 | Google model region. |
| googleServiceAccount | string,null | false |  | The ID of the user credential containing a Google service account. |
| intervention | GuardConfigurationInterventionResponse | false |  | Intervention configuration for the guard. |
| llmGatewayModelId | string,null | false | maxLength: 255 | The LLM Gateway model ID to use as judge. |
| llmType | string,null | false |  | The type of LLM used by this guard. |
| modelInfo | GuardConfigurationPayloadModelInfo | false |  | The configuration info for guards using deployed models. |
| name | string | false | maxLength: 255 | Guard configuration name |
| nemoInfo | GuardConfigurationNemoInfoResponse | false |  | The configuration info for NeMo guards. |
| nemoLlmJudgeConfig | GuardNemoLlmJudgeConfigResponse | false |  | The configuration for the LLM Judge metric. |
| nemoResponseRelevancyConfig | GuardNemoResponseRelevancyConfigResponse | false |  | The configuration for the Response Relevancy metric. |
| nemoTopicAdherenceConfig | GuardNemoTopicAdherenceConfigResponse | false |  | The configuration for the Topic Adherence metric. |
| openaiApiBase | string,null | false | maxLength: 255 | The Azure OpenAI API Base URL. |
| openaiApiKey | string,null | false | maxLength: 255 | Deprecated; use openai_credential instead. |
| openaiCredential | string,null | false |  | The ID of the user credential containing an OpenAI token. |
| openaiDeploymentId | string,null | false | maxLength: 255 | The OpenAPI deployment ID. |

### Enumerated Values

| Property | Value |
| --- | --- |
| awsModel | [amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus, anthropic-claude-3.5-sonnet-v1, anthropic-claude-3.5-sonnet-v2, amazon-nova-lite, amazon-nova-micro, amazon-nova-pro] |
| googleModel | [chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType | [openAi, azureOpenAi, google, amazon, datarobot, nim, llmGateway] |

## GuardInterventionResponse

```
{
  "description": "The intervention configuration for the guard.",
  "properties": {
    "action": {
      "description": "The action to take if conditions are met.",
      "enum": [
        "block",
        "report",
        "replace"
      ],
      "type": "string"
    },
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array"
    },
    "conditionLogic": {
      "default": "any",
      "description": "The action to take if conditions are met.",
      "enum": [
        "any"
      ],
      "type": "string"
    },
    "conditions": {
      "description": "The list of conditions to trigger intervention.",
      "items": {
        "description": "The condition to trigger intervention.",
        "properties": {
          "comparand": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "items": {
                  "description": "The class name to match.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              }
            ],
            "description": "The condition comparand (basis of comparison)."
          },
          "comparator": {
            "description": "The condition comparator (operator).",
            "enum": [
              "greaterThan",
              "lessThan",
              "equals",
              "notEquals",
              "is",
              "isNot",
              "matches",
              "doesNotMatch",
              "contains",
              "doesNotContain"
            ],
            "type": "string"
          }
        },
        "required": [
          "comparand",
          "comparator"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 1,
      "type": "array"
    },
    "modifyMessage": {
      "description": "The message to use if the prompt or response is blocked.",
      "maxLength": 4096,
      "type": "string"
    },
    "sendNotification": {
      "description": "The notification event to create if intervention is triggered.",
      "type": "boolean"
    }
  },
  "required": [
    "action",
    "conditions",
    "modifyMessage"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The intervention configuration for the guard.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| action | string | true |  | The action to take if conditions are met. |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| conditionLogic | string | false |  | The action to take if conditions are met. |
| conditions | [GuardConditionResponse] | true | maxItems: 1 | The list of conditions to trigger intervention. |
| modifyMessage | string | true | maxLength: 4096 | The message to use if the prompt or response is blocked. |
| sendNotification | boolean | false |  | The notification event to create if intervention is triggered. |

### Enumerated Values

| Property | Value |
| --- | --- |
| action | [block, report, replace] |
| conditionLogic | any |

## GuardModelInfoResponse

```
{
  "description": "The configuration info for guards using deployed models.",
  "properties": {
    "classNames": {
      "description": "The list of class names for multiclass models.",
      "items": {
        "description": "The class name.",
        "maxLength": 128,
        "type": "string"
      },
      "maxItems": 100,
      "type": "array"
    },
    "inputColumnName": {
      "description": "The input column name.",
      "maxLength": 255,
      "type": "string"
    },
    "modelId": {
      "description": "The ID of the registered model for model guards.",
      "type": [
        "string",
        "null"
      ]
    },
    "modelName": {
      "default": "",
      "description": "The ID of the registered model for .model guards.",
      "maxLength": 255,
      "type": "string"
    },
    "outputColumnName": {
      "description": "The output column name.",
      "maxLength": 255,
      "type": "string"
    },
    "replacementTextColumnName": {
      "default": "",
      "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
      "maxLength": 255,
      "type": "string"
    },
    "targetType": {
      "description": "The target type.",
      "enum": [
        "Binary",
        "Regression",
        "Multiclass",
        "TextGeneration"
      ],
      "type": "string"
    }
  },
  "required": [
    "inputColumnName",
    "outputColumnName",
    "targetType"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The configuration info for guards using deployed models.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| classNames | [string] | false | maxItems: 100 | The list of class names for multiclass models. |
| inputColumnName | string | true | maxLength: 255 | The input column name. |
| modelId | string,null | false |  | The ID of the registered model for model guards. |
| modelName | string | false | maxLength: 255 | The ID of the registered model for .model guards. |
| outputColumnName | string | true | maxLength: 255 | The output column name. |
| replacementTextColumnName | string | false | maxLength: 255 | The name of the output column with replacement text. Required only if intervention.action is replace. |
| targetType | string | true |  | The target type. |

### Enumerated Values

| Property | Value |
| --- | --- |
| targetType | [Binary, Regression, Multiclass, TextGeneration] |

## GuardNemoInfoResponse

```
{
  "description": "The configuration info for NeMo guards.",
  "properties": {
    "actions": {
      "default": "",
      "description": "The NeMo guardrails actions.",
      "maxLength": 4096,
      "type": "string"
    },
    "blockedTerms": {
      "description": "The NeMo guardrails blocked terms list.",
      "maxLength": 4096,
      "type": "string"
    },
    "credentialId": {
      "description": "The NeMo guardrails credential ID.",
      "type": [
        "string",
        "null"
      ]
    },
    "llmPrompts": {
      "default": "",
      "description": "The NeMo guardrails prompts.",
      "maxLength": 4096,
      "type": "string"
    },
    "mainConfig": {
      "description": "The overall NeMo configuration YAML.",
      "maxLength": 4096,
      "type": "string"
    },
    "railsConfig": {
      "description": "The NeMo guardrails configuration Colang.",
      "maxLength": 4096,
      "type": "string"
    }
  },
  "required": [
    "blockedTerms",
    "mainConfig",
    "railsConfig"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

The configuration info for NeMo guards.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| actions | string | false | maxLength: 4096 | The NeMo guardrails actions. |
| blockedTerms | string | true | maxLength: 4096 | The NeMo guardrails blocked terms list. |
| credentialId | string,null | false |  | The NeMo guardrails credential ID. |
| llmPrompts | string | false | maxLength: 4096 | The NeMo guardrails prompts. |
| mainConfig | string | true | maxLength: 4096 | The overall NeMo configuration YAML. |
| railsConfig | string | true | maxLength: 4096 | The NeMo guardrails configuration Colang. |

## GuardNemoLlmJudgeConfigResponse

```
{
  "description": "The configuration for the LLM Judge metric.",
  "properties": {
    "customMetricDirectionality": {
      "description": "The custom metric directionality for the LLM judge.",
      "enum": [
        "higherIsBetter",
        "lowerIsBetter"
      ],
      "type": "string",
      "x-versionadded": "v2.42"
    },
    "scoreParsingRegex": {
      "description": "The regex to parse the score from the LLM judge response.",
      "maxLength": 1024,
      "type": "string"
    },
    "systemPrompt": {
      "description": "The system prompt for the LLM judge.",
      "maxLength": 8192,
      "type": "string"
    },
    "userPrompt": {
      "description": "The user prompt template for the LLM judge.",
      "maxLength": 8192,
      "type": "string"
    }
  },
  "required": [
    "customMetricDirectionality",
    "scoreParsingRegex",
    "systemPrompt",
    "userPrompt"
  ],
  "type": "object",
  "x-versionadded": "v2.42"
}
```

The configuration for the LLM Judge metric.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| customMetricDirectionality | string | true |  | The custom metric directionality for the LLM judge. |
| scoreParsingRegex | string | true | maxLength: 1024 | The regex to parse the score from the LLM judge response. |
| systemPrompt | string | true | maxLength: 8192 | The system prompt for the LLM judge. |
| userPrompt | string | true | maxLength: 8192 | The user prompt template for the LLM judge. |

### Enumerated Values

| Property | Value |
| --- | --- |
| customMetricDirectionality | [higherIsBetter, lowerIsBetter] |

## GuardNemoResponseRelevancyConfigResponse

```
{
  "description": "The configuration for the Response Relevancy metric.",
  "properties": {
    "embeddingDeploymentId": {
      "description": "The ID of the embedding model deployment.",
      "type": "string"
    }
  },
  "required": [
    "embeddingDeploymentId"
  ],
  "type": "object",
  "x-versionadded": "v2.42"
}
```

The configuration for the Response Relevancy metric.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| embeddingDeploymentId | string | true |  | The ID of the embedding model deployment. |

## GuardNemoTopicAdherenceConfigResponse

```
{
  "description": "The configuration for the Topic Adherence metric.",
  "properties": {
    "metricMode": {
      "default": "f1",
      "description": "The metric calculation mode.",
      "enum": [
        "f1",
        "recall",
        "precision"
      ],
      "type": "string"
    },
    "referenceTopics": {
      "description": "The list of reference topics.",
      "items": {
        "description": "The reference topic.",
        "maxLength": 512,
        "type": "string"
      },
      "maxItems": 100,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "referenceTopics"
  ],
  "type": "object",
  "x-versionadded": "v2.42"
}
```

The configuration for the Topic Adherence metric.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| metricMode | string | false |  | The metric calculation mode. |
| referenceTopics | [string] | true | maxItems: 100minItems: 1 | The list of reference topics. |

### Enumerated Values

| Property | Value |
| --- | --- |
| metricMode | [f1, recall, precision] |

## GuardTemplateListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of guard templates.",
      "items": {
        "properties": {
          "allowedActions": {
            "description": "The actions this guard is allowed to take.",
            "items": {
              "enum": [
                "block",
                "report",
                "replace"
              ],
              "type": "string"
            },
            "maxItems": 10,
            "type": "array",
            "x-versionadded": "v2.36"
          },
          "allowedStages": {
            "description": "The stages where the guard can run.",
            "items": {
              "enum": [
                "prompt",
                "response"
              ],
              "type": "string"
            },
            "maxItems": 16,
            "type": "array"
          },
          "awsModel": {
            "description": "AWS model.",
            "enum": [
              "amazon-titan",
              "anthropic-claude-2",
              "anthropic-claude-3-haiku",
              "anthropic-claude-3-sonnet",
              "anthropic-claude-3-opus",
              "anthropic-claude-3.5-sonnet-v1",
              "anthropic-claude-3.5-sonnet-v2",
              "amazon-nova-lite",
              "amazon-nova-micro",
              "amazon-nova-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "awsRegion": {
            "description": "AWS model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "createdAt": {
            "description": "When the template was created.",
            "format": "date-time",
            "type": "string"
          },
          "creatorId": {
            "description": "The ID of the user who created the guard template.",
            "type": [
              "string",
              "null"
            ]
          },
          "creatorName": {
            "description": "The name of the user who created the guard template.",
            "maxLength": 1000,
            "type": "string"
          },
          "description": {
            "description": "The guard template description.",
            "maxLength": 4096,
            "type": "string"
          },
          "errorMessage": {
            "description": "Error message if the guard configuration is invalid.",
            "type": [
              "string",
              "null"
            ]
          },
          "googleModel": {
            "description": "Google model.",
            "enum": [
              "chat-bison",
              "google-gemini-1.5-flash",
              "google-gemini-1.5-pro"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "googleRegion": {
            "description": "Google model region.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.35"
          },
          "id": {
            "description": "The guard template object ID.",
            "type": "string"
          },
          "intervention": {
            "description": "The intervention configuration for the guard.",
            "properties": {
              "action": {
                "description": "The action to take if conditions are met.",
                "enum": [
                  "block",
                  "report",
                  "replace"
                ],
                "type": "string"
              },
              "allowedActions": {
                "description": "The actions this guard is allowed to take.",
                "items": {
                  "enum": [
                    "block",
                    "report",
                    "replace"
                  ],
                  "type": "string"
                },
                "maxItems": 10,
                "type": "array"
              },
              "conditionLogic": {
                "default": "any",
                "description": "The action to take if conditions are met.",
                "enum": [
                  "any"
                ],
                "type": "string"
              },
              "conditions": {
                "description": "The list of conditions to trigger intervention.",
                "items": {
                  "description": "The condition to trigger intervention.",
                  "properties": {
                    "comparand": {
                      "anyOf": [
                        {
                          "type": "boolean"
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "string"
                        },
                        {
                          "items": {
                            "description": "The class name to match.",
                            "maxLength": 128,
                            "type": "string"
                          },
                          "maxItems": 10,
                          "type": "array"
                        }
                      ],
                      "description": "The condition comparand (basis of comparison)."
                    },
                    "comparator": {
                      "description": "The condition comparator (operator).",
                      "enum": [
                        "greaterThan",
                        "lessThan",
                        "equals",
                        "notEquals",
                        "is",
                        "isNot",
                        "matches",
                        "doesNotMatch",
                        "contains",
                        "doesNotContain"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "comparand",
                    "comparator"
                  ],
                  "type": "object",
                  "x-versionadded": "v2.35"
                },
                "maxItems": 1,
                "type": "array"
              },
              "modifyMessage": {
                "description": "The message to use if the prompt or response is blocked.",
                "maxLength": 4096,
                "type": "string"
              },
              "sendNotification": {
                "description": "The notification event to create if intervention is triggered.",
                "type": "boolean"
              }
            },
            "required": [
              "action",
              "conditions",
              "modifyMessage"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "isAgentic": {
            "default": true,
            "description": "True if the guard is suitable for agentic workflows only.",
            "type": "boolean",
            "x-versionadded": "v2.37"
          },
          "isValid": {
            "default": true,
            "description": "True if the guard is fully configured and valid.",
            "type": "boolean"
          },
          "labels": {
            "description": "The list of short strings to associate with the template.",
            "items": {
              "description": "A short string to associate with the template.",
              "maxLength": 255,
              "type": "string"
            },
            "maxItems": 16,
            "type": "array",
            "x-versionadded": "v2.37"
          },
          "llmGatewayModelId": {
            "description": "The LLM Gateway model ID to use as judge.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.42"
          },
          "llmType": {
            "description": "The type of LLM used by this guard.",
            "enum": [
              "openAi",
              "azureOpenAi",
              "google",
              "amazon",
              "datarobot",
              "nim",
              "llmGateway"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "modelInfo": {
            "description": "The configuration info for guards using deployed models.",
            "properties": {
              "classNames": {
                "description": "The list of class names for multiclass models.",
                "items": {
                  "description": "The class name.",
                  "maxLength": 128,
                  "type": "string"
                },
                "maxItems": 100,
                "type": "array"
              },
              "inputColumnName": {
                "description": "The input column name.",
                "maxLength": 255,
                "type": "string"
              },
              "modelId": {
                "description": "The ID of the registered model for model guards.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "modelName": {
                "default": "",
                "description": "The ID of the registered model for .model guards.",
                "maxLength": 255,
                "type": "string"
              },
              "outputColumnName": {
                "description": "The output column name.",
                "maxLength": 255,
                "type": "string"
              },
              "replacementTextColumnName": {
                "default": "",
                "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
                "maxLength": 255,
                "type": "string"
              },
              "targetType": {
                "description": "The target type.",
                "enum": [
                  "Binary",
                  "Regression",
                  "Multiclass",
                  "TextGeneration"
                ],
                "type": "string"
              }
            },
            "required": [
              "inputColumnName",
              "outputColumnName",
              "targetType"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "name": {
            "description": "The guard template name.",
            "maxLength": 255,
            "type": "string"
          },
          "nemoEvaluatorType": {
            "description": "The guard template \"NeMo Evaluator\" metric type.",
            "enum": [
              "llm_judge",
              "context_relevance",
              "response_groundedness",
              "topic_adherence",
              "agent_goal_accuracy",
              "response_relevancy",
              "faithfulness"
            ],
            "type": [
              "string",
              "null"
            ],
            "x-versionadded": "v2.41"
          },
          "nemoInfo": {
            "description": "The configuration info for NeMo guards.",
            "properties": {
              "actions": {
                "default": "",
                "description": "The NeMo guardrails actions.",
                "maxLength": 4096,
                "type": "string"
              },
              "blockedTerms": {
                "description": "The NeMo guardrails blocked terms list.",
                "maxLength": 4096,
                "type": "string"
              },
              "credentialId": {
                "description": "The NeMo guardrails credential ID.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "llmPrompts": {
                "default": "",
                "description": "The NeMo guardrails prompts.",
                "maxLength": 4096,
                "type": "string"
              },
              "mainConfig": {
                "description": "The overall NeMo configuration YAML.",
                "maxLength": 4096,
                "type": "string"
              },
              "railsConfig": {
                "description": "The NeMo guardrails configuration Colang.",
                "maxLength": 4096,
                "type": "string"
              }
            },
            "required": [
              "blockedTerms",
              "mainConfig",
              "railsConfig"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "nemoLlmJudgeConfig": {
            "description": "The configuration for the LLM Judge metric.",
            "properties": {
              "customMetricDirectionality": {
                "description": "The custom metric directionality for the LLM judge.",
                "enum": [
                  "higherIsBetter",
                  "lowerIsBetter"
                ],
                "type": "string",
                "x-versionadded": "v2.42"
              },
              "scoreParsingRegex": {
                "description": "The regex to parse the score from the LLM judge response.",
                "maxLength": 1024,
                "type": "string"
              },
              "systemPrompt": {
                "description": "The system prompt for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              },
              "userPrompt": {
                "description": "The user prompt template for the LLM judge.",
                "maxLength": 8192,
                "type": "string"
              }
            },
            "required": [
              "customMetricDirectionality",
              "scoreParsingRegex",
              "systemPrompt",
              "userPrompt"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoResponseRelevancyConfig": {
            "description": "The configuration for the Response Relevancy metric.",
            "properties": {
              "embeddingDeploymentId": {
                "description": "The ID of the embedding model deployment.",
                "type": "string"
              }
            },
            "required": [
              "embeddingDeploymentId"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "nemoTopicAdherenceConfig": {
            "description": "The configuration for the Topic Adherence metric.",
            "properties": {
              "metricMode": {
                "default": "f1",
                "description": "The metric calculation mode.",
                "enum": [
                  "f1",
                  "recall",
                  "precision"
                ],
                "type": "string"
              },
              "referenceTopics": {
                "description": "The list of reference topics.",
                "items": {
                  "description": "The reference topic.",
                  "maxLength": 512,
                  "type": "string"
                },
                "maxItems": 100,
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "referenceTopics"
            ],
            "type": "object",
            "x-versionadded": "v2.42"
          },
          "ootbType": {
            "description": "The guard template \"Out of the Box\" metric type.",
            "enum": [
              "token_count",
              "faithfulness",
              "rouge_1",
              "agent_goal_accuracy",
              "agent_goal_accuracy_with_reference",
              "cost",
              "task_adherence",
              "tool_call_accuracy",
              "agent_guideline_adherence",
              "agent_latency",
              "agent_tokens",
              "agent_cost",
              "agentGoalAccuracy",
              "agentGoalAccuracyWithReference",
              "taskAdherence",
              "toolCallAccuracy"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiBase": {
            "description": "The Azure OpenAI API Base URL.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiApiKey": {
            "description": "Deprecated; use openai_credential instead.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "openaiDeploymentId": {
            "description": "The OpenAPI deployment ID.",
            "maxLength": 255,
            "type": [
              "string",
              "null"
            ]
          },
          "orgId": {
            "description": "Organization ID of the user who created the Guard template.",
            "type": [
              "string",
              "null"
            ]
          },
          "playgroundOnly": {
            "description": "Whether the guard is for playground only, or if it can be used in production and playground.",
            "type": [
              "boolean",
              "null"
            ],
            "x-versionadded": "v2.37"
          },
          "productionOnly": {
            "description": "Whether the guard is for production only, or if it can be used in production and playground.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "type": {
            "description": "The guard template type.",
            "enum": [
              "guardModel",
              "nemo",
              "nemoEvaluator",
              "ootb",
              "pii",
              "userModel"
            ],
            "type": "string"
          }
        },
        "required": [
          "allowedStages",
          "createdAt",
          "description",
          "id",
          "name",
          "type"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [GuardTemplateRetrieveResponse] | true | maxItems: 200 | The list of guard templates. |
| next | string,null(uri) | true |  | The URL of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The URL of the previous page (if null, there is no previous page). |
| totalCount | integer | true |  | The total number of items across all pages. |

## GuardTemplateRetrieveResponse

```
{
  "properties": {
    "allowedActions": {
      "description": "The actions this guard is allowed to take.",
      "items": {
        "enum": [
          "block",
          "report",
          "replace"
        ],
        "type": "string"
      },
      "maxItems": 10,
      "type": "array",
      "x-versionadded": "v2.36"
    },
    "allowedStages": {
      "description": "The stages where the guard can run.",
      "items": {
        "enum": [
          "prompt",
          "response"
        ],
        "type": "string"
      },
      "maxItems": 16,
      "type": "array"
    },
    "awsModel": {
      "description": "AWS model.",
      "enum": [
        "amazon-titan",
        "anthropic-claude-2",
        "anthropic-claude-3-haiku",
        "anthropic-claude-3-sonnet",
        "anthropic-claude-3-opus",
        "anthropic-claude-3.5-sonnet-v1",
        "anthropic-claude-3.5-sonnet-v2",
        "amazon-nova-lite",
        "amazon-nova-micro",
        "amazon-nova-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "awsRegion": {
      "description": "AWS model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "createdAt": {
      "description": "When the template was created.",
      "format": "date-time",
      "type": "string"
    },
    "creatorId": {
      "description": "The ID of the user who created the guard template.",
      "type": [
        "string",
        "null"
      ]
    },
    "creatorName": {
      "description": "The name of the user who created the guard template.",
      "maxLength": 1000,
      "type": "string"
    },
    "description": {
      "description": "The guard template description.",
      "maxLength": 4096,
      "type": "string"
    },
    "errorMessage": {
      "description": "Error message if the guard configuration is invalid.",
      "type": [
        "string",
        "null"
      ]
    },
    "googleModel": {
      "description": "Google model.",
      "enum": [
        "chat-bison",
        "google-gemini-1.5-flash",
        "google-gemini-1.5-pro"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "googleRegion": {
      "description": "Google model region.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.35"
    },
    "id": {
      "description": "The guard template object ID.",
      "type": "string"
    },
    "intervention": {
      "description": "The intervention configuration for the guard.",
      "properties": {
        "action": {
          "description": "The action to take if conditions are met.",
          "enum": [
            "block",
            "report",
            "replace"
          ],
          "type": "string"
        },
        "allowedActions": {
          "description": "The actions this guard is allowed to take.",
          "items": {
            "enum": [
              "block",
              "report",
              "replace"
            ],
            "type": "string"
          },
          "maxItems": 10,
          "type": "array"
        },
        "conditionLogic": {
          "default": "any",
          "description": "The action to take if conditions are met.",
          "enum": [
            "any"
          ],
          "type": "string"
        },
        "conditions": {
          "description": "The list of conditions to trigger intervention.",
          "items": {
            "description": "The condition to trigger intervention.",
            "properties": {
              "comparand": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "string"
                  },
                  {
                    "items": {
                      "description": "The class name to match.",
                      "maxLength": 128,
                      "type": "string"
                    },
                    "maxItems": 10,
                    "type": "array"
                  }
                ],
                "description": "The condition comparand (basis of comparison)."
              },
              "comparator": {
                "description": "The condition comparator (operator).",
                "enum": [
                  "greaterThan",
                  "lessThan",
                  "equals",
                  "notEquals",
                  "is",
                  "isNot",
                  "matches",
                  "doesNotMatch",
                  "contains",
                  "doesNotContain"
                ],
                "type": "string"
              }
            },
            "required": [
              "comparand",
              "comparator"
            ],
            "type": "object",
            "x-versionadded": "v2.35"
          },
          "maxItems": 1,
          "type": "array"
        },
        "modifyMessage": {
          "description": "The message to use if the prompt or response is blocked.",
          "maxLength": 4096,
          "type": "string"
        },
        "sendNotification": {
          "description": "The notification event to create if intervention is triggered.",
          "type": "boolean"
        }
      },
      "required": [
        "action",
        "conditions",
        "modifyMessage"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "isAgentic": {
      "default": true,
      "description": "True if the guard is suitable for agentic workflows only.",
      "type": "boolean",
      "x-versionadded": "v2.37"
    },
    "isValid": {
      "default": true,
      "description": "True if the guard is fully configured and valid.",
      "type": "boolean"
    },
    "labels": {
      "description": "The list of short strings to associate with the template.",
      "items": {
        "description": "A short string to associate with the template.",
        "maxLength": 255,
        "type": "string"
      },
      "maxItems": 16,
      "type": "array",
      "x-versionadded": "v2.37"
    },
    "llmGatewayModelId": {
      "description": "The LLM Gateway model ID to use as judge.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "llmType": {
      "description": "The type of LLM used by this guard.",
      "enum": [
        "openAi",
        "azureOpenAi",
        "google",
        "amazon",
        "datarobot",
        "nim",
        "llmGateway"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "modelInfo": {
      "description": "The configuration info for guards using deployed models.",
      "properties": {
        "classNames": {
          "description": "The list of class names for multiclass models.",
          "items": {
            "description": "The class name.",
            "maxLength": 128,
            "type": "string"
          },
          "maxItems": 100,
          "type": "array"
        },
        "inputColumnName": {
          "description": "The input column name.",
          "maxLength": 255,
          "type": "string"
        },
        "modelId": {
          "description": "The ID of the registered model for model guards.",
          "type": [
            "string",
            "null"
          ]
        },
        "modelName": {
          "default": "",
          "description": "The ID of the registered model for .model guards.",
          "maxLength": 255,
          "type": "string"
        },
        "outputColumnName": {
          "description": "The output column name.",
          "maxLength": 255,
          "type": "string"
        },
        "replacementTextColumnName": {
          "default": "",
          "description": "The name of the output column with replacement text. Required only if intervention.action is `replace`.",
          "maxLength": 255,
          "type": "string"
        },
        "targetType": {
          "description": "The target type.",
          "enum": [
            "Binary",
            "Regression",
            "Multiclass",
            "TextGeneration"
          ],
          "type": "string"
        }
      },
      "required": [
        "inputColumnName",
        "outputColumnName",
        "targetType"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "name": {
      "description": "The guard template name.",
      "maxLength": 255,
      "type": "string"
    },
    "nemoEvaluatorType": {
      "description": "The guard template \"NeMo Evaluator\" metric type.",
      "enum": [
        "llm_judge",
        "context_relevance",
        "response_groundedness",
        "topic_adherence",
        "agent_goal_accuracy",
        "response_relevancy",
        "faithfulness"
      ],
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.41"
    },
    "nemoInfo": {
      "description": "The configuration info for NeMo guards.",
      "properties": {
        "actions": {
          "default": "",
          "description": "The NeMo guardrails actions.",
          "maxLength": 4096,
          "type": "string"
        },
        "blockedTerms": {
          "description": "The NeMo guardrails blocked terms list.",
          "maxLength": 4096,
          "type": "string"
        },
        "credentialId": {
          "description": "The NeMo guardrails credential ID.",
          "type": [
            "string",
            "null"
          ]
        },
        "llmPrompts": {
          "default": "",
          "description": "The NeMo guardrails prompts.",
          "maxLength": 4096,
          "type": "string"
        },
        "mainConfig": {
          "description": "The overall NeMo configuration YAML.",
          "maxLength": 4096,
          "type": "string"
        },
        "railsConfig": {
          "description": "The NeMo guardrails configuration Colang.",
          "maxLength": 4096,
          "type": "string"
        }
      },
      "required": [
        "blockedTerms",
        "mainConfig",
        "railsConfig"
      ],
      "type": "object",
      "x-versionadded": "v2.35"
    },
    "nemoLlmJudgeConfig": {
      "description": "The configuration for the LLM Judge metric.",
      "properties": {
        "customMetricDirectionality": {
          "description": "The custom metric directionality for the LLM judge.",
          "enum": [
            "higherIsBetter",
            "lowerIsBetter"
          ],
          "type": "string",
          "x-versionadded": "v2.42"
        },
        "scoreParsingRegex": {
          "description": "The regex to parse the score from the LLM judge response.",
          "maxLength": 1024,
          "type": "string"
        },
        "systemPrompt": {
          "description": "The system prompt for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        },
        "userPrompt": {
          "description": "The user prompt template for the LLM judge.",
          "maxLength": 8192,
          "type": "string"
        }
      },
      "required": [
        "customMetricDirectionality",
        "scoreParsingRegex",
        "systemPrompt",
        "userPrompt"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoResponseRelevancyConfig": {
      "description": "The configuration for the Response Relevancy metric.",
      "properties": {
        "embeddingDeploymentId": {
          "description": "The ID of the embedding model deployment.",
          "type": "string"
        }
      },
      "required": [
        "embeddingDeploymentId"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "nemoTopicAdherenceConfig": {
      "description": "The configuration for the Topic Adherence metric.",
      "properties": {
        "metricMode": {
          "default": "f1",
          "description": "The metric calculation mode.",
          "enum": [
            "f1",
            "recall",
            "precision"
          ],
          "type": "string"
        },
        "referenceTopics": {
          "description": "The list of reference topics.",
          "items": {
            "description": "The reference topic.",
            "maxLength": 512,
            "type": "string"
          },
          "maxItems": 100,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "referenceTopics"
      ],
      "type": "object",
      "x-versionadded": "v2.42"
    },
    "ootbType": {
      "description": "The guard template \"Out of the Box\" metric type.",
      "enum": [
        "token_count",
        "faithfulness",
        "rouge_1",
        "agent_goal_accuracy",
        "agent_goal_accuracy_with_reference",
        "cost",
        "task_adherence",
        "tool_call_accuracy",
        "agent_guideline_adherence",
        "agent_latency",
        "agent_tokens",
        "agent_cost",
        "agentGoalAccuracy",
        "agentGoalAccuracyWithReference",
        "taskAdherence",
        "toolCallAccuracy"
      ],
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiBase": {
      "description": "The Azure OpenAI API Base URL.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiApiKey": {
      "description": "Deprecated; use openai_credential instead.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "openaiDeploymentId": {
      "description": "The OpenAPI deployment ID.",
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ]
    },
    "orgId": {
      "description": "Organization ID of the user who created the Guard template.",
      "type": [
        "string",
        "null"
      ]
    },
    "playgroundOnly": {
      "description": "Whether the guard is for playground only, or if it can be used in production and playground.",
      "type": [
        "boolean",
        "null"
      ],
      "x-versionadded": "v2.37"
    },
    "productionOnly": {
      "description": "Whether the guard is for production only, or if it can be used in production and playground.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "type": {
      "description": "The guard template type.",
      "enum": [
        "guardModel",
        "nemo",
        "nemoEvaluator",
        "ootb",
        "pii",
        "userModel"
      ],
      "type": "string"
    }
  },
  "required": [
    "allowedStages",
    "createdAt",
    "description",
    "id",
    "name",
    "type"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| allowedActions | [string] | false | maxItems: 10 | The actions this guard is allowed to take. |
| allowedStages | [string] | true | maxItems: 16 | The stages where the guard can run. |
| awsModel | string,null | false |  | AWS model. |
| awsRegion | string,null | false | maxLength: 255 | AWS model region. |
| createdAt | string(date-time) | true |  | When the template was created. |
| creatorId | string,null | false |  | The ID of the user who created the guard template. |
| creatorName | string | false | maxLength: 1000 | The name of the user who created the guard template. |
| description | string | true | maxLength: 4096 | The guard template description. |
| errorMessage | string,null | false |  | Error message if the guard configuration is invalid. |
| googleModel | string,null | false |  | Google model. |
| googleRegion | string,null | false | maxLength: 255 | Google model region. |
| id | string | true |  | The guard template object ID. |
| intervention | GuardInterventionResponse | false |  | The intervention configuration for the guard. |
| isAgentic | boolean | false |  | True if the guard is suitable for agentic workflows only. |
| isValid | boolean | false |  | True if the guard is fully configured and valid. |
| labels | [string] | false | maxItems: 16 | The list of short strings to associate with the template. |
| llmGatewayModelId | string,null | false | maxLength: 255 | The LLM Gateway model ID to use as judge. |
| llmType | string,null | false |  | The type of LLM used by this guard. |
| modelInfo | GuardModelInfoResponse | false |  | The configuration info for guards using deployed models. |
| name | string | true | maxLength: 255 | The guard template name. |
| nemoEvaluatorType | string,null | false |  | The guard template "NeMo Evaluator" metric type. |
| nemoInfo | GuardNemoInfoResponse | false |  | The configuration info for NeMo guards. |
| nemoLlmJudgeConfig | GuardNemoLlmJudgeConfigResponse | false |  | The configuration for the LLM Judge metric. |
| nemoResponseRelevancyConfig | GuardNemoResponseRelevancyConfigResponse | false |  | The configuration for the Response Relevancy metric. |
| nemoTopicAdherenceConfig | GuardNemoTopicAdherenceConfigResponse | false |  | The configuration for the Topic Adherence metric. |
| ootbType | string,null | false |  | The guard template "Out of the Box" metric type. |
| openaiApiBase | string,null | false | maxLength: 255 | The Azure OpenAI API Base URL. |
| openaiApiKey | string,null | false | maxLength: 255 | Deprecated; use openai_credential instead. |
| openaiDeploymentId | string,null | false | maxLength: 255 | The OpenAPI deployment ID. |
| orgId | string,null | false |  | Organization ID of the user who created the Guard template. |
| playgroundOnly | boolean,null | false |  | Whether the guard is for playground only, or if it can be used in production and playground. |
| productionOnly | boolean,null | false |  | Whether the guard is for production only, or if it can be used in production and playground. |
| type | string | true |  | The guard template type. |

### Enumerated Values

| Property | Value |
| --- | --- |
| awsModel | [amazon-titan, anthropic-claude-2, anthropic-claude-3-haiku, anthropic-claude-3-sonnet, anthropic-claude-3-opus, anthropic-claude-3.5-sonnet-v1, anthropic-claude-3.5-sonnet-v2, amazon-nova-lite, amazon-nova-micro, amazon-nova-pro] |
| googleModel | [chat-bison, google-gemini-1.5-flash, google-gemini-1.5-pro] |
| llmType | [openAi, azureOpenAi, google, amazon, datarobot, nim, llmGateway] |
| nemoEvaluatorType | [llm_judge, context_relevance, response_groundedness, topic_adherence, agent_goal_accuracy, response_relevancy, faithfulness] |
| ootbType | [token_count, faithfulness, rouge_1, agent_goal_accuracy, agent_goal_accuracy_with_reference, cost, task_adherence, tool_call_accuracy, agent_guideline_adherence, agent_latency, agent_tokens, agent_cost, agentGoalAccuracy, agentGoalAccuracyWithReference, taskAdherence, toolCallAccuracy] |
| type | [guardModel, nemo, nemoEvaluator, ootb, pii, userModel] |

## GuardToolCallInfo

```
{
  "description": "How to calculate tool call metrics for this guard.",
  "properties": {
    "comparisonMetric": {
      "description": "How tool calls should be compared for metrics calculations.",
      "enum": [
        "exactMatch",
        "doNotCompare"
      ],
      "type": "string"
    }
  },
  "required": [
    "comparisonMetric"
  ],
  "type": "object",
  "x-versionadded": "v2.37"
}
```

How to calculate tool call metrics for this guard.

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| comparisonMetric | string | true |  | How tool calls should be compared for metrics calculations. |

### Enumerated Values

| Property | Value |
| --- | --- |
| comparisonMetric | [exactMatch, doNotCompare] |

## OverallConfigUpdate

```
{
  "description": "Overall moderation configuration to push (not specific to one guard)",
  "properties": {
    "nemoEvaluatorDeploymentId": {
      "description": "ID of NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "Action to take if timeout occurs",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "Timeout value in seconds for any guard",
      "minimum": 2,
      "type": "integer"
    }
  },
  "required": [
    "timeoutAction",
    "timeoutSec"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

Overall moderation configuration to push (not specific to one guard)

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| nemoEvaluatorDeploymentId | string,null | false |  | ID of NeMo Evaluator deployment to use for all NeMo Evaluator guards. |
| timeoutAction | string | true |  | Action to take if timeout occurs |
| timeoutSec | integer | true | minimum: 2 | Timeout value in seconds for any guard |

### Enumerated Values

| Property | Value |
| --- | --- |
| timeoutAction | [block, score] |

## OverallModerationConfigurationResponse

```
{
  "properties": {
    "entityId": {
      "description": "The ID of the custom model or playground for this configuration.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "nemoEvaluatorDeploymentId": {
      "description": "The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "The action to take if timeout occurs.",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "The timeout value in seconds for any guard.",
      "minimum": 2,
      "type": "integer"
    },
    "updatedAt": {
      "description": "When the configuration was updated.",
      "format": "date-time",
      "type": "string"
    },
    "updaterId": {
      "description": "The ID of the user who updated the configuration.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "entityId",
    "entityType",
    "timeoutAction",
    "timeoutSec",
    "updaterId"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| entityId | string | true |  | The ID of the custom model or playground for this configuration. |
| entityType | string | true |  | The type of the associated entity. |
| nemoEvaluatorDeploymentId | string,null | false |  | The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards. |
| timeoutAction | string | true |  | The action to take if timeout occurs. |
| timeoutSec | integer | true | minimum: 2 | The timeout value in seconds for any guard. |
| updatedAt | string(date-time) | false |  | When the configuration was updated. |
| updaterId | string,null | true |  | The ID of the user who updated the configuration. |

### Enumerated Values

| Property | Value |
| --- | --- |
| entityType | [customModel, customModelVersion, playground] |
| timeoutAction | [block, score] |

## OverallModerationConfigurationUpdate

```
{
  "properties": {
    "entityId": {
      "description": "The ID of the custom model or playground for this configuration.",
      "type": "string"
    },
    "entityType": {
      "description": "The type of the associated entity.",
      "enum": [
        "customModel",
        "customModelVersion",
        "playground"
      ],
      "type": "string"
    },
    "nemoEvaluatorDeploymentId": {
      "description": "The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards.",
      "type": [
        "string",
        "null"
      ],
      "x-versionadded": "v2.42"
    },
    "timeoutAction": {
      "description": "The action to take if timeout occurs.",
      "enum": [
        "block",
        "score"
      ],
      "type": "string"
    },
    "timeoutSec": {
      "description": "The timeout value in seconds for any guard.",
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "entityId",
    "entityType",
    "timeoutAction",
    "timeoutSec"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| entityId | string | true |  | The ID of the custom model or playground for this configuration. |
| entityType | string | true |  | The type of the associated entity. |
| nemoEvaluatorDeploymentId | string,null | false |  | The ID of the NeMo Evaluator deployment to use for all NeMo Evaluator guards. |
| timeoutAction | string | true |  | The action to take if timeout occurs. |
| timeoutSec | integer | true | minimum: 0 | The timeout value in seconds for any guard. |

### Enumerated Values

| Property | Value |
| --- | --- |
| entityType | [customModel, customModelVersion, playground] |
| timeoutAction | [block, score] |

## PredictionEnvironmentInUseResponse

```
{
  "properties": {
    "id": {
      "description": "ID of prediction environment.",
      "type": "string"
    },
    "name": {
      "description": "Name of prediction environment.",
      "type": "string"
    },
    "usedBy": {
      "description": "Guards using this prediction environment.",
      "items": {
        "properties": {
          "configurationId": {
            "description": "ID of guard configuration.",
            "type": "string"
          },
          "deploymentId": {
            "description": "ID of guard model deployment.",
            "type": "string"
          },
          "name": {
            "description": "Name of guard configuration.",
            "type": "string"
          }
        },
        "required": [
          "configurationId",
          "deploymentId",
          "name"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 32,
      "type": "array"
    }
  },
  "required": [
    "id",
    "name",
    "usedBy"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| id | string | true |  | ID of prediction environment. |
| name | string | true |  | Name of prediction environment. |
| usedBy | [DeploymentAndGuardResponse] | true | maxItems: 32 | Guards using this prediction environment. |

## SupportedLlmListResponse

```
{
  "properties": {
    "count": {
      "description": "The number of items returned on this page.",
      "type": "integer"
    },
    "data": {
      "description": "The list of supported LLMs for moderation.",
      "items": {
        "properties": {
          "description": {
            "description": "The description of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "id": {
            "description": "The ID for this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "llmType": {
            "description": "The general category of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "model": {
            "description": "The specific model of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "name": {
            "description": "The display name of this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "provider": {
            "description": "The provider of access to this LLM.",
            "maxLength": 1024,
            "type": "string"
          },
          "vendor": {
            "description": "The vendor of this LLM.",
            "maxLength": 1024,
            "type": "string"
          }
        },
        "required": [
          "description",
          "id",
          "llmType",
          "model",
          "name",
          "provider",
          "vendor"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 200,
      "type": "array"
    },
    "next": {
      "description": "The URL of the next page (if null, there is no next page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "previous": {
      "description": "The URL of the previous page (if null, there is no previous page).",
      "format": "uri",
      "type": [
        "string",
        "null"
      ]
    },
    "totalCount": {
      "description": "The total number of items across all pages.",
      "type": "integer"
    }
  },
  "required": [
    "data",
    "next",
    "previous",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | false |  | The number of items returned on this page. |
| data | [SupportedLlmResponse] | true | maxItems: 200 | The list of supported LLMs for moderation. |
| next | string,null(uri) | true |  | The URL of the next page (if null, there is no next page). |
| previous | string,null(uri) | true |  | The URL of the previous page (if null, there is no previous page). |
| totalCount | integer | true |  | The total number of items across all pages. |

## SupportedLlmResponse

```
{
  "properties": {
    "description": {
      "description": "The description of this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "id": {
      "description": "The ID for this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "llmType": {
      "description": "The general category of this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "model": {
      "description": "The specific model of this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "name": {
      "description": "The display name of this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "provider": {
      "description": "The provider of access to this LLM.",
      "maxLength": 1024,
      "type": "string"
    },
    "vendor": {
      "description": "The vendor of this LLM.",
      "maxLength": 1024,
      "type": "string"
    }
  },
  "required": [
    "description",
    "id",
    "llmType",
    "model",
    "name",
    "provider",
    "vendor"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string | true | maxLength: 1024 | The description of this LLM. |
| id | string | true | maxLength: 1024 | The ID for this LLM. |
| llmType | string | true | maxLength: 1024 | The general category of this LLM. |
| model | string | true | maxLength: 1024 | The specific model of this LLM. |
| name | string | true | maxLength: 1024 | The display name of this LLM. |
| provider | string | true | maxLength: 1024 | The provider of access to this LLM. |
| vendor | string | true | maxLength: 1024 | The vendor of this LLM. |

---
