API Reference

Endpoints

Complete API endpoint reference for DeepSafe.

Base URL: https://api.deepsafe.fyi

POST /v1/detect

Submit a file for deepfake detection. Returns the result synchronously by default, or a job ID if async=true.

Request

curl -X POST https://api.deepsafe.fyi/v1/detect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@photo.jpg"

Parameters

NameTypeRequiredDescription
filebinaryYesImage, audio, or video file (max 100MB)
media_typestringNoimage, audio, or video. Auto-detected if omitted.
asyncbooleanNoDefault false. Set true for async processing (Starter+ plans).

Response (Synchronous — 200 OK)

{
  "id": "det_a1b2c3d4",
  "verdict": "fake",
  "confidence": 0.94,
  "media_type": "image",
  "created_at": "2026-03-26T12:00:00Z"
}

Response (Async — 202 Accepted)

{
  "id": "det_a1b2c3d4",
  "status": "processing",
  "poll_url": "/v1/results/det_a1b2c3d4"
}

Response Fields

FieldTypeDescription
idstringUnique detection ID (prefix: det_)
verdictstringreal or fake
confidencefloatProbability score from 0.0 to 1.0
media_typestringDetected media type
created_atstringISO 8601 timestamp

GET /v1/results/{id}

Poll for async detection results. Use the id returned from an async /v1/detect request.

curl https://api.deepsafe.fyi/v1/results/det_a1b2c3d4 \
  -H "Authorization: Bearer YOUR_API_KEY"

Processing

{"id": "det_a1b2c3d4", "status": "processing"}

Complete

{
  "id": "det_a1b2c3d4",
  "status": "complete",
  "verdict": "fake",
  "confidence": 0.94,
  "media_type": "image",
  "created_at": "2026-03-26T12:00:00Z"
}

Failed

{
  "id": "det_a1b2c3d4",
  "status": "failed",
  "error": "Detection could not be completed. Please try again."
}

GET /v1/usage

Check your current scan usage and quota.

curl https://api.deepsafe.fyi/v1/usage \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "plan": "free",
  "scans_used": 47,
  "scans_limit": 200,
  "scans_remaining": 153,
  "period_start": "2026-03-01T00:00:00Z",
  "period_end": "2026-04-01T00:00:00Z"
}