API Endpoint
https://api.patas.app/api/v1/analyzeAPI Key
patas_demo_key_click_generateQuick Start
1 Prepare your data
Format your messages as JSON array:
[
{
"id": "msg_001",
"text": "Buy now! http://spam.com",
"is_spam": true
},
{
"id": "msg_002",
"text": "Hello, how are you?",
"is_spam": false
}
]2 Make API request
curl -X POST https://api.patas.app/api/v1/analyze \
-H "Content-Type: application/json" \
-H "X-Use-LLM: true" \
-d '{
"messages": [
{"id": "msg_001", "text": "Buy now! http://spam.com", "is_spam": true},
{"id": "msg_002", "text": "Hello", "is_spam": false}
],
"run_mining": true,
"run_evaluation": true,
"export_backend": "sql",
"profile": "balanced",
"simple_mode": false
}'3 Get results
The API returns discovered patterns, generated rules, and metrics (precision, recall, coverage).
Python Example
import requests
url = "https://api.patas.app/api/v1/analyze"
response = requests.post(
url,
json={
"messages": [
{"id": "msg_001", "text": "Buy now!", "is_spam": True},
{"id": "msg_002", "text": "Hello", "is_spam": False}
],
"run_mining": True,
"run_evaluation": True,
"export_backend": "sql",
"profile": "balanced",
"simple_mode": False
},
headers={
"Content-Type": "application/json",
"X-Use-LLM": "true"
}
)
result = response.json()
print(f"Discovered {len(result['patterns'])} patterns")
print(f"Generated {len(result['rules'])} rules")Rate Limits
Free tier: 10 requests per minute
Maximum 1000 messages per request
LLM-enabled requests may take longer (30-60 seconds)
Documentation
For full API documentation and technical specifications, contact @kiku_JW on Telegram.
Contact on Telegram