Skip to main content
POST
/
guardrails
Create a Guardrail
curl --request POST \
  --url https://proxy.qualifire.ai/api/guardrails \
  --header 'Content-Type: application/json' \
  --header 'X-Qualifire-API-Key: <api-key>' \
  --data '{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "created_at": "<string>",
  "active": true,
  "trigger": "<string>",
  "error_threshold": 50,
  "warning_threshold": 50,
  "evaluations": {
    "request_evaluation": "<string>",
    "response_evaluation": "<string>"
  },
  "actions": {
    "block": true,
    "default_response": "<string>",
    "retry": true,
    "retry_cap": 5,
    "alert": {
      "email": "<string>",
      "message": "<string>",
      "cooldown": 0
    }
  }
}'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "created_at": "<string>",
  "active": true,
  "trigger": "<string>",
  "error_threshold": 50,
  "warning_threshold": 50,
  "evaluations": {
    "request_evaluation": "<string>",
    "response_evaluation": "<string>"
  },
  "actions": {
    "block": true,
    "default_response": "<string>",
    "retry": true,
    "retry_cap": 5,
    "alert": {
      "email": "<string>",
      "message": "<string>",
      "cooldown": 0
    }
  }
}

Authorizations

X-Qualifire-API-Key
string
header
required

Body

application/json

Guardrail to create

id
string

The ID of the Guardrail

name
string

The name of the Guardrail

description
string

The description of the Guardrail

created_at
string

The creation date of the Guardrail

active
boolean
default:true

Whether the Guardrail is active

trigger
string

The trigger of the Guardrail

error_threshold
integer

The error threshold of the Guardrail

Required range: 0 <= x <= 100
warning_threshold
integer

The warning threshold of the Guardrail

Required range: 0 <= x <= 100
evaluations
object
actions
object

Response

OK

id
string

The ID of the Guardrail

name
string

The name of the Guardrail

description
string

The description of the Guardrail

created_at
string

The creation date of the Guardrail

active
boolean
default:true

Whether the Guardrail is active

trigger
string

The trigger of the Guardrail

error_threshold
integer

The error threshold of the Guardrail

Required range: 0 <= x <= 100
warning_threshold
integer

The warning threshold of the Guardrail

Required range: 0 <= x <= 100
evaluations
object
actions
object
I