AI Image & Video Detection API
Detect AI-generated and AI-edited images and videos with a single HTTPS request. Each response contains a verdict, the model's AI probability, and any provenance evidence (content credentials, watermarks) as separate fields.
1. Authentication
Include your API key as a bearer token in every request. Your key is shown in your account dashboard and can be regenerated there at any time. Keep it server-side; do not embed it in client applications. Only files that are successfully processed are charged to your account.
Authorization: Bearer YOUR_API_KEY2. Endpoints
Base URL: https://api.wasitaigenerated.com
| Endpoint | Input | Use |
|---|---|---|
| POST /v1/detect/image | multipart file, or JSON {"image_url": "..."} | Single image: JPEG, PNG, WebP, up to 25 MB |
| POST /v1/detect/video | multipart file, or JSON {"video_url": "..."} | Video clip: MP4, MOV, WebM, AVI, MKV, up to 200 MB |
| POST /v1/detect/batch | JSON {"images": [{"id", "url"}]} | Up to 10 image URLs per request; results are returned in the same order |
Optional on every endpoint: id (your own reference, echoed back) and profile (see section 5). URLs must be publicly reachable over http(s).
3. Image response
{
"id": "your-ref-001",
"media_type": "image",
"verdict": "ai_generated",
"ai_probability": 0.9731,
"risk_level": "high",
"threshold_profile": "balanced",
"verdict_basis": "model",
"signals": {
"content_credentials": {
"present": true,
"indicates_ai": true,
"issuer": "OpenAI",
"tool": "GPT-Image",
"signature_valid": true
},
"watermark": null
},
"model_version": "wasitai-image-2026.10",
"processing_ms": 1840
}| Field | Meaning |
|---|---|
| verdict | ai_generated, uncertain or likely_authentic. The field to route on. |
| ai_probability | 0 to 1. Probability from the pixel-analysis model alone. Not affected by metadata, so stripped or forged metadata cannot change it. |
| risk_level | high, medium or low. Same as the verdict, for dashboards. |
| threshold_profile | The profile used to turn the probability into a verdict. |
| verdict_basis | "model", or "content_credentials" when a valid signed AI manifest decided the verdict on its own. |
| signals.content_credentials | C2PA content credentials if embedded: who signed, which tool, whether the signature is valid. null if none. |
| signals.watermark | Known generator watermark if found. null if none. |
| model_version | Exact model that produced the result, for audit trails and reproducibility. |
| processing_ms | Server-side processing time. |
4. Video response
16 frames are sampled evenly across the clip and scored by our video model, which is trained on footage that went through real-world codecs. ai_probability is the clip average; segments splits the clip into parts, so a real video with an inserted AI sequence shows up with the exact time range.
{
"id": "det_c71b09a2f4e1",
"media_type": "video",
"status": "completed",
"verdict": "ai_generated",
"ai_probability": 0.9112,
"risk_level": "high",
"threshold_profile": "balanced",
"duration_sec": 42.0,
"frames_analyzed": 16,
"segments": [
{ "start_sec": 0.0, "end_sec": 10.5, "ai_probability": 0.1204, "verdict": "likely_authentic" },
{ "start_sec": 10.5, "end_sec": 21.0, "ai_probability": 0.9533, "verdict": "ai_generated" },
{ "start_sec": 21.0, "end_sec": 31.5, "ai_probability": 0.9610, "verdict": "ai_generated" },
{ "start_sec": 31.5, "end_sec": 42.0, "ai_probability": 0.9408, "verdict": "ai_generated" }
],
"model_version": "wasitai-video-2026.10",
"processing_ms": 21400
}5. Verdicts and threshold profiles
| profile | ai_generated at | uncertain at | When to use |
|---|---|---|---|
| balanced (default) | ≥ 0.80 | ≥ 0.50 | General screening |
| low_fp | ≥ 0.90 | ≥ 0.60 | High volume, where a false alarm is costly |
| high_recall | ≥ 0.60 | ≥ 0.40 | Targeted investigation, where missing a fake is costly |
A valid signed content credential that declares the file as AI-generated sets the verdict to ai_generatedregardless of profile; the probability stays the model's own. During a pilot we calibrate the thresholds on your own data and can add a custom profile.
6. Examples
Python
import requests
API = "https://api.wasitaigenerated.com/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
# image upload
with open("photo.jpg", "rb") as f:
r = requests.post(f"{API}/detect/image", headers=HEADERS,
files={"file": f}, data={"id": "case-123/photo-1"})
print(r.json()["verdict"], r.json()["ai_probability"])
# image by URL, stricter profile
r = requests.post(f"{API}/detect/image", headers=HEADERS,
json={"image_url": "https://example.com/post.jpg", "profile": "low_fp"})
# video upload
with open("clip.mp4", "rb") as f:
r = requests.post(f"{API}/detect/video", headers=HEADERS, files={"file": f}, timeout=300)
for s in r.json()["segments"]:
print(s["start_sec"], s["end_sec"], s["verdict"])curl
curl -X POST https://api.wasitaigenerated.com/v1/detect/image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@photo.jpg" -F "id=case-123/photo-1"
curl -X POST https://api.wasitaigenerated.com/v1/detect/batch \
-H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"profile": "balanced", "images": [
{"id": "a1", "url": "https://example.com/1.jpg"},
{"id": "a2", "url": "https://example.com/2.jpg"}]}'7. Errors and limits
| Status | Meaning |
|---|---|
| 400 | Missing file or URL, URL not public, or unknown profile |
| 401 / 403 | Missing or invalid API key |
| 402 | Insufficient credits on the account |
| 413 | File too large (images 25 MB, videos 200 MB) |
| 415 | File is not a readable image or video |
| 422 | Video could not be decoded |
| 429 | Rate limit reached (120 requests per minute per key); retry after a short pause |
| 503 | Temporary service issue; retry the request |
Errors return JSON {"detail": "..."}. In a batch, a failed item returns {"id", "status": "error", "error"} and the rest of the batch still completes. For the pilot environment, please send no more than 4 requests in parallel and set a client timeout of 5 minutes for video requests. Production deployments run on dedicated infrastructure with agreed throughput and SLA.
8. Data handling
Files are processed in memory and deleted right after scoring. We do not store your images or videos and do not use them for training. For each request we keep a result record (your id, verdict, probability, model version and timestamp) so results can be reviewed and reported on later; the file itself is never kept.
Questions or a new key?