Skip to main content
This guide walks you through detecting whether an image is AI-generated — from uploading an image to reading the detection result. Every endpoint here is plain HTTPS and JSON, so the same calls work from a server or straight from the browser. Each step includes a React tab, and a full copy-paste component is at the bottom of the page.

Prerequisites

  • A BIZ MORI API key (get one here)
  • An image file to analyze (jpeg, jpg, png, webp, bmp, or tiff)
Use the automatically issued sk_test_ key to exercise the order lifecycle without running AI Detection or consuming credits. Test uploads discard file contents and return deterministic probability values. Use a live API key when you need an actual detection result.

Step 1: Create an order

Create an AI Detection order with your image file name.
Response:
You can optionally request heatmap and overlay images by adding "options": { "generateHeatmap": true, "generateOverlay": true } to the request body. These will be available in the order detail once processing completes.

Step 2: Upload the file

PUT your file to the presigned uploadUrl from Step 1. This is a direct S3 upload — no Authorization header needed.
Live keys receive S3 presigned URLs. Test keys receive https://api.bizmori.com/api/v2/test-uploads/{signedToken}; both expire after 1 hour and accept the same unauthenticated PUT. Test uploads are streamed only, not stored or processed. Use Refresh URLs if a URL expires.

Step 3: Confirm the order

After uploading, call confirm to start detection processing:

Step 4: Check the result

Poll the order or use webhooks to receive a push notification when detection completes. The detection result is included directly in the order detail — there is no separate download step.
Response:

Reading the result

The probability field (0–1) indicates how likely the image is AI-generated. The statusCode provides a human-readable interpretation:
heatmapUrl and overlayUrl are only present if you requested them via options.generateHeatmap and options.generateOverlay in Step 1.

Full React example

Everything above, wired into one component: image upload with progress, backoff polling, and the detection result. No dependencies beyond React.
AiDetectionChecker.jsx
import.meta.env.VITE_MORI_API_TOKEN is Vite’s syntax. Use process.env.NEXT_PUBLIC_MORI_API_TOKEN on Next.js, or whatever your bundler exposes to client code. crypto.randomUUID() needs a secure context: HTTPS and localhost are fine, a plain-HTTP LAN address is not.

Error handling

For the complete error code reference, see Error Codes.

Next steps

Anti-AI

Protect images from AI training and generation.

Watermark Embed

Embed invisible watermarks into images.

Watermark Extract

Detect and extract watermarks from images.

Webhooks

Set up webhooks to get notified when processing completes.