---
title: Face Deepfake Detection
slug: api-marketplace/face-deepfake-detection
description: Stay ahead of the game with our upcoming document featuring valuable information coming soon. Be prepared to access essential insights and stay tuned for its release in the near future. Subscribe now to be the first to receive this highly anticipated reso
createdAt: 2023-04-20T21:12:16.000Z
---

## Introduction

Submit a face image and receive a boolean verdict on whether it is synthetic. The API detects both face-manipulated deepfakes and fully AI-generated images, evaluating each submission through two independent detection engines and returning a single result based on the stronger signal.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```javascript
POST https://api.signzy.app/api/v3/face/deepfake
```
:::

:::CodeblockTabs
UAT/Testing Endpoint

```javascript
POST https://api-preproduction.signzy.app/api/v3/face/deepfake
```
:::

***

### Request Headers

| **Name**      | **Value**        | **Required** | **Description**                                                                                            |
| ------------- | ---------------- | ------------ | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory    | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory    | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**                                                                    | **Required** |
| ------------- | ------------- | ---------------------------------------------------------------------------------- | ------------ |
| url           | String        | Publicly accessible URL of the image to analyze. Must be reachable by the service. | Mandatory    |

:::CodeblockTabs
JSON

```json
{
    "url": "image-url"
}
```
:::

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/face/deepfake' \
--header 'Content-Type: application/json' \
--header 'Authorization: <auth_key>' \
--data '{
    "url": "https://preproduction-persist.signzy.tech/api/files/48973133/download/xxxx.jpg"
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "url": "https://preproduction-persist.signzy.tech/api/files/48973133/download/xxxx.jpg"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/face/deepfake',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<auth_key>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "url": "https://preproduction-persist.signzy.tech/api/files/48973133/download/xxxx.jpg"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<auth_key>'
}
conn.request("POST", "/api/v3/face/deepfake", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/face/deepfake"
  method := "POST"

  payload := strings.NewReader(`{
    "url": "https://preproduction-persist.signzy.tech/api/files/48973133/download/xxxx.jpg"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<auth_key>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body parameters

| **Parameter**   | **Data Type** | **Description**                                                                   |
| --------------- | ------------- | --------------------------------------------------------------------------------- |
| result.deepfake | Boolean       | Returns true if the image is synthetic (true or false); returns false if genuine. |

:::CodeblockTabs
200

```json
// Deepfake/AI-generated Image Detection
{
    "result": {
        "deepfake": true
    }
}

// Real Image Detection
{
    "result": {
        "deepfake": false
    }
}
```

400

```json
{
    "status": 400,
    "message": "Processing Error"
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```

413

```json
{
  "error": {
    "statusCode": 413,
    "status": "Payload Too Large",
    "message": "Image must be smaller than 12MB"
  }
}
```
:::

### Image Quality Guidance

Detection accuracy can degrade significantly when images are heavily compressed, low-resolution, resized, or cropped. Wherever possible:

- Submit the original captured file rather than a re-encoded thumbnail or screenshot.&#x20;
- Avoid re-compressing images before submission.&#x20;
- Avoid images that have been cropped down to a small face region and then upscaled.&#x20;
- Avoid adding synthetic, computer-generated watermarks, headers, or footers to the image.&#x20;

### Points to Note

**Interpretation:** A value of deepfake: true indicates a detection signal and does not confirm a fraudulent outcome. Treat it as a trigger for manual review or escalation within your workflow.

**Metrics:** Our model is benchmarked internally and has been found to have a False Acceptance Rate (FAR) of 6.95% and a False Rejection Rate (FRR) of 0.10%.

**Latency:** The expected p95 response time is 3secs to 5secs.

The recommended file size limit is **12 MB.**

### Recommended Use

This API is recommended for scenarios where selfies or face captures of users need to be validated to determine whether they are AI-generated.

### Unsupported / Unreliable Inputs

Submitting the following inputs may produce unreliable verdicts rather than errors. The API will return a result, but that result should not be relied upon:

- Full identity documents, forms, or document scans.&#x20;
- Landscape, object, or scene photography with no dominant face.&#x20;
- Group photos, crowd shots, or images containing multiple faces.&#x20;
- Images where the face is heavily occluded, extremely small, or strongly off-angle.&#x20;

### Not a Passive Liveness Check API

This API is **not** a passive liveness check API. Presentation attacks are outside the scope of this endpoint. The following inputs may return either true or false, and neither result should be interpreted as a liveness outcome:

- A photograph or video frame replayed from a screen or monitor.&#x20;
- A printed photograph re-captured with a camera.&#x20;
- A physical mask, cut-out, or similar spoofing artifact.&#x20;
- A screenshot or scan of an existing face image.&#x20;

Where liveness assurance is required, pair this API with Signzy’s **Image Passive Liveliness Check API**.

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!
