apyhub
Back
▣ FILE MANIPULATION · IMAGE PROCESSING

Apply Watermark on Images API

Hosted on ApyHub

What it does

Apply Watermark adds text or image watermarks to an input image and returns the processed file or a signed download link. Send the source image as Base64, multipart upload, or a URL, then choose whether the watermark comes from watermark_text, watermark_base64, watermark_image, or watermark_image_url.

You can control placement and appearance with fields like watermark_position, watermark_angle, watermark_opacity, watermark_font_size, watermark_font_color, watermark_image_size, and the text spacing and background options. The service also supports preserve_format and an output name for the generated file.

Use Apply Watermark when you need to brand marketing assets, label preview images, protect sample photos, or stamp internal documents before sharing them. The URL-based endpoints let you process remote images directly, while the Base64 and multipart endpoints fit backend workflows that already handle file uploads or encoded content.

Choose the download endpoints when you want the transformed image returned as binary data. Choose the link endpoints when your app prefers a signed URL in the response data field.

▣ ENDPOINT 01 / 06
POST
Apply watermark (base64 bodies, download)
https://api.eu.apyhub.com/apyhub/apply-watermark/base64/download

QUICKSTART

GUIDE

Quickstart

Create a watermarked image from a Base64-encoded source image and return the processed file.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/base64/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=",
    "watermark_text": "Confidential"
  }'

What you'll get back

Returns a binary file containing the generated image.

TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Source image as Base64 (image_base64 required). Watermark via watermark_text or watermark_base64; placement/style keys match URL JSON / multipart parity.
Required — standard Base64-encoded image bytes.

About this endpoint

What it does

Applies a watermark to a source image provided as Base64 and returns the processed file as binary content. The request body carries the source image and optional watermark configuration, while the response is the generated file itself.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename stem.
preserve_formatBooleanWhether to preserve the input file format.

Request Body

ParameterTypeDescription
sizeStringImage size setting.
image_base64StringSource image as standard Base64-encoded image bytes.
watermark_textStringWatermark text to apply.
watermark_angleStringWatermark rotation angle.
watermark_base64StringWatermark image as Base64. Use this or watermark_text depending on the desired watermark type.
watermark_opacityStringWatermark opacity setting.
watermark_positionStringWatermark placement.
watermark_font_sizeStringWatermark text font size.
watermark_font_colorString ArrayWatermark text font color components.
watermark_image_sizeStringWatermark image size setting.
watermark_text_paddingStringWatermark text padding.
watermark_text_alignmentStringWatermark text alignment.
watermark_text_line_spacingStringWatermark text line spacing.
watermark_text_background_colorStringWatermark text background color.

Response

Returns a binary file in the response body. The output schema is a single binary string, so there is no JSON wrapper or named JSON fields to parse.

ParameterTypeDescription
binary bodyStringBinary response content containing the watermarked file.
▣ ENDPOINT 02 / 06
POST
Apply watermark (base64 bodies, signed URL)
https://api.eu.apyhub.com/apyhub/apply-watermark/base64/link

QUICKSTART

GUIDE

Quickstart

Upload a Base64 image and a watermark, then return a watermarked image URL.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/base64/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAA...",
    "watermark_text": "Confidential"
  }'

What you'll get back

Returns a JSON object with a data string field containing a URI for the watermarked image.

{
  "data": "https://example.com/watermarked-image.png"
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Source image as Base64 (image_base64 required). Watermark via watermark_text or watermark_base64; placement/style keys match URL JSON / multipart parity.
Required — standard Base64-encoded image bytes.

About this endpoint

What it does

Applies a watermark to a source image provided as Base64 and returns a JSON object containing a data URI string for the resulting output.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name.
preserve_formatBooleanPreserves the source image format when set.

Request Body

ParameterTypeDescription
sizeStringOutput size.
image_base64StringRequired — standard Base64-encoded image bytes. Source image to watermark.
watermark_textStringWatermark text. Use this or watermark_base64 for the watermark source.
watermark_angleStringWatermark rotation angle.
watermark_base64StringBase64-encoded watermark image. Use this or watermark_text for the watermark source.
watermark_opacityStringWatermark opacity.
watermark_positionStringWatermark placement.
watermark_font_sizeStringWatermark text font size.
watermark_font_colorString ArrayWatermark text font color components.
watermark_image_sizeStringWatermark image size.
watermark_text_paddingStringWatermark text padding.
watermark_text_alignmentStringWatermark text alignment.
watermark_text_line_spacingStringWatermark text line spacing.
watermark_text_background_colorStringWatermark text background color.

Response

Returns a JSON object with a data string field formatted as a URI. The success response body contains the generated result location or data reference in data.

ParameterTypeDescription
dataStringURI to the generated output.
▣ ENDPOINT 03 / 06
POST
Apply watermark (multipart, download)
https://api.eu.apyhub.com/apyhub/apply-watermark/multi-part/download

QUICKSTART

GUIDE

Quickstart

Upload an image and a watermark as multipart form data to generate a watermarked file.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"

What you'll get back

Returns a binary file (string with format: binary) — the downloaded watermarked image output.

(binary file content)
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Applies a watermark to an uploaded image and returns the processed file as binary data. The request sends the source image plus optional watermark settings in the multipart body.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput file name or identifier.
preserve_formatBooleanWhether to preserve the original file format.

Request Body

ParameterTypeDescription
imageBinaryThe source image file to watermark. Binary upload.
sizeStringSize setting for the operation.
watermark_textStringWatermark text to apply.
watermark_angleStringWatermark angle setting.
watermark_imageBinaryWatermark image file to apply. Binary upload.
watermark_opacityStringWatermark opacity setting.
watermark_positionStringWatermark position setting.
watermark_font_sizeStringWatermark text font size.
watermark_font_colorStringWatermark text font color.
watermark_image_sizeStringWatermark image size setting.
watermark_text_paddingStringWatermark text padding setting.
watermark_text_alignmentStringWatermark text alignment setting.
watermark_text_line_spacingStringWatermark text line spacing setting.
watermark_text_background_colorStringWatermark text background color.

Response

Returns binary file data as the success response. The output is a single binary payload, not a JSON object.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 04 / 06
POST
Apply watermark (multipart, signed URL)
https://api.eu.apyhub.com/apyhub/apply-watermark/multi-part/link

QUICKSTART

GUIDE

Quickstart

Upload an image and apply a watermark from a public image URL in one request.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/multi-part/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "image=@/path/to/image.jpg"

What you'll get back

Returns a JSON object with a data string field containing a URI for the generated file.

{
  "data": "https://example.com/output.jpg"
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Applies a watermark to the provided image and returns a JSON object containing a data URI string for the resulting file. The request is sent as multipart data, with the source image required and optional watermark settings supplied in the body.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename/identifier for the generated result.
preserve_formatBooleanWhether to preserve the input file format.

Request Body

ParameterTypeDescription
imageBinarySource image file to watermark.
sizeStringSize setting for the watermark operation.
watermark_textStringText to use as the watermark.
watermark_angleStringWatermark angle.
watermark_imageBinaryWatermark image file.
watermark_opacityStringWatermark opacity.
watermark_positionStringWatermark position.
watermark_font_sizeStringWatermark font size.
watermark_font_colorStringWatermark font color.
watermark_image_sizeStringWatermark image size.
watermark_text_paddingStringWatermark text padding.
watermark_text_alignmentStringWatermark text alignment.
watermark_text_line_spacingStringWatermark text line spacing.
watermark_text_background_colorStringWatermark text background color.

Response

Returns a JSON object with a data string field formatted as a URI. This field contains the result produced by the watermark operation.

ParameterTypeDescription
dataStringResult URI returned by the endpoint.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 05 / 06
POST
Apply watermark (URL fetch, download)
https://api.eu.apyhub.com/apyhub/apply-watermark/url/download

QUICKSTART

GUIDE

Quickstart

Generate a watermarked image from an image URL using a text watermark.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/url/download?output=my-invite" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://assets.apyhub.com/samples/sample.jpg",
    "watermark_text": "Confidential"
  }'

What you'll get back

Returns the generated file as raw binary data.

TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Watermark URL mode. Image from image_url. Either watermark_text or watermark image URL (watermark_image_url). Style/placement fields mirror multipart names (watermark_position, watermark_opacity, …).

About this endpoint

What it does

Applies a watermark to an image fetched from a URL and returns the processed file as binary output. The request body supplies the source image URL plus either watermark text or a watermark image URL, along with optional styling and placement settings.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput filename or identifier sent as a query parameter.
preserve_formatBooleanWhether to preserve the original format.

Request Body

ParameterTypeDescription
sizeStringSize setting for the watermark operation.
image_urlStringSource image URL to fetch and watermark. Must be a URI.
watermark_textStringWatermark text to apply.
watermark_angleStringWatermark angle setting.
watermark_opacityStringWatermark opacity setting.
watermark_positionStringWatermark position setting.
watermark_font_sizeStringWatermark font size setting.
watermark_image_urlStringWatermark image URL to apply instead of text. Must be a URI.
watermark_font_colorString ArrayWatermark font color values.
watermark_image_sizeStringWatermark image size setting.
watermark_text_paddingStringWatermark text padding setting.
watermark_text_alignmentStringWatermark text alignment setting.
watermark_text_line_spacingStringWatermark text line spacing setting.
watermark_text_background_colorStringWatermark text background color setting.

Response

Returns a binary file response (string with binary format) containing the watermarked output image.

▣ ENDPOINT 06 / 06
POST
Apply watermark (URL fetch, signed URL)
https://api.eu.apyhub.com/apyhub/apply-watermark/url/link

QUICKSTART

GUIDE

Quickstart

Create a watermarked image from an image URL and return the output URL.

curl -X POST "https://api.eu.apyhub.com/apyhub/apply-watermark/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://assets.apyhub.com/samples/sample.jpg",
    "watermark_text": "Confidential"
  }'

What you'll get back

Returns a JSON object with a data string field containing the output image URL.

{
  "data": "https://example.com/watermarked-image.jpg"
}
TRY ITLIVE · 60 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Watermark URL mode. Image from image_url. Either watermark_text or watermark image URL (watermark_image_url). Style/placement fields mirror multipart names (watermark_position, watermark_opacity, …).

About this endpoint

What it does

Applies a watermark to an image fetched from a signed URL. The request body provides the source image URL and either watermark text or a watermark image URL, plus optional styling and placement settings; the response returns the processed file as a URI string in a JSON object.

Query Parameter(s)

AttributeTypeDescription
outputStringOutput name.
preserve_formatBooleanPreserves the original format when set.

Request Body

ParameterTypeDescription
sizeStringOutput size.
image_urlStringSource image URL to watermark. Must be a URI.
watermark_textStringWatermark text to apply.
watermark_angleStringWatermark angle.
watermark_opacityStringWatermark opacity.
watermark_positionStringWatermark position.
watermark_font_sizeStringWatermark font size.
watermark_image_urlStringWatermark image URL. Must be a URI.
watermark_font_colorString ArrayWatermark font color values.
watermark_image_sizeStringWatermark image size.
watermark_text_paddingStringWatermark text padding.
watermark_text_alignmentStringWatermark text alignment.
watermark_text_line_spacingStringWatermark text line spacing.
watermark_text_background_colorStringWatermark text background color.

Response

Returns a JSON object with a data URI string field containing the processed image location.

ParameterTypeDescription
dataStringURI of the generated output.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.