Leitplanke prüfen
curl --request POST \
--url https://api.truthlocks.com/v1/guardrails/check \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_type": "<string>",
"guardrail_type": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
check_type: '<string>',
guardrail_type: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/guardrails/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/guardrails/check"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_type": "<string>",
"guardrail_type": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/guardrails/check"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_type\": \"<string>\",\n \"guardrail_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"allowed": true,
"violations": [
{
"rule": "<string>",
"description": "<string>",
"severity": "low"
}
],
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Schutzmaßnahmen & Delegation
Guardrail-Score aufzeichnen
Wenden Sie Schwellenwerte auf einen von Ihrer Anwendung bereitgestellten Score an.
POST
/
v1
/
guardrails
/
check
Leitplanke prüfen
curl --request POST \
--url https://api.truthlocks.com/v1/guardrails/check \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_type": "<string>",
"guardrail_type": "<string>"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
check_type: '<string>',
guardrail_type: '<string>'
})
};
fetch('https://api.truthlocks.com/v1/guardrails/check', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/guardrails/check"
payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_type": "<string>",
"guardrail_type": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/guardrails/check"
payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_type\": \"<string>\",\n \"guardrail_type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"allowed": true,
"violations": [
{
"rule": "<string>",
"description": "<string>",
"severity": "low"
}
],
"receipt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Zeichnet den Score Ihrer Anwendung für die Eingabe oder Ausgabe eines Agenten auf. Es scannt keinen Rohtext oder berechnet einen unabhängigen Sicherheitsscore. Geben Sie den Score an, der von Ihrem eigenen Detektor erzeugt wurde.
Die erforderlichen Felder sind
Der aktuelle Handler behandelt einen weggelassenen Score als Null. Senden Sie immer einen expliziten Score; ein
agent_id, check_type und guardrail_type. check_type muss input oder output sein.
| Übermittelter Score | Ergebnis |
|---|---|
| Größer als 0,8 | fail |
| Größer als 0,5, bis zu 0,8 | warn |
| 0.5 oder niedriger | pass |
pass-Ergebnis beweist nicht, dass der Inhalt sicher ist. Eine fehlgeschlagene Prüfung versucht, den Schutzschalter des Agenten zu öffnen.
content_hash sind Metadaten, keine hochgeladenen Inhalte zur Analyse. Die aktuelle Quittung verwendet einen Systemmarker in ihrem Signaturfeld; behandeln Sie dies nicht als kryptografischen Beweis.Autorisierungen
Body
application/json

