AiVidect AiVidect Enterprise

API Documentation

Integrate AI video detection into your application with our REST API.

Quick Start

curl -X POST https://aividect.com/api/v1/analyze \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://instagram.com/reel/example"}'
Get your API key

Authentication

All API requests require authentication using an API key. Include your key in the Authorization header:

Authorization Header

Authorization: Bearer ak_xxxxxxxxxxxxxxxxxxxx

Generate and manage your API keys from your Account Settings.

Rate Limits

Free: 10 requests/day | Pro: 100 requests/day | Business: 1,000 requests/day | Enterprise: Unlimited

Endpoints

GET /api/v1/me

Get information about the current API key and user account.

Response

{ "success": true, "user": { "id": 123, "username": "john_doe", "email": "john@example.com", "tier": "pro", "credits_balance": 45 }, "api_key": { "name": "Production", "prefix": "ak_x7Kp9mN2", "daily_requests": 12, "daily_limit": 100 } }
POST /api/v1/analyze

Analyze a video from URL. Supports YouTube, TikTok, Instagram, Twitter, and direct video links. Each analysis costs 1 credit.

Request Body

Parameter Type Description
urlrequired string URL of the video to analyze

Example Request

curl -X POST https://aividect.com/api/v1/analyze \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://tiktok.com/@user/video/123"}'
import requests response = requests.post( "https://aividect.com/api/v1/analyze", headers={"Authorization": "Bearer YOUR_API_KEY"}, json={"url": "https://tiktok.com/@user/video/123"} ) result = response.json() if result["success"]: print(f"Result: {result['result']}") print(f"Confidence: {result['confidence']}%")
const response = await fetch("https://aividect.com/api/v1/analyze", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://tiktok.com/@user/video/123" }) }); const result = await response.json(); console.log(result.result, result.confidence);

Response

{ "success": true, "analysis_id": "a1b2c3d4e5f6", "result": "ai_generated", "confidence": 94.5, "prob_fake": 0.945, "prob_real": 0.055, "model": { "name": "VideoEfficientAttn", "version": "epoch25_auc0.95" }, "processing_time_ms": 4523, "credits_remaining": 44, "created_at": "2024-01-15T10:30:00Z" }
GET /api/v1/analysis/{id}

Retrieve a specific analysis result by its ID.

Path Parameters

Parameter Type Description
idrequired string The analysis ID returned from /analyze

Response

{ "success": true, "analysis": { "id": "a1b2c3d4e5f6", "result": "ai_generated", "confidence": 94.5, "source_type": "url", "source_url": "https://tiktok.com/...", "created_at": "2024-01-15T10:30:00Z" } }
GET /api/v1/analyses

List your recent analyses with pagination.

Query Parameters

Parameter Type Description
pageoptional integer Page number (default: 1)
per_pageoptional integer Results per page (default: 20, max: 100)
GET /api/v1/usage

Get API usage statistics and remaining limits.

Response

{ "success": true, "usage": { "credits_balance": 45, "analyses_today": 12, "analyses_week": 87, "analyses_month": 342 }, "limits": { "tier": "pro", "daily_api_limit": 100, "daily_api_used": 12, "daily_api_remaining": 88 } }

Error Codes

HTTP Code Error Code Description
400 INVALID_REQUEST Request body is not valid JSON
400 MISSING_URL URL parameter is required
400 DOWNLOAD_FAILED Could not download video from URL
401 MISSING_AUTH Authorization header is required
401 INVALID_KEY API key is invalid
401 KEY_REVOKED API key has been revoked
402 INSUFFICIENT_CREDITS No credits remaining
429 RATE_LIMIT_EXCEEDED Daily API limit exceeded
500 INTERNAL_ERROR Server error, try again later

Error Response Format

{ "success": false, "error": { "code": "INSUFFICIENT_CREDITS", "message": "No credits remaining. Please purchase more." } }

Ready to Get Started?

Generate your API key and start detecting AI videos in minutes.

Get Your API Key