api-docs

ContentVeritas API Documentation

Official API documentation for the ContentVeritas AI Content Authentication API.

Base URL: https://api.contentveritas.com


Quick Start (5-Minute Setup)

Step 1: Get Your API Key

  1. Visit contentveritas.com and click “Start 7-Day Free Trial”
  2. Choose your plan (Basic or Pro)
  3. Complete the signup form
  4. Check your email for your API key (arrives instantly)
  5. Important: Keep your API key secure and never expose it in client-side code

Step 2: Set Up Authentication

All API requests require your API key in the Authorization header using Bearer authentication.

Authentication Format:

Authorization: Bearer YOUR_API_KEY

Step 3: Make Your First API Call

Here’s how to verify if content is AI-generated:

Using cURL

curl -X POST https://api.contentveritas.com/verify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Your content to verify goes here. Make sure it is at least 50 words for best accuracy."
  }'

Using JavaScript (Node.js)

const fetch = require('node-fetch');

async function verifyContent(text) {
  const response = await fetch('https://api.contentveritas.com/verify', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ text })
  });
  
  const result = await response.json();
  return result;
}

// Example usage
const content = "Your content to verify goes here. Make sure it is at least 50 words for best accuracy.";
verifyContent(content).then(console.log);

Using Python

import requests

def verify_content(text):
    url = "https://api.contentveritas.com/verify"
    headers = {
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    }
    data = {"text": text}
    
    response = requests.post(url, headers=headers, json=data)
    return response.json()

# Example usage
content = "Your content to verify goes here. Make sure it is at least 50 words for best accuracy."
result = verify_content(content)
print(result)

Using PHP

<?php
function verifyContent($text) {
    $url = "https://api.contentveritas.com/verify";
    $headers = [
        "Authorization: Bearer YOUR_API_KEY",
        "Content-Type: application/json"
    ];
    $data = json_encode(["text" => $text]);
    
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    $response = curl_exec($ch);
    curl_close($ch);
    
    return json_decode($response, true);
}

// Example usage
$content = "Your content to verify goes here. Make sure it is at least 50 words for best accuracy.";
$result = verifyContent($content);
print_r($result);
?>

Understanding the Response

The API returns a JSON response with the following structure:

{
  "success": true,
  "data": {
    "isAiGenerated": true,
    "confidence": 87.5,
    "classification": "AI-Generated",
    "details": {
      "wordCount": 156,
      "processingTime": "0.18s"
    }
  },
  "timestamp": "2025-10-19T12:34:56Z"
}

Response Fields Explained

Field Type Description
success boolean Whether the request was successful
data.isAiGenerated boolean true if content is AI-generated, false if human-written
data.confidence number Confidence score from 0-100 (higher = more confident)
data.classification string Human-readable classification: “AI-Generated” or “Human-Written”
data.details.wordCount number Number of words analyzed
data.details.processingTime string Time taken to analyze the content
timestamp string ISO 8601 timestamp of the request

Interpreting Confidence Scores

Recommended Threshold: We recommend using a confidence threshold of 70+ for automated decisions.


Common Use Cases

1. Content Moderation for Blogs/Publishers

Verify submitted articles before publishing:

async function moderateArticle(articleText) {
  const result = await verifyContent(articleText);
  
  if (result.data.isAiGenerated && result.data.confidence > 70) {
    return {
      approved: false,
      reason: "Content appears to be AI-generated"
    };
  }
  
  return { approved: true };
}

2. Academic Integrity Checking

Check student submissions for AI usage:

def check_assignment(submission_text):
    result = verify_content(submission_text)
    
    if result['data']['isAiGenerated'] and result['data']['confidence'] > 80:
        return {
            "flagged": True,
            "confidence": result['data']['confidence'],
            "message": "Assignment flagged for potential AI usage"
        }
    
    return {"flagged": False}

3. Marketing Content Verification

Ensure marketing copy maintains authenticity:

async function verifyMarketingCopy(copyText) {
  const result = await verifyContent(copyText);
  
  return {
    isAuthentic: !result.data.isAiGenerated,
    confidence: result.data.confidence,
    recommendation: result.data.confidence > 70 
      ? "Use as-is" 
      : "Consider revision"
  };
}

4. Batch Processing Multiple Documents

Process multiple documents efficiently:

import asyncio
import aiohttp

async def verify_batch(texts):
    async with aiohttp.ClientSession() as session:
        tasks = []
        for text in texts:
            task = session.post(
                'https://api.contentveritas.com/verify',
                headers={
                    'Authorization': 'Bearer YOUR_API_KEY',
                    'Content-Type': 'application/json'
                },
                json={'text': text}
            )
            tasks.append(task)
        
        responses = await asyncio.gather(*tasks)
        results = [await r.json() for r in responses]
        return results

# Usage
texts = ["Document 1 content...", "Document 2 content...", "Document 3 content..."]
results = asyncio.run(verify_batch(texts))

Rate Limits and Best Practices

Rate Limits by Plan

Best Practices

  1. Content Length: For best accuracy, submit content with at least 50 words. Maximum 10,000 words per request.

  2. Batch Requests: If processing multiple documents, implement exponential backoff to handle rate limits gracefully.

  3. Cache Results: Cache verification results for content that doesn’t change to save API calls.

  4. Error Handling: Always implement proper error handling for network issues and rate limits.

  5. API Key Security:

    • Never expose your API key in client-side code
    • Use environment variables to store API keys
    • Rotate keys regularly for security

Troubleshooting

Common Issues and Solutions

Issue: “401 Unauthorized” Error

Cause: Invalid or missing API key

Solution:

# Correct format
Authorization: Bearer sk_live_abc123...

# Incorrect format (missing "Bearer")
Authorization: sk_live_abc123...

Issue: “429 Too Many Requests” Error

Cause: Rate limit exceeded

Solution:

async function verifyWithRetry(text, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    try {
      const result = await verifyContent(text);
      return result;
    } catch (error) {
      if (error.status === 429 && i < maxRetries - 1) {
        // Wait exponentially longer between retries
        await new Promise(r => setTimeout(r, Math.pow(2, i) * 1000));
      } else {
        throw error;
      }
    }
  }
}

Issue: Low Confidence Scores

Cause: Content is too short or ambiguous

Solution:

Issue: Slow Response Times

Cause: Network latency or server load

Solution:

const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 5000); // 5 second timeout

try {
  const response = await fetch('https://api.contentveritas.com/verify', {
    method: 'POST',
    headers: { /* ... */ },
    body: JSON.stringify({ text }),
    signal: controller.signal
  });
} catch (error) {
  if (error.name === 'AbortError') {
    console.log('Request timed out');
  }
} finally {
  clearTimeout(timeoutId);
}

Issue: “400 Bad Request” Error

Cause: Invalid request format or missing required fields

Solution:


API Response Codes

Code Meaning Action
200 Success Content verified successfully
400 Bad Request Check your request format
401 Unauthorized Verify your API key
429 Rate Limit Exceeded Wait and retry, or upgrade plan
500 Server Error Retry after a few moments
503 Service Unavailable Temporary outage, retry later

API Endpoints

POST /verify

Verify if content is AI-generated.

Request Body:

{
  "text": "Content to verify"
}

Response:

{
  "success": true,
  "data": {
    "isAiGenerated": false,
    "confidence": 92.3,
    "classification": "Human-Written",
    "details": {
      "wordCount": 245,
      "processingTime": "0.15s"
    }
  },
  "timestamp": "2025-10-19T12:34:56Z"
}

GET /health

Check API health status.

Response:

{
  "status": "healthy",
  "service": "ContentVeritas Technologies API",
  "version": "1.0.0"
}

Next Steps

Now that you’re up and running:

  1. Test Thoroughly: Use your 7-day free trial to test with your actual use cases
  2. Monitor Usage: Check your dashboard to track API calls and accuracy
  3. Implement Error Handling: Add robust error handling for production use
  4. Scale Up: Upgrade to Pro or Enterprise when you need more capacity
  5. Stay Updated: Check our changelog for new features and improvements

Support & Resources


Pricing Plans

Basic - $29/month

Pro - $99/month

Enterprise - Custom Pricing

All plans include a 7-day free trial with no credit card required.

Visit contentveritas.com to get started today!


Last Updated: October 19, 2025