Detect copyright infringement and IP violations
POST /v1/evaluate/copyrightThe Copyright Detection API identifies potential copyright infringement in AI-generated content, including verbatim copying, substantial similarity, trademark violations, and unauthorized use of proprietary code, text, or creative works. Essential for protecting your organization from IP litigation risks.
This API provides technical analysis only. Results should be reviewed by legal counsel for final copyright determinations. Not a substitute for professional legal advice.
curl -X POST "https://api.assurancehub.ai/v1/evaluate/copyright" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Can you help me write a sorting algorithm?",
"response": "Here is a bubble sort: Compare adjacent elements and swap them if in wrong order."
}'General algorithm descriptions will return low risk scores (near 0.0). Verbatim copyrighted code will return high scores (0.7+) with risk_level "reject".
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | The input prompt to analyze Example: Show me some code |
response | string | Required | The AI response to analyze for copyright violations Example: Here is an example implementation... |
import requests
def detect_copyright(prompt, response, api_key):
url = "https://api.assurancehub.ai/v1/evaluate/copyright"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
data = {
"prompt": prompt,
"response": response
}
response = requests.post(url, json=data, headers=headers)
return response.json()
# Example usage
result = detect_copyright(
prompt="Can you help me write a sorting algorithm?",
response="Here's a simple bubble sort: Compare adjacent elements and swap if needed.",
api_key="your_api_key"
)
print(f"Consensus Score: {result['final_consensus_score']}")
print(f"Risk Level: {result['evaluation']['risk_level']}")
print(f"Pass/Fail: {result['evaluation']['pass_fail']}")import requests
from typing import Dict
class CopyrightDetector:
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.assurancehub.ai"
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def detect_copyright(self, prompt: str, response: str) -> Dict:
"""Detect copyright violations in AI content"""
data = {
"prompt": prompt,
"response": response
}
resp = requests.post(
f"{self.base_url}/v1/evaluate/copyright",
json=data,
headers=self.headers
)
return resp.json()
# Usage
detector = CopyrightDetector("your_api_key")
result = detector.detect_copyright(
prompt="Show me React code",
response="Here's a React component example using hooks..."
)
print(f"Consensus Score: {result['final_consensus_score']}")
print(f"Risk Level: {result['evaluation']['risk_level']}")
print(f"Flagged: {result['evaluation']['flagged']}")The API returns consensus-based copyright analysis with detailed model reasoning:
{
"final_consensus_score": 0.075,
"consensus_confidence": 0.95,
"evaluation": {
"risk_level": "low",
"pass_fail": "pass",
"flagged": false
},
"consensus_analysis": {
"method": "simple",
"models_succeeded": 2,
"models_failed": 1,
"agreement_score": 0.978,
"calculation": [
{
"model": "gpt-4",
"individual_score": 0.0,
"confidence": 1.0,
"role": "primary"
},
{
"model": "deepseek-chat",
"individual_score": 0.15,
"confidence": 0.95,
"role": "tertiary"
}
]
},
"model_execution": {
"execution_mode": "redundant_2",
"total_latency_ms": 65604,
"cost_usd": 0.001917,
"pooling_used": true
},
"individual_model_details": [
{
"model": "gpt-4",
"role": "primary",
"status": "success",
"score": 0.0,
"confidence": 1.0,
"latency_ms": 10267,
"reasoning": "The response provides a general description of a bubble sort algorithm, which is common knowledge."
}
],
"risk_assessment": {
"thresholds": {
"acceptable": 0.2,
"review_needed": 0.4,
"reject": 0.532
},
"risk_factors": [],
"model_agreement": "very_high",
"consensus_quality": "good"
},
"metadata": {
"test_type": "copyright",
"test_type_optimized": true,
"evaluation_timestamp": "2025-10-16T19:52:50Z",
"evaluator_version": "1.0.0-enterprise-copyright"
}
}final_consensus_score - Risk score (0.0-1.0)evaluation - Risk level and pass/fail statusconsensus_analysis - Model agreement detailsindividual_model_details - Per-model analysisrisk_assessment - Thresholds and factors