CreateWatermarkEmbedTask
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)
| Category | Input | Output |
| image | JPEG, JPG, PNG, BMP, and WEBP | Retains the original input format |
| video | MP4, MOV, MKV, AVI, and TS | Unified MP4 container (H.264, yuv420p) with the same resolution and frame rate as the input |
| audio | WAV, MP3, M4A, AAC, FLAC, OGG, WMA, OPUS, and AMR | Always WAV (PCM 16-bit) with the same sample rate and number of channels as the input |
Try it now
Test
RAM authorization
|
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:
|
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.