Skip to main content
The deeptrack team recommends using the SDK for most integrations. The SDK handles authentication, file uploads, job polling, and error handling automatically. Consider checking if your preferred language is supported before using the raw API directly.View SDK Documentation →

Authentication

The deeptrack API authenticates via the X-API-Key header. Every request must include your API key.
X-API-Key: dt_your_key_here
To generate an API key, log into the deeptrack Dashboard and navigate to Settings → API Keys.
Keep your API key secure. Do not commit it to version control or expose it in client-side code.

Base URL

https://api.deeptrack.io

Size Limits

Media TypeMaximum Size
Image15 MB
Video500 MB
Audio50 MB

Supported File Types

TypeExtensions
Image.jpg, .jpeg, .png, .webp, .gif
Video.mp4, .mov, .avi, .mkv
Audio.mp3, .wav, .m4a, .aac, .ogg, .flac

Analyze an Image

Upload an image file and receive an authenticity verdict instantly. Endpoint
POST /v1/image/predict
HeaderValue
X-API-KeyYour API key
Content-Typemultipart/form-data
FieldTypeRequiredDescription
filefileYesImage file to analyze
import requests

BASE_URL = "https://api.deeptrack.io"
HEADERS  = {"X-API-Key": "dt_your_key_here"}

with open("photo.jpg", "rb") as f:
    resp = requests.post(
        f"{BASE_URL}/v1/image/predict",
        headers=HEADERS,
        files={"file": ("photo.jpg", f, "image/jpeg")},
    )

print(resp.json())

Response

{
  "filename":               "photo.jpg",
  "prediction":             "FAKE",
  "confidence_percentage":  87.3,
  "raw_scores": {
    "Real": 12.7,
    "Fake": 87.3
  }
}
FieldTypeDescription
filenamestringName of the uploaded file
predictionstringReal, Fake, or UNCERTAIN
confidence_percentagefloatConfidence of the verdict (0–100)
raw_scores.RealfloatRaw probability score for Real
raw_scores.FakefloatRaw probability score for Fake

Analyze a Video

Video analysis is asynchronous. Upload the file, receive a job_id, then poll for the result.

Step 1 — Upload the video

Endpoint
POST /v1/video/predict/video
HeaderValue
X-API-KeyYour API key
Content-Typemultipart/form-data
FieldTypeRequiredDescription
filefileYesVideo file to analyze
import requests
import time

BASE_URL = "https://api.deeptrack.io"
HEADERS  = {"X-API-Key": "dt_your_key_here"}

# step 1 — upload
with open("clip.mp4", "rb") as f:
    resp = requests.post(
        f"{BASE_URL}/v1/video/predict/video",
        headers=HEADERS,
        files={"file": ("clip.mp4", f, "video/mp4")},
    )

job_id = resp.json()["job_id"]
print(f"Job queued: {job_id}")

# step 2 — poll until done
while True:
    resp   = requests.get(f"{BASE_URL}/v1/video/jobs/{job_id}", headers=HEADERS)
    status = resp.json()["status"]
    print(f"Status: {status}")
    if status == "done":
        print(resp.json()["result"])
        break
    elif status == "error":
        print("Error:", resp.json()["error"])
        break
    time.sleep(3)

Upload Response

{
  "job_id":   "3f8a2c1d-...",
  "status":   "queued",
  "filename": "clip.mp4",
  "size_mb":  12.4,
  "poll_url": "/v1/video/jobs/3f8a2c1d-..."
}

Step 2 — Poll for Result

Endpoint
GET /v1/video/jobs/{job_id}
Poll this endpoint every 2–3 seconds until status is done or error. Larger files may take longer to analyze.

Poll Response

{
  "job_id":   "3f8a2c1d-...",
  "status":   "done",
  "filename": "clip.mp4",
  "result": {
    "label":        "FAKE",
    "confidence":   91.2,
    "fake_prob":    0.912,
    "face_pct":     98.0,
    "total_frames": 240,
    "n_segments":   4,
    "segments": [
      {
        "segment":    1,
        "start_sec":  0.0,
        "end_sec":    4.3,
        "label":      "FAKE",
        "confidence": 91.2,
        "fake_prob":  0.912
      }
    ]
  }
}
FieldTypeDescription
job_idstringUnique job identifier
statusstringqueued, processing, done, or error
result.labelstringREAL, FAKE, or UNCERTAIN
result.confidencefloatConfidence percentage (0–100)
result.fake_probfloatRaw fake probability (0.0–1.0)
result.face_pctfloat% of frames with a detected face
result.total_framesintTotal frames processed
result.n_segmentsintNumber of rPPG segments
result.segmentsarrayPer-segment breakdown

Check Usage

Returns your monthly usage stats for the authenticated API key. Endpoint
GET /v1/client/usage/me
resp = requests.get(f"{BASE_URL}/v1/client/usage/me", headers=HEADERS)
print(resp.json())

Response

{
  "owner":           "Gotham Media",
  "track":           "api",
  "plan":            "starter",
  "rate_per_scan":   0.39,
  "monthly_limit":   5000,
  "used_this_month": 23,
  "remaining":       4977,
  "resets_at":       "2026-03-31"
}

Error Reference

All errors return a JSON body with a detail field.
StatusMeaningExample detail
401Missing or invalid API key"Missing X-API-Key header."
400Bad request"Unsupported format '.wmv'."
413File too large"File too large (520MB). Max is 500MB."
422Missing required field"field required: file"
429Monthly limit exceeded"Monthly limit of 5000 scans exceeded."
503Model not loaded"Video model not loaded."
{
  "detail": "Monthly limit of 5000 scans exceeded. Upgrade your plan at deeptrack.io/pricing"
}

Support

For questions or issues, contact support@deeptrack.io or reach out to your account manager.