A complete example

An annotated, end-to-end image analysis — request, response, and what every field means.

This walks through a full image analysis from request to response. The same patterns apply to the other modalities — see the API reference for each.

1. The request

Send one or more image files to the image endpoint with your API token. Image analysis is synchronous: the response contains the result.

curl -X POST "https://api.raidxai.com/api/app/image-forensics/process" \
  -H "Authorization: Bearer <your-token>" \
  -F "imageFiles=@suspect.jpg"
import requests

resp = requests.post(
    "https://api.raidxai.com/api/app/image-forensics/process",
    headers={"Authorization": "Bearer <your-token>"},
    files={"imageFiles": open("suspect.jpg", "rb")},
)
resp.raise_for_status()
data = resp.json()
print(data["images"][0]["verdict"], data["images"][0]["confidence"])
const form = new FormData();
form.append('imageFiles', fileInput.files[0]);

const resp = await fetch(
  'https://api.raidxai.com/api/app/image-forensics/process',
  { method: 'POST', headers: { Authorization: 'Bearer <your-token>' }, body: form }
);
const data = await resp.json();
console.log(data.images[0].verdict, data.images[0].confidence);

2. The response

{
  "images": [
    {
      "id": "f1d2e3c4-5678-90ab-cdef-1234567890ab",
      "fileName": "suspect.jpg",
      "verdict": "ai_generated",
      "confidence": 0.972,
      "isManipulated": true,
      "creditsUsed": 1,
      "processingTimeMs": 1840,
      "errorMessage": null,
      "createdAt": "2026-06-07T12:34:56Z",
      "deepfakeScore": 0.12,
      "generators": { "midjourney": 0.95, "flux": 0.03 },
      "deepAnalysis": {
        "keyIndicators": ["Uniform texture across skin regions"],
        "metadataFindings": [
          { "kind": "editingSoftware", "value": "Adobe Photoshop 24.0", "significance": "warning" },
          { "kind": "gpsPresent", "significance": "notable" }
        ]
      }
    }
  ],
  "totalCreditsUsed": 1,
  "totalProcessingTimeMs": 1840,
  "isSuccessful": true,
  "errorMessage": null,
  "hasDetailedReport": true
}

3. What each field means

  • verdict — the headline classification: real, ai_generated, ai_edited, or digitally_edited.
  • confidence — how sure the model is, from 0 to 1. 0.972 ≈ 97%.
  • isManipulated — a convenience boolean; true whenever verdict isn't real.
  • creditsUsed / totalCreditsUsed — credits charged for this image and the whole request.
  • processingTimeMs — server-side processing time.
  • deepfakeScore — likelihood the image is a deepfake (01). Detailed plans only.
  • generators — attribution as name → score, e.g. midjourney: 0.95. Keys are returned dynamically. Detailed plans only.
  • deepAnalysis — the detailed analysis narrative plus metadataFindings, curated findings from the image's embedded metadata (editing software, camera info, GPS presence, or the absence of any metadata). Detailed plans only.
  • hasDetailedReporttrue when the detailed fields above are populated; on basic plans it's false and those fields are null.

Plan-gated fields

deepfakeScore, generators, and deepAnalysis are null on basic plans. Always treat them as nullable — see Versioning.

4. Handling errors

On failure you receive a standard error envelope and a non-200 status (see each endpoint's status codes in the reference):

{ "error": { "code": "IMAGE_FORENSICS:FILE_TOO_LARGE", "message": "File suspect.jpg exceeds the maximum size of 50 MB." } }

On this page