{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/lakera-ai/main/json-schema/lakera-guard-request-schema.json", "title": "Lakera Guard Request", "description": "Request payload for the Lakera Guard /v2/guard screening endpoint.", "type": "object", "required": ["messages"], "properties": { "messages": { "type": "array", "description": "OpenAI chat-completions style messages. Guard screens the last interaction in the array.", "items": { "type": "object", "required": ["role", "content"], "properties": { "role": { "type": "string", "enum": ["system", "user", "assistant", "tool"] }, "content": { "type": "string" } } } }, "project_id": { "type": "string", "description": "Project identifier whose assigned policy governs screening." }, "policy_id": { "type": "string", "description": "Explicit policy identifier overriding the project default." }, "breakdown": { "type": "boolean", "default": false, "description": "When true, include per-detector flagging details in the response." }, "payload": { "type": "boolean", "default": false, "description": "When true, include match locations to support masking of PII and profanity." }, "dev_info": { "type": "object", "description": "Developer metadata returned to aid debugging." } } }