Skip to main content
This guide walks you through creating an Anti-AI protection order — from uploading an image to downloading the protected 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.
You can also provide image URLs directly instead of uploading files. See the Create Anti-AI order API for URL mode details.

Prerequisites

  • A BIZ MORI API key (get one here)
  • An image file to protect (jpeg, jpg, png, webp, tiff, or bmp)
Use the automatically issued sk_test_ key to exercise the order lifecycle without running Anti-AI processing or consuming credits. Test uploads discard file contents and do not produce a downloadable result. Use a live API key when you need an actual protected image.

Step 1: Create an order

Create an order and receive presigned S3 URLs for uploading your files.
Response:

Step 2: Upload files

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 all files, call confirm to start processing:

Step 4: Check order status

Poll the order or use webhooks to receive a push notification when processing completes.
Order statuses:

Step 5: Download the result

Once status is complete, fetch the download URL:
Response:
The url is a presigned S3 URL valid for 7 days. Download the protected file directly from this URL.

Full React example

Everything above, wired into one component: multiple files, per-file upload progress, backoff polling, and a download link. No dependencies beyond React.
AntiAiUploader.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.
Test orders do not produce a result file: their downloadUrl is null, and the download endpoint can return PROCESSED_FILE_NOT_FOUND.

Error handling

For the complete error code reference, see Error Codes.

Next steps

Watermark Embed

Embed invisible watermarks into your images.

Watermark Extract

Detect and extract watermarks from images.

AI Detection

Detect AI-generated images with probability scores.

Webhooks

Set up webhooks to get notified when processing completes.