
Add Watermark API
Design
Upload images and add customizable watermarks with position and opacity controls.
Authentication
All API requests require a valid API key passed in the Authorization header as a Bearer token.
Rate Limit
20 requests per minute
Endpoints
1 endpoint available
Overview
Stamps an image watermark (a logo or signature, ideally a PNG with transparency) onto up to 5 photos, at the opacity and position you choose, using the same drawing code as the web page.
Placement
- The watermark is drawn at 20% of its own pixel size, whatever the size of the photo. Resize the watermark file to make it bigger or smaller.
- Corner positions sit 10 px from the edges.
centercentres it.repeattiles it across the photo, starting 50 px from the top-left corner with 50 px gaps.
Limits and behavior
- Send multipart/form-data: the photos in the
filefield (repeat it for up to 5 photos) and the watermark in thewatermarkfield. JPEG, PNG, WebP, GIF (first frame), AVIF or TIFF, up to 20 MB each and 16 megapixels each. HEIC is not supported. EXIF rotation is applied. - Results are JPEG (quality 92), as on the page. JPEG has no transparency, so transparent areas of a photo come out black.
- One photo returns the JPEG itself (
image/jpeg, namedwatermarked-<name>.jpg). Several photos return a ZIP (application/zip,watermarked-images.zip) of those JPEGs. - Errors are JSON:
{"success": false, "error": "..."}. Photos are not stored.
Endpoints
POST
https://opentools.ca/api/v1/tools/add-watermarkAdd an image watermark to 1 to 5 photos
Request Body
Content-Type: multipart/form-data
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Required | A photo to watermark. Repeat the field for up to 5 photos. Up to 20 MB and 16 megapixels each. |
| watermark | file | Required | The watermark image, drawn at 20% of its own size. A PNG with transparency works best. |
| position | string Enum: top-left, top-right, bottom-left, bottom-right, center, repeat | Optional | Where to place the watermark. repeat tiles it across the photo.Default: bottom-right |
| opacity | number | Optional | Watermark opacity in percent, 0-100.Default: 50 |
Response Example
One photo: the body is the watermarked JPEG (Content-Type: image/jpeg). Several photos: the body is a ZIP of JPEGs (Content-Type: application/zip). Errors return JSON, for example:
{
"success": false,
"error": "Upload a file in the 'watermark' form field."
}Error Codes
400
Bad Request - Missing photo or watermark, more than 5 photos, an invalid option, or an image that could not be read or is over 16 megapixels401
Unauthorized - Invalid or missing API key403
Forbidden - API key inactive, expired, or not allowed from this IP413
Payload Too Large - A file is over 20 MB415
Unsupported Media Type - A file is not a JPEG, PNG, WebP, GIF, AVIF or TIFF image429
Too Many Requests - Rate limit exceeded500
Internal Server ErrorCode Examples
# One photo -> JPEG
curl -X POST https://opentools.ca/api/v1/tools/add-watermark \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@photo.jpg" \
-F "watermark=@logo.png" \
-F "position=bottom-right" \
-F "opacity=60" \
-o watermarked-photo.jpg
# Several photos -> ZIP
curl -X POST https://opentools.ca/api/v1/tools/add-watermark \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@one.jpg" \
-F "file=@two.jpg" \
-F "watermark=@logo.png" \
-F "position=repeat" \
-o watermarked-images.zipRather use it in your browser? Open the Add Watermark