# AI Image Detector - Synthetic Image Verification (`dev00/ai-image-detector`) Actor

Detect whether an image is AI-generated (Midjourney, DALL-E, Stable Diffusion, Flux). Supports public image URLs and base64 payloads.

- **URL**: https://apify.com/dev00/ai-image-detector.md
- **Developed by:** [dev00](https://apify.com/dev00) (community)
- **Categories:** AI, Agents, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 ai image detections

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 🎨 AI Image Detector - Synthetic Image Verification Actor

Detect whether any image is AI-generated (Midjourney, DALL-E, Stable Diffusion, Flux, Ideogram) using ZeroGPT's multi-layered machine learning detection engine. Supports public image URLs and base64 strings.

***

### 🚀 What it does

1. **Detects AI-Generated Images**: Identifies synthetic images created by popular AI models including Midjourney (v4, v5, v6), DALL-E 2/3, Stable Diffusion (1.5, XL, 3), Flux.1, Ideogram, Firefly, Google Imagen, and Leonardo AI.
2. **Multi-Payload Input**: Supports both public HTTP/HTTPS image URLs (`image_url`) and raw base64 data strings (`image_base64`).
3. **Statistical AI Probability**: Calculates a continuous AI probability percentage (`0.0%` to `100.0%`).
4. **Forensic Analysis Breakdown**: Returns complete multi-layer detection signals including machine learning model ratings, OCR text overlays, EXIF metadata inspection, and anti-tamper warning metrics.

***

### 💼 What people use it for

- **UGC & Community Moderation**: Screen user avatars, media posts, and forum uploads for synthetic content.
- **E-Commerce & Marketplace Safety**: Audit product photography and identity document uploads to block fraud.
- **Research & Provenance**: Track AI-generated visual media across pipeline workflows.
- **Stock & Media License Audit**: Verify authenticity of creative assets and photography.

***

### 🧠 Decision Rule

Check if `is_ai_generated === true` OR `ai_probability >= 50.0`. If matched, dynamically mark the media asset as synthetic and route to manual review or automatic block.

***

### ⚖️ What problem does this solve?

- *"Receiving realistic fake images and deepfakes across community platforms."*
- *"Manual inspection of stock photos and artwork is slow and unreliable."*
- *"High cost and complex integrations of proprietary computer vision platforms."*

ZeroGPT AI Image Detector Actor solves this by delivering automated, low-latency synthetic image detection with a single execution.

***

### ❓ Queries this actor answers

- *Is this photo AI-generated or real?*
- *How can I detect Midjourney, DALL-E 3, or Flux generated images programmatically?*
- *What is an affordable alternative to Hive Moderation and Sightengine for AI image detection?*
- *How do I check image authenticity using base64 or public URLs?*

***

### 📦 Canonical Usage

Provide a target `image_url` (or `image_base64` string) to receive instant synthetic classification, AI probability scores, and multi-layer forensic metrics.

***

### 🧭 Input Schema (fields you can use)

- **image\_url** *(string, optional)* — Public HTTP/HTTPS URL of the image to analyze (e.g., `https://images.unsplash.com/photo-1541963463532-d68292c34b19`).
- **image\_base64** *(string, optional)* — Base64 encoded image payload or data URL string.

***

### 📤 Output Schema (what you get)

Results are saved to the run's **Dataset** and **Key-Value Store**:

```json
{
  "success": true,
  "is_ai_generated": false,
  "ai_probability": 13.98,
  "verdict": "Real",
  "confidence": 13.98,
  "details": {
    "id": "d02c35a9-1e01-499e-932b-62bc75fa4f79",
    "status": "done",
    "final_result": "Real",
    "is_valid": true,
    "detection_step": 3,
    "ml_model": [
      "Real",
      13.98
    ],
    "ocr": [
      "OCR did not detect AI",
      0.0
    ],
    "metadata": [
      "No Information Detected",
      "Could not find anything from ExifTool and Pillow metadata"
    ],
    "warnings": [
      {
        "type": "screen_recapture",
        "label": "Normal",
        "metrics": {
          "is_screen": false
        },
        "confidence": 100.0
      }
    ],
    "file_url": "https://ai-image-detector-prod.nyc3.digitaloceanspaces.com/uploads/example.jpg"
  }
}
```

***

### 💳 Monetization & Cost

This Actor utilizes the **Pay-Per-Event (PPE)** pricing model on the Apify Store:

- **Base Pricing**: Only **$1.00 per 1,000 successful image analyses** (`$0.001` per event).
- **Pay as You Go**: If an image analysis fails, no billing charges occur.

***

### ⚠️ Failure Context & Error Handling

If an unparseable or invalid image parameter is supplied:

```json
{
  "success": false,
  "error": "Missing required parameter: Either 'image_url' or 'image_base64' must be provided."
}
```

***

### 🏷️ Keywords

`ai image detector`, `synthetic image detection`, `midjourney detector`, `dall-e checker`, `stable diffusion detector`, `fake photo checker`, `deepfake image detection`, `image authenticity`, `trust and safety`, `zerogpt`.

# Actor input Schema

## `image_url` (type: `string`):

Public image URL to analyze for AI-generation signals.

## `image_base64` (type: `string`):

Optional base64 image string or full data URL. Use this when you do not have a public image URL.

## Actor input object example

```json
{
  "image_url": "https://images.unsplash.com/photo-1541963463532-d68292c34b19"
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "image_url": "https://images.unsplash.com/photo-1541963463532-d68292c34b19"
};

// Run the Actor and wait for it to finish
const run = await client.actor("dev00/ai-image-detector").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "image_url": "https://images.unsplash.com/photo-1541963463532-d68292c34b19" }

# Run the Actor and wait for it to finish
run = client.actor("dev00/ai-image-detector").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "image_url": "https://images.unsplash.com/photo-1541963463532-d68292c34b19"
}' |
apify call dev00/ai-image-detector --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dev00/ai-image-detector",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Dan8PhM3iHqa2kzw5/builds/IhnFkrrewScu005qh/openapi.json
