Free
Try the full engine
- 30 seconds/month
- Detailed indicators on every scan
- Full API access
- Detection history in dashboard
- Free forever — no trial period
- Chrome extension, unlimited seats
Complete documentation for integrating TruthScan's AI video detection API into your applications.
Try it out without code by visiting our FastAPI endpoint: https://detect-video.truthscan.com/docs
Pricing & credits
Each video detection request consumes credits from your account when processing completes.
Check your balance with GET /check-user-credits. View pricing plans
TruthScan uses API keys to allow access to the API. You can get your API key at the top of the page in our developer portal.
TruthScan expects for the API key to be included in all API requests to the server in a request body that looks like the following:
{
"key": "YOUR API KEY GOES HERE"
}You must replace YOUR API KEY GOES HERE with your personal API key.
The AI Video Detection workflow consists of two steps:
Detection Models
Select which ML model runs during the detection pipeline using the optional model parameter. If omitted, generic is used.
generic: General-purpose AI video detection model (default)faceswap: Dedicated Face Swap video detection modelBoth models use the same detection pipeline (metadata → watermark → ML) and return the same response format. Invalid model values return 422.
Upload a video file directly to the API, or submit a video URL. The server will validate the file.
Supported File Formats
mp4, mov, avi, mkv, webm
File Size Limits
Headers
key (required): Your API keyemail: Optional email addressuserkey: Optional integration user keyMultipart form-data
file (required): The video to analyzemodel: Detection model to use i.e generic or faceswap (optional, default: generic)POST https://detect-video.truthscan.com/detect-fileExample Request
curl -X POST \
'https://detect-video.truthscan.com/detect-file' \
-H 'accept: application/json' \
-H 'key: YOUR-API-KEY-GOES-HERE' \
-F 'file=@/path/to/video.mp4;type=video/mp4'Face Swap model example
curl -X POST \
'https://detect-video.truthscan.com/detect-file' \
-H 'accept: application/json' \
-H 'key: YOUR-API-KEY-GOES-HERE' \
-F 'file=@/path/to/video.mp4;type=video/mp4' \
-F 'model=faceswap'Optional Parameters
document_type: Type of document (default: Video)email: Email address for processingmodel: Detection model i.e generic or faceswap (default: generic)Headers
Content-Type: application/jsonBody (JSON)
key (required): Your API keyurl: https://ai-video-detector-prod.nyc3.digitaloceanspaces.com/<FILE_PATH>model: Detection model to use i.e generic or faceswap (optional, default: generic)POST https://detect-video.truthscan.com/detectExample Request
curl -X POST \
'https://detect-video.truthscan.com/detect' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"key": "YOUR-API-KEY-GOES-HERE",
"url": "https://example.com/video.mp4",
"model": "generic"
}'Face Swap model example
curl -X POST \
'https://detect-video.truthscan.com/detect' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"key": "YOUR-API-KEY-GOES-HERE",
"url": "https://example.com/video.mp4",
"model": "faceswap"
}'Optional Parameters
document_type: Type of document (default: Video)email: Email address for processingmodel: Detection model i.e generic or faceswap (default: generic)Example Response
{
"id": "77565038-9e3d-4e6a-8c80-e20785be5ee9",
"status": "pending"
}The response includes a unique video ID for tracking the detection status.
After submitting, poll the /query endpoint with the job id to retrieve status and results.
POST https://detect-video.truthscan.com/queryExample Request
curl -X POST 'https://detect-video.truthscan.com/query' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"id":"JOB-ID-GOES-HERE"}'Example Response
{
"id": "bfd136fc-666b-42d0-89cf-0e9690c98f21",
"status": "done",
"result": 0.101969311406719,
"result_details": {
"final_stage": "watermark",
"metadata": {
"status": "ok",
"prediction": "no_detection",
"confidence": 0.0
},
"watermark": {
"prediction": "ai_generated (watermark)",
"confidence": 1.0
},
"ml": {
"aggregate": {
"prob_fake": 0.1019693114067195,
"label": "cancelled",
"n_frames": 256,
"latency_sec": 23.319
}
},
"latency_sec": 24.017
},
"preview_url": null
}Result Details
status: "pending", "analyzing", "done", or "failed"result: Scalar AI-likelihood score in [0.0, 1.0] (higher means more likely AI-generated), derived from ML prob_fakefinal_stage: Last stage that contributed result: 'metadata', 'watermark', or 'ml'metadata: Always sets prediction: 'no_detection' and confidence: 0.0. Status can be 'reject', 'reencode', or 'ok'watermark: Heuristic that samples frames and computes pseudo-confidence from pixel varianceml: Classifier model run on sampled frames. Returns prob_fake in [0.0, 1.0] and label ('ai_generated' if prob_fake ≥ 0.5, else 'no_detection')latency_sec: Total pipeline timeThe "status" field will be one of: "pending" (processing is queued), "analyzing" (AI detection is in progress), "done" (results are available), or "failed" (processing failed).
This endpoint accepts the users apikey via the header. And returns users credit details.
GET https://detect-video.truthscan.com/check-user-creditsExample Request
curl -X 'GET' \
'https://detect-video.truthscan.com/check-user-credits' \
-H 'apikey: YOUR API KEY GOES HERE' \
-H 'accept: application/json' \
-H 'Content-Type: application/json'Example Response
{
"baseCredits": 10000,
"boostCredits": 1000,
"credits": 11000
}Check the health status of the API server.
GET https://detect-video.truthscan.com/healthExample Request
curl -X 'GET' \
'https://detect-video.truthscan.com/health' \
-H 'accept: application/json'Example Response
{
"status": "healthy"
}Most errors will be from incorrect parameters being sent to the API. Double check the parameters of each API call to make sure it's properly formatted, and try running the provided example code.
The generic error codes we use conform to the REST standard:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 403 | Forbidden -- The API key is invalid, or there aren't sufficient credits for video processing. |
| 404 | Not Found -- The specified resource doesn't exist. |
| 405 | Method Not Allowed -- You tried to access a resource with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't JSON. |
| 410 | Gone -- The resource at this endpoint has been removed. |
| 422 | Invalid Request Body -- Your request body is formatted incorrectly or invalid or has missing parameters. |
| 429 | Too Many Requests -- You're sending too many requests! Slow it down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
Cause: Invalid or expired API key
Solution:
Cause: Insufficient credits for video processing
Solution:
Cause: File format not supported
Solution:
Cause: Video file is too large
Solution:
Cause: Video file is below minimum size requirement
Solution:
Cause: File type validation failed (e.g., wrong MIME type or corrupted file)
Solution:
Cause: The model parameter is not generic or faceswap
Solution:
Cause: Processing failed (e.g., unreadable container, decode errors)
Solution:
Cause: Invalid user ID
Solution:
Cause: Unable to access or parse the uploaded file
Solution:
Get comprehensive AI video detection, with dedicated models for deepfakes and face swaps.
Free
Try the full engine
Starter
$1.50 / minute - $290/yr
For individuals and small teams
Professional
$1.00 / minute - $990/yr
For teams in production
Business
$0.50 / minute - $3,990/yr
For high-volume operations
Find answers to the most common questions about our AI video detection API.