Watermark & AIGC Labeling

Extract Image Watermark

0calls
5 credits / call

Found an image you suspect was stolen or AI-generated, and want to check whether it carries a hidden marker? Hand it straight to this endpoint and it pulls the embedded marker back out in full.

POST
uapis.cn
/api/v1/watermark/decode
Body
file
file

The image file to read a watermark from. PNG, JPEG, and WebP are supported.

Drag a file here, orclick to upload

The image file to read a watermark from. PNG, JPEG, and WebP are supported.

url
string

An image link that's publicly reachable.

image_base64
string

The image as Base64; the data: prefix is optional.

ecc
string
Error-correction level. Must match what was used when embedding, otherwise the payload can't be recovered.
model_type
string
Watermark profile. Must match what was used when embedding.

Overview

This endpoint detects whether an image contains an invisible watermark and, if so, recovers the original marker that was written in. It still reads back reliably in most cases even after the image has been compressed, cropped, or forwarded many times. It also guards against false positives: if the image really was never processed, it clearly returns no result instead of stitching together something meaningless.

Notes

If you changed any advanced parameters when embedding (such as ecc or model_type), you must pass the same values here when reading. If embedding used the defaults, just leave these empty.

Request body

The image to inspect. Both multipart/form-data and application/json are supported.

file
fileoptional

The image file to read a watermark from. PNG, JPEG, and WebP are supported.

url
stringoptional

An image link that's publicly reachable.

image_base64
stringoptional

The image as Base64; the data: prefix is optional.

ecc
stringoptional
Error-correction level. Must match what was used when embedding, otherwise the payload can't be recovered.
model_type
stringoptional
Watermark profile. Must match what was used when embedding.

Response

200 / OK

Read completed; returns the detection result.

JSON
{
  // Whether a watermark was detected.
  "present": true,
  // The recovered marker (present only when present=true).
  "payload": "a1B2c3D",
  // Decision confidence, between 0 and 1.
  "confidence": 0.99,
  // Read time, in milliseconds.
  "decode_ms": 41.2
}

400 / Bad Request

Bad request, e.g. missing image source.

JSON
{
  "code": "INVALID_PARAMETER",
  "message": "an image source is required"
}

503 / Service Unavailable

The watermark service is temporarily unavailable.

JSON
{
  "code": "SERVICE_TEMPORARILY_UNAVAILABLE",
  "message": "the watermark service is temporarily unavailable"
}