This detector identifies potential leaks of copyrighted material or intellectual property in the generated text. It helps protect against unintended use or distribution of protected content.

Example request:

import requests
import json
import os

url = "https://api.enkryptai.com/guardrails/detect"

payload = json.dumps({
    "text": "The invention includes dust sensors that measure the accumulation of particles on the surface.",
    "detectors": {
        "copyright_ip": {
            "enabled": True
        }
    }
})

headers = {
    'Content-Type': 'application/json',
    'api_key': os.getenv('ENKRYPTAI_API_KEY')
}

response = requests.request("POST", url, headers=headers, data=payload)

formatted_response = json.dumps(json.loads(response.text), indent=4)
print(formatted_response)

Example response:

{
    "summary": {
        "copyright_ip_similarity": 0.6765570640563965
    },
    "details": {
        "copyright_ip": {
            "similarity_score": 0.6765570640563965
        }
    }
}