Veritas AI API

Advanced multi-model spam detection, toxicity, sentiment, and content safety via a simple REST API.

Multi-model Real-time Developer-friendly

Getting Started

Welcome to Veritas AI. Use our REST API to run comprehensive spam detection and content analysis with specialized models.

Why Veritas?

  • Specialized models for spam, toxicity, sentiment, and safety
  • High accuracy with model consensus
  • Global support across 20+ languages
  • Real-time low-latency responses
  • Simple REST integration

Quick Example

curl
curl -X POST https://spam.audent.ai/check \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your-api-key" \
  -d '{
    "text": "Congratulations! You'\''ve won a $1,000 gift card!"
  }'
Response 200 OK
{
  "processing_time": 482,
  "results": {
    "bert": { "result": "Not Spam", "processing_time": 2 },
    "otis": { "result": { "prediction": "Spam", "probability": 0.9999 }, "processing_time": 4 },
    "roberta": { "result": "Spam", "processing_time": 393 },
    "sentiment": { "result": { "label": "Very Negative", "score": 0.55 }, "processing_time": 21 }
  }
}

Authentication

Include your API key in the header of each request.

API Key Header

Send your key via X-API-KEY:

HTTP Header
X-API-KEY: your-api-key-here

Demo Access

For testing, use the demo key:

X-API-KEY: demo

Note: Demo is limited to 1 request every 5 seconds.

Security Tips

  • Do not expose your API key in client-side code
  • Store keys in environment variables
  • Rotate keys periodically
  • Monitor usage

API Endpoints

Use the comprehensive endpoint or call individual models.

POST https://spam.audent.ai/check
Run all available models for a complete analysis of spam, sentiment, toxicity, and safety.
curl
curl -X POST https://spam.audent.ai/check \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your-api-key" \
  -d '{
    "text": "Congratulations! You'\''ve won a $1,000 gift card!"
  }'

Request Body

JSON
{
  "text": "Your text content to analyze"
}

Example Response

200 OK - Success 200
{
  "is_spam": true,
  "processing_time": 643,
  "results": {
    "bert": { "is_spam": false, "processing_time": 6, "result": "Not Spam" },
    "bertsms": { "is_spam": false, "processing_time": 0, "result": { "probability": 0.9273, "type": "Not Spam" } },
    "detoxify": { "processing_time": 45, "result": { "details": [...], "prediction": { "label": "ok", "probability": 0.00083 } } },
    "koala": { "processing_time": 77, "result": { "details": [...], "prediction": "OK" } },
    "otis": { "is_spam": true, "processing_time": 5, "result": { "prediction": "Spam", "probability": 0.99996 } },
    "roberta": { "is_spam": true, "processing_time": 489, "result": "Spam" },
    "sentiment": { "processing_time": 20, "result": { "label": "Very Negative", "score": 0.5498 } }
  },
  "spam_detections_count": 2,
  "spam_detectors_count": 4
}
POST https://spam.audent.ai/{model}
Call a specific model. Replace {model} with one of: bert, bertsms, koala, otis, roberta, detoxify, sentiment, unicodedetect
  • /bert — BERT MoE spam detection
  • /bertsms — BERT Tiny SMS
  • /koala — Content safety
  • /otis — Advanced spam intelligence
  • /roberta — Enterprise spam
  • /sentiment — Multilingual sentiment
  • /detoxify — Toxicity detection
  • /unicodedetect — Unicode spam patterns
POST https://spam.audent.ai/unicodedetect
Detect suspicious Unicode usage indicative of obfuscation or spam.

Request Body

JSON
{
  "text": "Your text content to analyze",
  "threshold": 0.15
}

Example Response

200 OK - Success 200
{
  "result": {
    "prediction": "Spam",
    "suspicious_ratio": 0.25,
    "threshold_used": 0.15
  },
  "processing_time": 12,
  "rate_limit": {
    "limits": [
      { "limit": "60 per minute", "remaining": 59, "reset_at": "2023-10-01T12:00:00Z" }
    ]
  }
}
POST https://spam.audent.ai/checkspam
Run only spam-focused models (BERT, RoBERTa, Otis, BERT SMS) for faster spam checks.

Request Body

JSON
{
  "text": "Your text content to analyze"
}

Example Response

200 OK - Success 200
{
  "results": {
    "bert": { "result": "Not Spam", "processing_time": 6, "is_spam": false },
    "roberta": { "result": "Spam", "processing_time": 489, "is_spam": true },
    "otis": { "result": { "prediction": "Spam", "probability": 0.9999 }, "processing_time": 5, "is_spam": true },
    "bertsms": { "result": { "type": "Not Spam", "probability": 0.9273 }, "processing_time": 2, "is_spam": false },
    "detoxify": { "result": { "prediction": {"label": "ok", "probability": 0.001}, "details": [...] }, "processing_time": 45 }
  },
  "processing_time": 547,
  "is_spam": true,
  "spam_detections_count": 2,
  "spam_detectors_count": 4,
  "rate_limit": {
    "limits": [ { "limit": "60 per minute", "remaining": 58, "reset_at": "2023-10-01T12:00:00Z" } ]
  }
}
POST https://spam.audent.ai/checktoxicity
Run toxicity analysis using Detoxify.

Request Body

JSON
{
  "text": "Your text content to analyze"
}

Example Response

200 OK - Success 200
{
  "results": {
    "detoxify": {
      "result": {
        "prediction": { "label": "toxicity", "probability": 0.9977 },
        "details": [
          {"label": "toxicity", "probability": 0.9977},
          {"label": "severe_toxicity", "probability": 0.6995},
          {"label": "obscene", "probability": 0.9852},
          {"label": "threat", "probability": 0.0449},
          {"label": "insult", "probability": 0.9720},
          {"label": "identity_attack", "probability": 0.9054}
        ]
      },
      "processing_time": 42
    }
  },
  "processing_time": 50,
  "is_toxic": true,
  "toxic_detections_count": 1,
  "toxic_detectors_count": 1,
  "rate_limit": {
    "limits": [ { "limit": "60 per minute", "remaining": 57, "reset_at": "2023-10-01T12:00:00Z" } ]
  }
}
POST https://spam.audent.ai/testconfig
Test custom configuration payloads (no auth) to evaluate thresholds and routing.

Request Body

JSON
{
  "text": "Your text content to analyze",
  "config": {
    "preprocessing": { "settings": { "strip_urls": true, "strip_emails": true, "strip_phone_numbers": true } },
    "spam": {
      "models": {
        "roberta": { "enabled": true, "authoritative": false },
        "bert": { "enabled": true, "authoritative": true },
        "otis": { "enabled": true, "required_probability": 80 }
      },
      "spam_detection_logic": { "default_threshold": 2 }
    },
    "toxicity": { "models": { "detoxify": { "enabled": true } }, "threshold": 0.15 }
  }
}

Example Response

200 OK - Success 200
{
  "results": {
    "preprocessing": { "result": { "stripped_urls": 1, "stripped_emails": 0, "stripped_phone_numbers": 0 }, "sanitized_text": "Check out this amazing offer!" },
    "roberta": { "result": "Spam", "processing_time": 412, "is_spam": true },
    "bert": { "result": "Spam", "processing_time": 8, "is_spam": true },
    "otis": { "result": { "prediction": "Spam", "probability": 0.9999 }, "processing_time": 6, "is_spam": true },
    "detoxify": { "result": { "prediction": {"label": "ok", "probability": 0.001}, "details": [...] }, "processing_time": 38 }
  },
  "processing_time": 464,
  "is_spam": true,
  "spam_detections_count": 3,
  "spam_detectors_count": 3,
  "is_toxic": false,
  "is_ai": false
}

Error Responses

Rate Limit Exceeded 429
{
  "error": "Rate limit exceeded",
  "message": "Please wait before making another request",
  "retry_after": 5
}
Invalid Request 400
{
  "error": "Invalid request",
  "message": "Missing required field: text"
}

AI Models Overview

Choose a specific model for your use case or run them all for comprehensive analysis.

Otis
Anti-spam intelligence for phishing, scams, and unwanted outreach.
PrecisionMaliciousReal-time
RoBERTa
Enterprise-grade spam and link protection at scale.
EnterpriseURL SafetyHardened
BERT MoE v2.2
Mixture-of-Experts architecture for diverse spam patterns.
MoEAdaptiveScalable
BERT Tiny SMS
Lightweight detection optimized for short texts.
SMSLow LatencyEfficient
Koala AI
Content moderation across 9 safety categories.
9 CategoriesCommunity SafetyResponsible
Sentiment
Multilingual 5-class sentiment across 20+ languages.
Multilingual5-ClassContext
Detoxify
Toxicity detection with granular probabilities.
GranularAccurateResearch
Unicode Detection
Flags suspicious Unicode obfuscation patterns.
ObfuscationPatternsCharacter-level
AI Detection
Classifies Human vs AI and attributes likely model.
AI vs HumanAttributionConfidence

Rate Limits & Usage

Limits vary by plan. Values below are examples.

Plan Requests / Min Requests / Day Concurrent Response Time
Demo1 (1/5s)5001Best effort
Starter601,5003< 2s
Professional12010,00010< 1s
Enterprise1,000Unlimited25< 600ms

Rate Limit Headers

Each response includes rate limit metadata:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1640995200

Handling 429

Use exponential backoff when you receive 429 responses:

JavaScript
async function makeAPIRequest(text, retries = 3) {
  for (let i = 0; i < retries; i++) {
    const res = await fetch('https://spam.audent.ai/check', {
      method: 'POST',
      headers: { 'Content-Type': 'application/json', 'X-API-KEY': 'your-api-key' },
      body: JSON.stringify({ text })
    });
    if (res.status === 429) {
      const retryAfter = Number(res.headers.get('Retry-After')) || Math.pow(2, i);
      await new Promise(r => setTimeout(r, retryAfter * 1000));
      continue;
    }
    return await res.json();
  }
}

Ready to get started?

Protect your app with Veritas AI spam and safety models.

Live Demo Get API Key