Add a text watermark (position, opacity, size, colour)

Adds a text watermark to an image. Returns the new image bytes.

Request

POSThttps://image-tools.p.apihiver.com/v1/watermark

Upload the image in the file field (max 25 MB). Instead of a file you can send JSON: {"url": "https://…"} for a public image URL, or {"base64": "…"} — the options below then go in the same JSON object.

*
No file chosen
File. The image file (JPG, PNG, WebP, GIF, BMP or TIFF).
*
String. Watermark text (required).
String. bottom-right, bottom-left, top-right, top-left or center.
Integer. 0–100.
Integer. Font size in px (default: 5% of image width).
String. Text colour as hex.
String. Output format.

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://image-tools.p.apihiver.com/v1/watermark \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY' \
5  --header 'content-type: multipart/form-data' \
6  --form file=@file.bin \
7  --form 'text=© APIHiver' \
8  --form position=bottom-right \
9  --form opacity=50 \
10  --form color=ffffff \
11  --form format=png

Add a text watermark (position, opacity, size, colour): Image Tools API reference

Adds a text watermark to an image. Returns the new image bytes. This endpoint is part of the Image Tools API: Resize, crop, convert, rotate and compress images, add text watermarks, extract colour palettes and make placeholder images.

Example response (200, image/png)

The watermarked image (type follows `format`).

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "Provide a file upload, 'url', or 'base64'."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.