WasItAIGeneratedEnterprise API · v1

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_KEY

2. Endpoints

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

EndpointInputUse
POST /v1/detect/imagemultipart file, or JSON {"image_url": "..."}Single image: JPEG, PNG, WebP, up to 25 MB
POST /v1/detect/videomultipart file, or JSON {"video_url": "..."}Video clip: MP4, MOV, WebM, AVI, MKV, up to 200 MB
POST /v1/detect/batchJSON {"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
}
FieldMeaning
verdictai_generated, uncertain or likely_authentic. The field to route on.
ai_probability0 to 1. Probability from the pixel-analysis model alone. Not affected by metadata, so stripped or forged metadata cannot change it.
risk_levelhigh, medium or low. Same as the verdict, for dashboards.
threshold_profileThe 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_credentialsC2PA content credentials if embedded: who signed, which tool, whether the signature is valid. null if none.
signals.watermarkKnown generator watermark if found. null if none.
model_versionExact model that produced the result, for audit trails and reproducibility.
processing_msServer-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

profileai_generated atuncertain atWhen to use
balanced (default)≥ 0.80≥ 0.50General screening
low_fp≥ 0.90≥ 0.60High volume, where a false alarm is costly
high_recall≥ 0.60≥ 0.40Targeted 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

StatusMeaning
400Missing file or URL, URL not public, or unknown profile
401 / 403Missing or invalid API key
402Insufficient credits on the account
413File too large (images 25 MB, videos 200 MB)
415File is not a readable image or video
422Video could not be decoded
429Rate limit reached (120 requests per minute per key); retry after a short pause
503Temporary 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?

patrick@wasitaigenerated.com