Docs/Agent Tools/GET /v1/content-safety

GET /v1/content-safetyLLM content safety classifier

Agent Tools lf-agent-tools

Judges whether a piece of text is safe to hand to a model. Returns per-category scores and flags, a flagged boolean, a 0-1 risk_score, and an assessment of safe, sensitive, risky, or blocked.

Query Parameters

ParameterTypeRequiredDescription
textstringYesText to classify

Response Schema

categories (object): Per-category scores and flags
flagged (boolean): Any category flagged
risk_score (number): 0-1 risk score
assessment (string): safe, sensitive, risky, or blocked

cURL Example

curl 'https://lf-agent-tools.laminarforge.dev/v1/content-safety?text=<text>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-agent-tools.laminarforge.dev/v1/content-safety'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'text': '<text>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())