Watermark Adder

This endpoint allows you to apply text-based watermarks to images automatically. It is ideal for copyright protection, branding, and asset management by embedding custom text directly onto your visual content.

Endpoint

POST https://api.zapifyapi.com/v1/{api_token}

Path Parameters

Parameter Type Description
api_token string Required. Your unique API access token for the Watermark Adder service.

Request Body

The request expects a JSON object.

Key Type Description
binaryData string Required. The Base64 encoded string of the image you want to watermark.
watermark_text string Required. The text you want to overlay on the image.

Example Request

cURL

curl -X POST "https://api.zapifyapi.com/v1/YOUR_API_TOKEN" 
     -H "Content-Type: application/json" 
     -d '{
           "binaryData": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mnk5+cHAARjAyC6y...",
           "watermark_text": "Confidential - ZapifyAPI"
         }'

Node.js

const axios = require("axios");
const fs = require("fs");

// Read image and convert to Base64
const imageBuffer = fs.readFileSync("input.png");
const base64Image = imageBuffer.toString("base64");

const payload = {
    binaryData: base64Image,
    watermark_text: "Copyright 2023"
};

axios.post("https://api.zapifyapi.com/v1/YOUR_API_TOKEN", payload, {
    responseType: "arraybuffer" // Important to handle binary response
})
.then(response => {
    // Save the returned watermarked image
    fs.writeFileSync("watermarked_output.png", response.data);
    console.log("Watermarked image saved!");
})
.catch(error => {
    console.error(error);
});

Response

Returns the watermarked image directly as a binary file (e.g., image/png).