OriginAI API
The HTTP API behind this website. Send a video file or a public video link, then ask for the result. It's free and needs no key, but it's a test service for our thesis, so it can be slow, busy or offline.
Base URLhttps://real-originai.com
Before You Begin
Six things to know before you write any code.
One base URL
Every path on this page starts with https://real-originai.com. Answers are JSON, except evidence images, which are JPEG files.
No keys
There are no accounts or API keys. A check's id is all it takes to read its result, so treat ids like private links.
Call it from a server
Use it from your backend, a script or the command line. Browsers don't let a page on another website read the answers, because the API doesn't allow cross-origin requests.
One shared line
The GPU runs 3 checks at once and up to 50 more wait in line. There's no limit per IP address at the moment, but everyone shares that line, so start only the checks you need.
The GPU may need to start
Checks run on a rented GPU that shuts down when no one is using it. The first check after a quiet spell waits for it to start: often a few minutes, but up to about half an hour when a new GPU has to be set up. The server waits up to scan_timeout_seconds (about 49 minutes) before it reports a timeout.
Kept for 1 hour
Uploaded videos are deleted as soon as their check ends. Results and evidence images are deleted an hour after the check finishes, and asking for them then returns 404.
Quick Start
Checks run in the background. Start one, then ask for the result every few seconds until it's ready. You don't keep a connection open while you wait.
Pick a detector
Four detectors, each trained on a different kind of deepfake:
veni-hq,veni-lq,vidiandvici. See The Detectors.GET /api/modelsStart a check
Send one video file as
videoand a detector id asmodel, as multipart form data. The answer is202with the check'sid. For a public video link, usePOST /api/analyses/linkinstead.POST /api/analysesGet the result
Ask every 3 to 5 seconds.
statusstaysprocessinguntil it becomescompleted,failedorcanceled.GET /api/analyses/{id}
# Start a check: one video file and a detector id
curl -F "video=@clip.mp4" -F "model=veni-hq" https://real-originai.com/api/analyses
# Check only part of the video: seconds 12 to 20
curl -F "video=@clip.mp4" -F "model=veni-hq" -F "start_s=12" -F "end_s=20" \
https://real-originai.com/api/analyses
# Ask for the result every few seconds, with the id from the answer
curl https://real-originai.com/api/analyses/ID
# Or check a public video link instead of a file
curl -H "Content-Type: application/json" \
-d '{"url": "https://www.tiktok.com/@user/video/1234567890", "model": "vidi"}' \
https://real-originai.com/api/analyses/link import time
import requests
BASE = "https://real-originai.com"
# 1. Start a check: one video file and a detector id
with open("clip.mp4", "rb") as video:
answer = requests.post(f"{BASE}/api/analyses", files={"video": video},
data={"model": "veni-hq"}, timeout=300)
check = answer.json()
if answer.status_code != 202:
raise SystemExit(f"Refused ({answer.status_code} {check['code']}): {check['detail']}")
# 2. Ask for the result every few seconds
while check["status"] == "processing":
time.sleep(3)
check = requests.get(f"{BASE}/api/analyses/{check['id']}", timeout=60).json()
# 3. Read it
if check["status"] == "completed":
print(check["pred"], check["prob_fake"], "line:", check["threshold"])
else:
print(check["status"], check.get("reason"), check.get("error")) import { openAsBlob } from "node:fs";
const BASE = "https://real-originai.com";
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
// 1. Start a check: one video file and a detector id
const form = new FormData();
form.append("model", "veni-hq");
form.append("video", await openAsBlob("clip.mp4"), "clip.mp4");
const answer = await fetch(`${BASE}/api/analyses`, { method: "POST", body: form });
let check = await answer.json();
if (answer.status !== 202) throw new Error(`Refused (${answer.status} ${check.code}): ${check.detail}`);
// 2. Ask for the result every few seconds
while (check.status === "processing") {
await sleep(3000);
check = await (await fetch(`${BASE}/api/analyses/${check.id}`)).json();
}
// 3. Read it
if (check.status === "completed") console.log(check.pred, check.prob_fake, "line:", check.threshold);
else console.log(check.status, check.reason, check.error); We ran each example above against the live API before publishing it. Each one checks clip.mp4 with Veni HQ and prints the result.
A Real Example
These are real answers from the live API, for one of our sample clips: a FaceForensics++ deepfake checked with Veni HQ. Long lists are shortened to their first entries.
{
"id": "ef31031ad61f495a9d9b3231c9f221cc",
"status": "processing",
"stage": "analyzing",
"model": {
"id": "veni-hq",
"name": "Veni HQ",
"architecture": "SwinFusion++",
"dataset": "FaceForensics++ C23 (HQ)"
},
"created": 1794596510.764694,
"source": {
"type": "upload",
"name": "clip.mp4",
"size": 1250278
}
} {
"status": "processing",
"stage": "queued",
"queue": {
"position": 2,
"ahead": 1,
"running": 3,
"slots": 3,
"waiting": 2
}
} {
"id": "ef31031ad61f495a9d9b3231c9f221cc",
"status": "completed",
"stage": "completed",
"model": {
"id": "veni-hq",
"name": "Veni HQ",
"architecture": "SwinFusion++",
"dataset": "FaceForensics++ C23 (HQ)"
},
"created": 1794596510.764694,
"source": {
"type": "upload",
"name": "clip.mp4",
"size": 1250278
},
"pred": "DEEPFAKE",
"prob_fake": 0.9001883723089409,
"raw_prob_fake": 0.9822574701352663,
"threshold": 0.6629230724944791,
"video_logit": 4.013888888888889,
"aggregation": "mean_clip_logit",
"meta": {
"width": 1280,
"height": 720,
"fps": 25.0,
"duration": 12.36
},
"coverage": {
"mode": "every_frame_phased",
"duration": 12.36,
"fps": 25.0,
"width": 1280,
"height": 720,
"rotation": 0,
"decoder": "torchcodec-cpu",
"device": "cuda",
"frames_decoded": 309,
"frames_analyzed": 309,
"subsample": 1,
"face_frames": 309,
"ambiguous_frames": 0,
"phases": 8,
"frame_spacing_s": 0.32,
"trained_spacing_s": 0.34,
"clips": 27,
"clip_length": 16,
"segments": 8,
"timeline_segments": 4,
"analyzed_start_s": 0.0,
"analyzed_end_s": 12.32,
"fallback": null
},
"clips": [
{
"index": 0,
"start_s": 2.4,
"end_s": 4.8,
"logit": 3.3558,
"prob": 0.8628,
"clips": 11,
"heatmap": true
},
{
"index": 1,
"start_s": 4.8,
"end_s": 7.2,
"logit": 2.3184,
"prob": 0.7808,
"clips": 4,
"heatmap": true
}
],
"protocol": {
"available": true,
"clip_count": 3,
"video_logit": 6.3125,
"prob_fake": 0.9694922333893864,
"raw_prob_fake": 0.9981897889737974,
"pred": "DEEPFAKE",
"clip_logits": [7.3125, 7.15625, 4.46875],
"track_frames": 64
},
"heatmaps": {
"method": "Grad-CAM (final stage of both SwinFusion++ encoders)",
"target": "DEEPFAKE",
"scale": "relative within this video",
"frame_size": [480, 270],
"crop_size": [224, 224],
"stops": [
[0.0, [116, 50, 130, 0]],
[0.15, [130, 52, 150, 40]]
],
"clips": [
{
"clip_index": 3,
"role": "top",
"clip_start_s": 7.36,
"clip_end_s": 12.16,
"clip_prob": 0.9724,
"frames": [
{
"t": 7.36,
"peak": 0.727,
"frame": "/api/analyses/ef31031ad61f495a9d9b3231c9f221cc/media/c3_f0_frame.jpg",
"frame_heat": "/api/analyses/ef31031ad61f495a9d9b3231c9f221cc/media/c3_f0_frame_heat.jpg",
"crop": "/api/analyses/ef31031ad61f495a9d9b3231c9f221cc/media/c3_f0_crop.jpg",
"crop_heat": "/api/analyses/ef31031ad61f495a9d9b3231c9f221cc/media/c3_f0_crop_heat.jpg"
}
]
}
]
},
"timings": {
"decode_detect_align": 1.51,
"stage_decode_wait": 0.79,
"stage_detect": 0.3,
"stage_align_embed": 0.19,
"stage_previews": 0.06,
"protocol": 0.06,
"tracking": 0.0,
"inference": 0.49,
"heatmaps": 0.14,
"total": 2.22
}
} {
"id": "880c5026e7bb4b1f94a167c25c2f8b1c",
"status": "failed",
"stage": "failed",
"model": {
"id": "veni-hq",
"name": "Veni HQ",
"architecture": "SwinFusion++",
"dataset": "FaceForensics++ C23 (HQ)"
},
"created": 1791548186.0778859,
"source": {
"type": "upload",
"name": "no-face.mp4",
"size": 43354
},
"reason": "no_face",
"error": "No face was detected in the video."
} {
"detail": "This video is shorter than 10 seconds. Choose a video between 10 seconds and 2 minutes.",
"code": "too_short"
} Endpoints
Everything the website itself uses. GET endpoints also answer HEAD.
| Request | Send | Answer |
|---|---|---|
POST /api/analyses | Multipart form data: video (one file) and model (a detector id). Optional: start_s and end_s, the part of the video to check, in seconds. | 202 with the new check. A video that breaks the rules is refused before it reaches the GPU. |
POST /api/analyses/link | JSON {"url": "…", "model": "vidi"}, a public video from a platform in /api/link-sources. Optional: "start_s" and "end_s", as for an upload. | 202 with the new check, "stage": "fetching" and a source naming the platform. Once the video is downloaded, the check joins the line like an upload. |
GET /api/analyses/{id} | Nothing. | 200 with the check. See Inside A Result. |
POST /api/analyses/{id}/cancel | Nothing. | 200 with the check, now "status": "canceled". Works while the stage is fetching or queued; after that the answer is 409 and the check carries on. |
GET /api/analyses/{id}/media/{name} | Nothing. The paths come ready-made in the result's heatmaps. | 200 with a JPEG evidence image. |
GET /api/models | Nothing. | {"models": [{"id", "name", "architecture", "dataset"}, …]} |
GET /api/capacity | Nothing. | Whether you can start a check right now (accepting, plus detail and code when not), how busy the GPU is (queue), scan_timeout_seconds and the video limits. |
GET /api/link-sources | Nothing. | Whether links work right now (enabled), the accepted platforms with their hosts, the known off_platforms, and the limits. |
POST /api/links/inspect | JSON {"url": "…"} | The video's platform, title, duration, width, height, size and format, without checking it. Use it to show a preview before you start a check. |
GET /api/health | Nothing. | "status": "ready" when the service can take checks, and the detector ids. It doesn't start a GPU. |
The Detectors
All four detectors are SwinFusion++ ("architecture": "SwinFusion++"), each trained on a different dataset. Each has its own line (threshold). A score at or above it means DEEPFAKE. Every result also includes the line it was judged against, so compare a score only with that line.
model | Name | Best for | dataset | threshold | aggregation |
|---|---|---|---|---|---|
veni-hq | Veni HQ | Clear, good-quality video | FaceForensics++ C23 (HQ) | 0.6629 | mean_clip_logit |
veni-lq | Veni LQ | Forwarded or re-uploaded video | FaceForensics++ C40 (LQ) | 0.6199 | mean_clip_logit |
vidi | Vidi | Looks almost too perfect | Celeb-DF v2 | 0.3666 | mean_clip_logit |
vici | Vici | Dark, shaky or noisy video | DeeperForensics-1.0 | 0.9237 | mean_clip_logit |
auto | Auto | Not sure: the server looks at a few frames and picks Vici (dark, shaky or grainy), Veni LQ (blurry, blocky or small) or Vidi. The answer's auto field says why. | The picked one's | The picked one's | The picked one's |
Thresholds are rounded here; the exact value comes with each result. Compare the detectors
Statuses And Stages
status says whether the check is still running. stage says what it's doing. A check moves through these in order and never goes back.
stage | status | What's happening | Cancel? |
|---|---|---|---|
fetching | processing | Links only: the server is downloading the video (up to 2 minutes). | Yes |
queued | processing | Waiting for one of the GPU's places. The answer includes queue: your position (1 is next), the checks ahead of you, the checks running out of the GPU's slots, and how many are waiting in all. | Yes |
analyzing | processing | On the GPU. Most checks take under a minute here, plus a few minutes if the GPU has to start first. | No |
completed | completed | Done. The result fields are filled in. | No |
failed | failed | The check couldn't finish. reason says why and error explains it in words. | No |
canceled | canceled | Taken out of the line before the GPU started. | No |
The GPU runs up to 3 checks at once, and up to 50 more can wait in line. Canceling frees your place, so you can start another check right away.
Inside A Result
Every answer from GET /api/analyses/{id} has id, status, stage, model, created and source. The rest depends on the status.
| Field | What it means |
|---|---|
id | The check's id: 32 hexadecimal characters. |
model | The detector: id, name, its architecture (SwinFusion++) and the dataset it was trained on. |
auto | Only when model was auto: why that detector was picked. reason is one of dark, shaky, grainy, blurry, blocky, small, clean or unchecked. |
created | When the check was created, in Unix seconds. The result is deleted one hour after the check finishes. |
source | What was checked. For an upload: type "upload", the file's name and size in bytes. For a link: type "link" and the platform, plus the video's title, duration, width, height and format once it's downloaded. |
part | Only when you asked for part of the video: the start_s and end_s that are checked, in seconds. Send both or neither. The part must be at least 3 seconds long; an end past the video's end is cut there, and a part that covers the whole video counts as no part. Times in the result stay those of the whole video. |
pred | The verdict: DEEPFAKE or REAL. |
prob_fake | The calibrated score from 0 to 1. pred is DEEPFAKE when it's at or above threshold. |
threshold | The detector's own line, fixed when it was tested. |
raw_prob_fake, video_logit, aggregation | The score before calibration, the combined raw score, and how the clip scores were combined (mean_clip_logit). |
meta | The video's width, height, fps and duration in seconds. |
coverage | What was checked: frames_analyzed out of frames_decoded, how many face_frames, the number of clips scored and their clip_length, and the seconds from analyzed_start_s to analyzed_end_s. window is the part that was read (start_s, end_s) and whether you chose it (chosen). mode is every_frame_phased for a whole-video check. When too few frames showed a usable face, mode is protocol_fallback and fallback gives the reason. Such a result is less reliable. |
clips | The timeline: the video in equal parts, each with start_s, end_s, its score prob (and logit) averaged over the clips scored around that time, and heatmap, which says whether a moment with evidence images falls in it. |
heatmaps | The moments with evidence images: the most suspicious parts of the video (role "top") and the least suspicious ("lowest"). Each has its own clip_start_s, clip_end_s and score clip_prob, and frames with the time t and image paths: frame, frame_heat, crop and crop_heat. Its clip_index is not an index into clips. Around them: how the maps were made (method), the verdict they explain (target), the image sizes, and the color scale (stops). |
protocol | Extra numbers, not part of the verdict: seven short clips scored the way the detector was tested in the study, with their clip_logits. They cover less of the video, so they can differ from pred. When it can't run, available is false and message says why. |
timings | How long each step took on the GPU, in seconds. total is the whole GPU time. |
reason, error | When the check failed or was canceled: a short code, and a message you can show to people. See Errors. |
Errors
A refused request answers with an HTTP error and JSON: a detail message you can show to people and a code your app can check. A check that started but couldn't finish is not an HTTP error; it ends with "status": "failed" and a reason.
Refused requests
| HTTP | code | When |
|---|---|---|
| 400 | unknown_model, no_file, bad_format, empty, not_video, too_short, too_long, resolution_low, resolution_high, bad_part, part_too_short, invalid_request | The detector id, the file, the part to check or the request body is wrong. Uploads are checked before they reach the GPU. |
| 400 | invalid_url, unsupported, platform_off, private, not_shared, unavailable, no_video, no_such_video, photo_post, live, playlist, expired, region, blocked, refused, processing, other_platform, no_format, busy | Links: the link isn't a public video from an accepted platform, or the platform won't give it to us right now. |
| 404 | not_found | The check doesn't exist or has expired, or the path is wrong. |
| 405 | method_not_allowed | Wrong HTTP method for that path. |
| 409 | already_running, finished | Too late to cancel. |
| 413 | too_large | The video is over 250 MB, or a JSON body is over 64 KB. |
| 429 | visitor_busy, busy, too_many_links | Your previous check is still in line or running; the line is full; or too many link requests from you in 10 minutes. Wait, then try again. |
| 502 | fetch_failed | Links: the platform didn't send the video. |
| 503 | not_configured, links_off, busy | The detectors or link support are switched off, or the server is already looking up several other links. |
| 504 | too_slow | Links: looking up the link took more than a minute. |
Failed checks ("status": "failed")
reason | What happened |
|---|---|
no_face, low_detection_confidence | No face was found, or not clearly enough. Use a clip where one face is clearly visible. |
identity_track_failed, multiple_face_ambiguity | One face couldn't be followed through the video. |
insufficient_valid_frames, insufficient_valid_clips | Too few frames showed a usable face. |
bad_part, part_too_short, range_too_short | The part to check doesn't fit the video: it starts after the video ends, or less than 3 seconds of it are inside the video. For a link this is only known once the video is downloaded. |
decode_failed, metadata_error | The video couldn't be read. Export it again as MP4 (H.264). |
timeout, worker_unreachable, unavailable, rejected | The GPU didn't answer in time or couldn't be reached. Try again in a few minutes. |
server_restarted | The server restarted during the check. Start it again. |
| A link code | Links only: downloading the video failed, with one of the link codes above, too_slow or fetch_failed. |
Limits
GET /api/capacity and GET /api/link-sources report the video limits, so your app can read them instead of hard-coding them.
Videos
- MP4, MOV, WebM or MKV, up to 250 MB
- 10 seconds to 2 minutes long
- 360p to 1080p, measured on the shorter side
- A part to check (
start_s,end_s) is at least 3 seconds long - Links: public videos from TikTok, Facebook, X (Twitter) and Reddit
Requests
- No limit on checks per IP address at the moment
- 300 link requests (look-ups and link checks together) per IP address every 10 minutes
- 3 checks on the GPU at once, up to 50 waiting
- No daily limit at the moment
Sharing Results With Your Users
Most of your users won't be experts. A few rules keep the results honest.
Show every state
Show when a check is waiting in line, running, done, failed or canceled, and let people try again without uploading again.
Keep the context
Show the detector, what it was trained on and its threshold next to every result.
Don't call it proof
Describe the result as one clue, and point people to other ways of checking a video.
Want To Build With OriginAI?
This API is here for our thesis demo. If you'd like to use it in a project, or something here doesn't match what the API does, tell us.