CreateWatermarkEmbedTask

Updated at:

Submits an invisible watermark embedding task to embed specified watermark content into an image, video, or audio file, and returns a task ID for asynchronous querying of the embedded output.

Operation description

Request description

  • Site and file accessibility: This service has two sites: Hangzhou and Singapore (ap-southeast-1). Files are downloaded by the node of the site that receives the request. Both sites can access public URLs (including cross-border retrieval of files from the other site's region). However, cross-border link latency and source bucket ACLs are not guaranteed by this service. Upload files to an Alibaba Cloud OSS bucket in the same region as the called site (Hangzhou site -> regions in the Chinese mainland, Singapore site -> ap-southeast-1), and then use the presigned URL of the file as the input parameter for this operation. References: How to obtain the URL of a single object or the URLs of multiple objects

  • FileType must match the actual file type and must be the same during extraction as during embedding.

  • The maximum supported file size is 150 MB.

  • Image resolution limits: the short side must be ≥ 128 pixels and the long side must be ≤ 6000 pixels.

  • Video duration limit: <= 600 seconds.

  • The task completion time is approximately equal to the file duration. For example, embedding a 10-second video takes about 10 seconds.

  • If the submission fails, no task record is created and a synchronous error is returned directly.

Supported file formats (input/output)

CategoryInputOutput
imageJPEG, JPG, PNG, BMP, and WEBPRetains the original input format
videoMP4, MOV, MKV, AVI, and TSUnified MP4 container (H.264, yuv420p) with the same resolution and frame rate as the input
audioWAV, MP3, M4A, AAC, FLAC, OGG, WMA, OPUS, and AMRAlways WAV (PCM 16-bit) with the same sample rate and number of channels as the input

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

aideepsign:CreateWatermarkEmbedTask

create

*All Resource

*

None None

Request syntax

GET  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ClientToken

string

No

The reserved idempotency field. This field is not supported. Passing this field does not cause an error, but it does not produce an idempotency effect.

5A2CFF0E-5718-45B5-9D4D-70B3FF3898

FileType

string

Yes

The file type. Valid values: image, video, and audio. The value must match the actual file type. When the input is audio, the output is always in WAV format.

Valid values:

  • image :

    image

  • video :

    video

  • audio :

    audio

video

FileUrl

string

No

The URL of the file to be processed. The URL must be publicly accessible. Provide a presigned URL of an Alibaba Cloud OSS bucket in the same region as the called site (Hangzhou site -> regions in the Chinese mainland, Singapore site -> ap-southeast-1). For more information, see the request description.

https://example.com/demo.mp4

WatermarkContent

string

Yes

The watermark content. The embedded output can be used to restore this text by calling the extraction operation.

wm-e2e-85970647

Level

string

Yes

The embedding strength. Valid values: integers from 0 to 3. A higher strength indicates better robustness but lower visual quality.

"1"

Reserved deprecated

string

No

The reserved field. No valid values are available. Do not pass this field when calling the operation.

""

Response elements

Element

Type

Description

Example

object

Response parameters.

RequestId

string

The request ID.

A1B2C3D4-E5F6-7890-ABCD-EF1234567890

TaskId

string

The ID of the invisible watermark embedding task. You can call the GetWatermarkEmbedTaskResult operation to query the result.

f47ac10b-58cc-4372-a567-0e02b2c3d479

Success

boolean

Indicates whether the request is successful.

true

Message

string

The returned message.

success

HttpStatusCode

string

The HTTP status code. If the request is successful, 200 is returned.

200

Code

string

The business error code. If the request is successful, "OK" is returned.

OK

Examples

Success response

JSON format

{
  "RequestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
  "TaskId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "Success": true,
  "Message": "success",
  "HttpStatusCode": "200",
  "Code": "OK"
}

Error codes

HTTP status code

Error code

Error message

Description

400 IdempotentParameterMismatch The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.
400 InvalidParam Invalid parameter value. Invalid parameter value.
500 InternalServerError An internal error occurred. An internal error occurred.
429 Throttling Request was denied due to user flow control. Request was denied due to user flow control.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.