API Endpoints
Llama Guard
This evaluator is a special version of Llama trained strictly for acting as a guardrail, following customizable guidelines. It can work both as a safety evaluator and as policy enforcement.
Env vars: CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_KEY
POST
/
huggingface
/
llama_guard
/
evaluate
Body
application/json
data
object[]
requiredList of entries to be evaluated, check the field type for the necessary keys
settings
object | null
Evaluator settings, check the field type for what settings this evaluator supports
env
object | null
Optional environment variables to override the server ones
Response
200 - application/json
status
enum<string>
default: processedAvailable options:
processed
score
number
requiredHow many violations were found in the content
passed
boolean | null
requiredIf true then the content is safe according to policy, if false then it is unsafe.
details
string | null
Short human-readable description of the result
cost
object | null