Skip to main content

Custom Watermark

The Hunyuan image generation model supports adding custom watermarks directly during image generation. Specify the watermark text via the SDK's footnote parameter — no need to implement image compositing logic yourself.

Parameters

ParameterTypeRequiredDescription
footnotestringNoWatermark text content

Usage Example

Using Node SDK, pass the footnote parameter to generateImage to add a watermark:

const cloudbase = require('@cloudbase/node-sdk')
const app = cloudbase.init({ env: process.env.ENV_ID })
const ai = app.ai()

const imageModel = ai.createImageModel('hunyuan-image')
const res = await imageModel.generateImage({
model: 'HY-Image-3.0-Plus-4090-Tob-v1.0',
prompt: 'A chubby orange cat napping on a windowsill, watercolor style, warm tones',
footnote: 'CloudBase AI',
})

console.log(res.data[0].url) // The returned image already contains the watermark

Access Methods

Notes

  • Watermarks are applied server-side during image generation and do not add extra processing time
  • The footnote parameter is supported by all three SDKs' generateImage method