API Parameters
To use ArtenoMark API, you need to make a POST request to one of the two supported endpoints: /watermark/image or /watermark/text.
- Use
POST /watermark/image: to apply Image-on-Image watermarks. Example: Adding your company logo image to an image. - Use
POST /watermark/text: to apply Text-on-Image watermarks. Example: adding “© YourSite” at the bottom of your image.
Parameters
To use ArtenoMark, just make a request to one of the endpoints with the needed parameters.
Common Parameters
These parameters are supported by both the endpoints.
-
The Main ImageThe base image to watermark. It is required. Provide using exactly one of these parameters:
-
image: For the main image as a file. -
image_url: For the publicly accessible URL of the main image. -
image_datastring: For the DataURL representation of the main image. -
image_base64: For Base64-encoded main image data.
The priority is as follows:
image>image_url>image_datastring>image_base64 -
-
opacityThe opacity (transparency) of the watermark. -
positionThe position of the watermark. Only works ifxandyare not set. -
xThe X coordinate of the watermark for positioning, relative to the image. It overrides the value ofposition. -
yThe Y coordinate of the watermark for positioning, relative to the image. It overrides the value ofposition. -
marginThe distance from the edge of the image to the watermark text/image. It is relative to the image size. -
rotation_angleRotate the watermark. It is in degrees. -
repeatWhether to repeat the watermark or not. -
repeat_spacingThe horizontal spacing between repeating watermarks. It is relative to the image size. -
vertical_spacingThe vertical spacing between repeating watermarks. It is also relative to the image size. -
target_formatFile format of the output image. -
target_typeDetermines how the output image should be delivered. -
retain_exifWhether to retain the EXIF metadata or not.
Text Parameters
These parameters are only supported by the text-on-image endpoint. (POST /watermark/text) They are used to apply styles to the text that will be applied as watermark.
-
watermark_textThe text which will be applied as watermark. It is required. -
text_font_familyThe Google Fonts slug of the font.Learn How to get the correct font-family from Google Fonts?
-
text_colorThe color of the text. -
text_font_sizeThe size of the text in px. It is relative to the image size. -
text_backgroundThe background color of the text. -
text_font_weightThe thickness of the font. -
text_font_styleWhether the text should be italic or normal. -
paddingInternal padding of the text box.
Image Parameters
These parameters are only applicable for the image-on-image endpoint. (POST /watermark/image) These parameters can customize the placement of the logo image:
-
The watermark imageThe watermark image (logo image) to watermark. It is required for the image-on-image watermark endpoint. Provide the watermark logo by any one of the following parameters:
-
watermark_image: For the logo image as a file. -
watermark_url: For the publicly accessible URL of the logo image. -
watermark_datastring: For the DataURL representation of the logo image. -
watermark_base64: For Base64-encoded logo image data.
The priority is as follows:
watermark_image>watermark_url>watermark_datastring>watermark_base64 -
-
watermark_scaleScale factor relative to the shorter side of the base image to ensure the watermark always fits.
How to get the correct font_family from Google Fonts?
To use any Google Font inside the ArtenoMark API, you need the exact font slug Google uses in its URL.
Here's how to grab it correctly:
- Open Google Fonts and click the font you want.
- Look at the URL in your browser. Anything that comes after
/specimen/is the official font slug.
Example:
If the page is https://fonts.google.com/specimen/Playwrite+MX then the slug isPlaywrite+MX. - Use that slug as the value for the
font_familyparameter in the API. - ArtenoMark will automatically load that font for your watermark.
Notes
- If the
font_familyis invalid or can't be loaded, the API automatically falls back to Roboto. - The font slug is case-sensitive.
- You can use spaces or plus signs — both work.
(Open Sans → Open+Sans, and vice-versa) -
Valid examples:
- Roboto
- Playwrite+MX
- Nunito
- Open+Sans
- Lato
Still can't figure out how to implement?
Then, check out the examples to get an idea about how to implement.
Confused about the parameters?
Check out the demo wizard, from where you can play with all the parameters, and see ArtenoMark live in action.
Still have any doubts?
If you still have any doubts, feel free to contact us.