Help Center/ Data Security Center/ API Reference/ API Description/ Image Watermarking/ Previewing an Embedded Image Watermark by Address
Updated on 2026-01-13 GMT+08:00

Previewing an Embedded Image Watermark by Address

Function

This API is used to embed a watermark based on the provided image address and generate a preview.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/watermark/embed/image-address/preview

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

blind_watermark

No

String

Invisible watermark content.

dst_file

No

String

Target file path.

image_watermark

No

String

Image watermark content.

is_blind_mark

No

Boolean

Whether to embed the invisible watermark.

is_visible_mark

No

Boolean

Whether to embed the visible watermark.

offset_x

No

Integer

Watermark horizontal offset.

offset_y

No

Integer

Watermark vertical offset.

opacity

No

Integer

Watermark transparency.

region_id

No

String

Region ID.

src_file

No

String

Source file path.

text_color

No

Integer

Text color.

text_rotation

No

Integer

Text rotation angle.

visible_image_watermark

No

String

Visible image watermark.

visible_text_watermark

No

String

Visible text watermark.

visible_watermark_position

No

String

Visible watermark position.

visible_watermark_type

No

String

Visible watermark type.

watermark_size

No

Integer

Watermark size.

Response Parameters

Status code: 200

Preview generated.

Status code: 201

Preview generated.

None

Example Requests

POST /v1/{project_id}/watermark/embed/image-address/preview

{
  "dst_file" : "obs://autotest-add/dsc_test.png",
  "is_blind_mark" : false,
  "is_visible_mark" : true,
  "offset_x" : 0,
  "offset_y" : 0,
  "opacity" : 50,
  "region_id" : "string",
  "src_file" : "obs://a-real-obs/dsc.png",
  "text_color" : 15688290,
  "visible_text_watermark" : "test",
  "visible_watermark_position" : "CENTER",
  "visible_watermark_type" : "TEXT",
  "watermark_size" : 50
}

Example Responses

None

Status Codes

Status Code

Description

200

Preview generated.

201

Preview generated.

401

Unauthorized.

403

Access denied.

404

Resource not found.

Error Codes

See Error Codes.