Tell whether an image was generated by an AI model — such as Nano Banana, Seedream, Stable Diffusion, GPT-image, Midjourney, Flux, Firefly and more. Two layers: first the image’s C2PA content credentials (a signed manifest is decisive and can name the tool), then a pixel-level classifier when no credential is present. Synchronous response with a probability and which layer decided — not a hard yes/no. Failed requests are not charged.
This page covers image detection. Video detection is on the roadmap — contact us if you need it.
This endpoint helps you determine whether an image was fully AI-generated, or is a real photo/artwork. It works in two layers:
The classifier is purely pixel-based and does not depend on metadata — stripping EXIF has no effect on it. The credential layer, by contrast, deliberately uses provenance: together, you get a definitive answer when a signature exists and a probability when it does not.
Authorization: Bearer YOUR_API_KEY| model | Price | Notes |
|---|---|---|
| ai-image-detector | $0.015 / image | Flat, failed requests not charged |
Send a public image URL, base64, or a direct file upload; pick a language and get a JSON response.
# ─── Detect whether an image is AI-generated ───────────────
curl -X POST https://api.apimodels.app/v1/images/detections \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "image": "https://example.com/photo.jpg" }'
# Response (synchronous):
# {
# "code": 200, "msg": "success",
# "data": {
# "model": "ai-image-detector",
# "is_ai_generated": true,
# "verdict": "ai", // ai | human | uncertain
# "confidence": 0.99,
# "generator": "OpenAI", // best-effort, may be null
# "decided_by": "classifier", // content_credentials | classifier
# "signals": { ... }
# }
# }
# You can also send base64 instead of a URL:
# -d '{ "image_base64": "<base64 or data:image/...;base64,...>" }'
# ...or upload a file directly (multipart):
# -F "image=@photo.jpg"Provide the image one of three ways: image (public URL), image_base64 (may include a data URI prefix), or a multipart form field named image.
| Field | Required | Type | Description |
|---|---|---|---|
| image | No | string | Public URL of the image to check. Aliases: image_url / url. |
| image_base64 | No | string | Base64 image data (may include a data:image/...;base64, prefix). Alternative to image. |
| attribution | No | boolean | Try to return the generating tool/vendor (best-effort, signal-dependent). Default false. |
| Field | Required | Type | Description |
|---|---|---|---|
| model | Yes | string | ai-image-detector |
| is_ai_generated | Yes | boolean | null | true = AI, false = human, null = uncertain. |
| verdict | Yes | string | ai / human / uncertain, matching is_ai_generated. |
| confidence | Yes | number | Confidence from 0 to 1. |
| generator | No | string | null | Best-effort generating tool/vendor (e.g. OpenAI, xAI Grok); null when unknown. |
| decided_by | Yes | string | content_credentials (a C2PA credential was read) or classifier (pixel-level). |
| signals | Yes | object | Per-layer raw signals: content_credentials presence/flag/tool, classifier score. |
The classifier covers the major commercial and open-source generators currently in use, plus older GAN-based architectures. New generators are added on an ongoing basis as they appear.
| Generator | Creator |
|---|---|
| GPT image / DALL-E | OpenAI |
| Nano Banana / Imagen | |
| Midjourney | Midjourney |
| Stable Diffusion (1.x / 2.x / SDXL / SD3) | Stability AI |
| Flux | Black Forest Labs |
| Firefly | Adobe |
| Seedream | ByteDance |
| Qwen-Image / Z-Image | Alibaba |
| Kling | Kuaishou |
| Ideogram | Ideogram |
| Recraft | Recraft |
| Reve | Reve |
| Grok Imagine | xAI |
| StyleGAN (GAN-based) | NVIDIA |
| Other smaller generators | Various |
On "which generator": with attribution enabled we return a best-effort generator when a signal is available (a C2PA claim, or classifier attribution). Full per-generator confidence scores are rolling out — contact us if you need finer-grained analysis.
Which AI image generators are supported?
We aim to cover the current generators: GPT-image, Nano Banana (and Pro), Imagen, Midjourney, Stable Diffusion (1.x/2.x/SDXL/SD3), Flux, Firefly, Qwen-Image, Z-Image, Ideogram, Recraft, Reve, Seedream, Kling, Grok Imagine, along with smaller generators and GAN architectures such as StyleGAN2/3. The model is updated on an ongoing basis.
How does it work without a watermark or metadata?
Two layers: if the image carries a C2PA content credential we read it (decisive, and can name the tool); otherwise a pixel-level classifier analyzes the image itself. The classifier is robust to re-encoding, compression, resizing and screenshots — confidence may drop on heavily degraded images or screenshots with a lot of UI chrome.
What do confidence and verdict mean?
confidence is a 0–1 score; verdict is ai / human / uncertain, with is_ai_generated matching (true/false/null). Higher means more likely AI-generated.
Does it work on screenshots and compressed, re-shared images?
Yes. The classifier is robust to re-encoding, compression, resizing and other transforms, and is developed for real-world redistribution artifacts. Confidence may drop somewhat on heavily degraded images.
Can it tell which generator produced the image?
Best-effort: with attribution enabled we return a generator when a signal is available (a C2PA claim or classifier attribution). Full per-generator scores are rolling out.
What about AI-edited real photos (inpainting, face swaps, retouching)?
The model targets fully AI-generated as well as AI-edited images. Dedicated face-swap / deepfake-face detection is not in scope for this endpoint yet.
Is this available for video?
Video detection is on the roadmap — contact us if you need it.
What are the limits and pricing?
$0.015 per image, failed requests not charged. Currently in limited beta with a daily throughput cap; contact us before high-volume production use.