LM-Kit OneDocs2026.10.6lm-kit.comEULA
Image Utilities

Image Watermark

Burns a visible watermark into an image: text, a logo or both, tiled, centred or in a corner.#

POST/lmkit/v1/image-watermark

Marks any image the server decodes (JPEG, PNG, WebP, TIFF, HEIC, AVIF, GIF, BMP, PSD, ...) with 'watermark': a line of text, a logo (its transparency kept) or both, tiled on a diagonal lattice, centred along the picture's diagonal or in a corner, at an opacity, size and angle, legible on any picture, every script drawn. The image keeps its size and, unless 'output_format' names another, its format when the server encodes it (else PNG); 'keep_metadata' (default true) carries EXIF, XMP, IPTC and the profile across. 'page_index' -1 marks every page of a multi-page image into one TIFF. To resize, change the colour space or write a rights statement in the same pass, use POST /lmkit/v1/image-convert, which takes the same 'watermark'. 'delivery' returns the bytes inline as base64 or as a stored 'file_id'. The response states what was written. No AI model is involved. A payload that is not a decodable image is refused with 422 'invalid_image'; watermark text holding a character no font on the server draws with 422 'unsupported_characters', naming it; a logo or font that cannot be read, or a page past the last, with 400 'invalid_argument'. If processing exceeds the configured timeout, returns 202 Accepted with a job_id to poll at GET /lmkit/v1/jobs/.

Request body

application/json ·

PropertyTypeDescription
inputrequiredstring

The source image. When input_format is 'Base64EncodedFile', provide the base64-encoded bytes. When 'FileIdentifier', provide the file ID previously returned by the lmkit/v1/files/upload endpoint.

input_format

How the input is provided. Accepted values: 'Base64EncodedFile' or 'FileIdentifier'. Defaults to 'Base64EncodedFile'.

page_indexobject (int32)

Zero-based page of a multi-page image (a TIFF scan) to mark, or -1 to mark every page into a multi-page TIFF. Default: 0; an index past the last page is refused with 400.

watermarkrequired

The visible watermark burned into the pixels at the image's own size.

output_formatone of object ·
output_qualityobject (int32)

Quality of the lossy encoders ('jpeg', 'webp'), from 1 to 100. Ignored otherwise. Default: 90.

keep_metadataboolean

Whether EXIF, XMP, IPTC and the colour profile of the source are carried into the output as far as the container holds them. Default: true.

delivery

How the bytes are delivered: 'inline' (default) as base64 in 'data', or 'file' as a stored file whose 'file_id' the response returns.

Responses

StatusTypeDescription
200

OK

202

Accepted

400

Bad Request

422

Unprocessable Entity

500application/json

Internal Server Error

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/image-watermark" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": "",
  "input_format": "Base64EncodedFile",
  "page_index": 0,
  "watermark": {
    "text": "string",
    "logo": "string",
    "logo_file_id": "string",
    "font": "string"
  },
  "output_quality": 90,
  "keep_metadata": true
}'

What the watermark engine on this server accepts.#

GET/lmkit/v1/image-watermark/capabilities

The 'watermark.layout' values, the longest 'watermark.text', and whether fonts are installed on the server, derived from the engine. The formats the server writes are listed by GET /lmkit/v1/image-convert/capabilities. Cacheable for five minutes.

Responses

StatusTypeDescription
200

OK

curl -X GET "$LMKIT_ONE_URL/lmkit/v1/image-watermark/capabilities" \
  -H "Authorization: Bearer $LMKIT_API_KEY"