Add Watermark

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. center centres it. repeat tiles 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 file field (repeat it for up to 5 photos) and the watermark in the watermark field. 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, named watermarked-<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-watermark
Add an image watermark to 1 to 5 photos

Request Body

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
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
OptionalWhere to place the watermark. repeat tiles it across the photo.Default: bottom-right
opacity
number
OptionalWatermark 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 megapixels
401
Unauthorized - Invalid or missing API key
403
Forbidden - API key inactive, expired, or not allowed from this IP
413
Payload Too Large - A file is over 20 MB
415
Unsupported Media Type - A file is not a JPEG, PNG, WebP, GIF, AVIF or TIFF image
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code 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.zip

Ready to get started?

Create an API key to start using the Add Watermark API.

Rather use it in your browser? Open the Add Watermark