GET
api
/
media
/
users
/
{requestId}
curl --request GET \
  --url https://api.prd.realitydefender.xyz/api/media/users/{requestId} \
  --header 'x-api-key: <api-key>'
requestId
string

Returns deepfake detection result for specified requestId.

This endpoint returns the results for a specific upload. When you upload the file, the response of a successful upload will contain the requestId. You can also find your requestId in the URL path when you access the upload in the web application.

Authorization

To request a pre-signed URL, you must include the x-api-key in your request headers. This key is essential for authenticating your request and ensuring secure access to the API.

Sample Code Snippet

Here’s an example of how you can request a pre-signed URL and upload a file.

REQUEST_ID="your-requestId"
API_KEY="your-api-key"

curl -X GET \
  "https://api.prd.realitydefender.xyz/api/media/users/${REQUEST_ID}" \
  -H "X-API-KEY: ${API_KEY}" \
  -H "Content-Type: application/json"

Sample Response

{
    "filename": "rd-file-name",
    "originalFileName": "original-file-name", 
    "requestId": "request-id",
    "uploadedDate": "uploaded-date",
    "mediaType": "media-type", // AUDIO, VIDEO, TEXT, IMAGE
    "showAudioResult": "show-audio-result", // True, False
    "audioRequestId": "audio-request-id", // populated if showAudioResult is True
    "userId": "user-id",
    "institutionId": "institution-id", 
    "releaseVersion": "2.3.1",
    "resultsSummary": {
        "status": "status", // AUTHENTIC, FAKE, SUSPICIOUS, NOT_APPLICABLE, UNABLE_TO_EVALUATE
        "metadata": {
            "languages": ["language"], // detected languages include english, spanish, and portuguese
            "finalScore": score // ensemble score goes from 0-100
        }
    },
    "models": [
        // individual model results
    ]
}

Response Details

NOT_APPLICABLE

Reality Defender will return NOT_APPLICABLE as a status if the file contains certain characteristics that are known to impact accuracy. The reason behind the NOT_APPLICABLE response will be returned as a list in the metadata feel.

For example, see below for a resultsSummary returned for an image that was not applicable.

"resultsSummary": {
    "status": "NOT_APPLICABLE",
    "metadata": {
      "reasons": [
        {
          "code": "relevance",
          "message": "no faces detected/faces too small"
        }
      ]
    }
}

Image Reasons
Possible reasons returned for NOT_APPLICABLE are:

  • code: relevance
    • message: no faces detected/faces too small

Video Reasons
Currently, our video files do not output reasons.

Audio Reasons
Possible reasons returned for NOT_APPLICABLE are:

  • code: duration
    • message: audio too short (<1.5s)
  • code: detected
    • message: dialtone and/or music
  • code: cross-talk
    • message: more than one speaker detected
  • code: quality
    • audio too noisy
  • code: language
    • audio is more likely in language

UNABLE_TO_EVALUATE Response

Reality Defender will return UNABLE_TO_EVALUATE if an error occurred while processing the file. This is typically caused by timeouts. You can try again, or upload a smaller file.

Here is an example of the resultsSummary returned for an image that is unable to be evaluated.

"resultsSummary": {
    "status": "UNABLE_TO_EVALUATE",
    "metadata": {},
    "error": {
      "code": "model-error",
      "message": "An error occurred while processing the file. Please try uploading the file again."
    }
}