Add AI-Generated Content Label

0calls
5 credits / call

Need your AI-generated images to meet national compliance requirements before they go live? One call to this endpoint automatically applies the three labels defined by GB 45438-2025.

The three labels

A single call can inject any of these three standard-compliant labels at once:

  • Metadata label (on by default): records the "AI-generated" attribute and the service-provider information in the image file's EXIF/XMP metadata, without affecting how it looks.
  • Visible badge (optional): overlays a prominent "AI generated" line of text in a chosen corner; the font size is computed automatically to satisfy the standard's rule that the character height be no less than 5% of the image's shorter side.
  • Invisible watermark (optional): embeds compression-resistant provenance information deep in the image's pixels.

Notes

Required field: per the standard, content_producer (the service-provider code) is required. We recommend the companion /watermark/producer-code endpoint to quickly generate a well-formed 27-character service-provider code.

Label combination: if you turn off the default metadata label (skip_metadata=true), you must enable at least one of the visible badge or the invisible watermark, so the image still carries a compliant label.

Request body

Image source and the various compliance-label parameters. Both multipart/form-data and application/json are supported.

file
fileoptional

The image file to label. PNG and JPEG are supported.

url
stringoptional

An image link that's publicly reachable.

image_base64
stringoptional

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

content_producer
stringrequired

The 27-character service-provider code for whoever generated this image.

label
stringoptional

How the image came about: 1 = AI-generated, 2 = made by a human together with AI, 3 = other cases involving AI. Defaults to 1 when empty.

produce_id
stringoptional

An ID for this generated content. Optional.

content_propagator
stringoptional

The 27-character service-provider code for whoever distributes this image. Optional.

propagate_id
stringoptional

An ID for the propagated content. Optional.

skip_metadata
booleanoptional

Turn off the metadata label. Metadata is written by default; if you turn it off, you have to enable at least one of the visible badge or the invisible watermark.

explicit_label
booleanoptional

Whether to add a visible badge on the image. Off by default.

explicit_text
stringoptional

The text shown in the badge. Defaults to "AI generated" when empty.

explicit_position
stringoptional

Which corner the badge goes in. Defaults to bottom-right.

explicit_height_ratio
numberoptional

Badge text height as a ratio of the image's shorter side. Anything below 0.05 is raised to 0.05 automatically to stay compliant.

embed_watermark
booleanoptional

Whether to also add an invisible watermark. Off by default.

watermark_payload
stringoptional

The marker written into the invisible watermark.

out_format
stringoptional

Output image format. Leave empty to match the input.

jpeg_quality
integeroptional

Image quality for JPEG output, 1 to 100.

Response

200 / OK

Labeled successfully; returns the labeled image (Base64).

JSON

400 / Bad Request

Bad request, e.g. missing image source, invalid content_producer, or no layer applied.

JSON

413 /

Image too large, exceeding the server limit.

JSON

503 / Service Unavailable

The watermark service is temporarily unavailable.

JSON