Skip to main content
This guide walks you through detecting a watermark in an image — from creating an order to reading the extraction 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)
  • A watermarked image file (jpeg, jpg, png, webp, bmp, or tiff) or PDF
Use the automatically issued sk_test_ key to exercise the order lifecycle without running watermark extraction or consuming credits. Test uploads discard file contents and return deterministic detection states. Use a live API key when you need to extract a watermark from an actual file.

Step 1: Create an order

Create a watermark extraction order with your file.
Response:
You can include the original (pre-watermarked) image for more accurate extraction. Set "includeOriginal": true and provide "originalFile": { "fileName": "original.jpg" } in the request. This option is available for images only, not PDFs.

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.
No confirm step needed. Like Watermark Embed, Watermark Extract processing starts automatically after your file upload completes. Proceed directly to checking the result.
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: Check the result

Poll the order or use webhooks to receive a push notification when extraction completes.
Response (watermark detected):
Response (no watermark found):
Poll status to know when the job is done, then read statusCode for the outcome:

Full React example

Everything above, wired into one component: single-file upload with progress, backoff polling, and the extraction result rendered from statusCode. No dependencies beyond React.
WatermarkExtractChecker.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.
The public result contains statusCode and, when detected, watermarkText; it never includes a MID.

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.

AI Detection

Detect AI-generated images with probability scores.

Webhooks

Set up webhooks to get notified when processing completes.