APIMODELSAPIMODELS
Docs/AI Image Detector API

AI-Generated Image Detection

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.

Limited beta: this endpoint is in public beta with a daily throughput cap and may intermittently return "temporarily unavailable". Contact us before high-volume production use. Pricing and behavior may change.

Overview

This endpoint helps you determine whether an image was fully AI-generated, or is a real photo/artwork. It works in two layers:

  • Content credentials (C2PA): many generators (e.g. OpenAI and others) embed a cryptographically signed provenance manifest. When present it is decisive and names the tool. This layer is local and free.
  • Pixel-level classifier: when no credential is present (most platforms strip them on upload), the model scores the image from its visual pixel content. It was trained on millions of AI-generated and human-made images spanning photography, art, drawings, memes and more.

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.

Use cases

  • Tag AI-generated imagery to limit the spread of misinformation and fake news
  • Apply stricter moderation rules to AI-generated imagery
  • Detect potential fraud with fake IDs, fake profiles or fake claims
  • Limit AI-generated spam
  • Enforce bans on AI-generated imagery

Authentication

Authorization: Bearer YOUR_API_KEY

Model & pricing

modelPriceNotes
ai-image-detector$0.015 / imageFlat, failed requests not charged

Code examples

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"

Request parameters

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.

FieldRequiredTypeDescription
imageNostringPublic URL of the image to check. Aliases: image_url / url.
image_base64NostringBase64 image data (may include a data:image/...;base64, prefix). Alternative to image.
attributionNobooleanTry to return the generating tool/vendor (best-effort, signal-dependent). Default false.

Response fields (data)

FieldRequiredTypeDescription
modelYesstringai-image-detector
is_ai_generatedYesboolean | nulltrue = AI, false = human, null = uncertain.
verdictYesstringai / human / uncertain, matching is_ai_generated.
confidenceYesnumberConfidence from 0 to 1.
generatorNostring | nullBest-effort generating tool/vendor (e.g. OpenAI, xAI Grok); null when unknown.
decided_byYesstringcontent_credentials (a C2PA credential was read) or classifier (pixel-level).
signalsYesobjectPer-layer raw signals: content_credentials presence/flag/tool, classifier score.

Generators recognized

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.

GeneratorCreator
GPT image / DALL-EOpenAI
Nano Banana / ImagenGoogle
MidjourneyMidjourney
Stable Diffusion (1.x / 2.x / SDXL / SD3)Stability AI
FluxBlack Forest Labs
FireflyAdobe
SeedreamByteDance
Qwen-Image / Z-ImageAlibaba
KlingKuaishou
IdeogramIdeogram
RecraftRecraft
ReveReve
Grok ImaginexAI
StyleGAN (GAN-based)NVIDIA
Other smaller generatorsVarious

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.

FAQ

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.