CreateWatermarkEmbedTask
Submits an image or video file for invisible watermark embedding and returns a task ID for querying the result.
Operation description
Operation description
FileUrl must be a publicly accessible HTTP/HTTPS URL. External files are not supported. Only file URLs accessible over the Chinese mainland public network are supported. Upload the file to an Alibaba Cloud Object Storage Service (OSS) bucket in a Chinese mainland region first, and then use the presigned URL of the file as the input parameter for this operation. References: How do I obtain the URL of one or more objects?
FileType must match the actual file type. The same value must be specified during both embedding and fetch.
Supported file specifications: Video files must be no longer than 10 minutes and no larger than 100 MB. Image files must be no larger than 100 MB.
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.
Try it now
Test
RAM authorization
Request syntax
GET HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
A reserved idempotency field. This field is not supported. Passing a value 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:
The value must match the actual file type. Valid values:
|
video |
| FileUrl |
string |
No |
The URL of the file to be processed. Images and videos are supported. Only the HTTP and HTTPS protocols are supported. Videos must be no longer than 10 minutes and no larger than 100 MB. |
https://example.com/demo.mp4 |
| WatermarkContent |
string |
No |
The watermark content. The embedded content can be restored to the original text by calling the extraction operation. |
wm-e2e-85970647 |
| Level |
string |
Yes |
The embedding strength. Valid values: 0 to 5. A higher strength provides better robustness but lower visual quality. |
"2" |
| Reserved |
string |
No |
A reserved field. No valid values are available. Do not specify this parameter. |
"" |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| Code |
string |
The business error code. The value OK is returned if the request is successful. |
OK |
| HttpStatusCode |
string |
The HTTP status code. The value 200 is returned if the request is successful. |
200 |
| Message |
string |
The response message. |
success |
| RequestId |
string |
The request ID. |
A1B2C3D4-E5F6-7890-ABCD-EF1234567890 |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| TaskId |
string |
The invisible watermark embedding task ID. Use this ID to call GetWatermarkEmbedTaskResult to query the result. |
f47ac10b-58cc-4372-a567-0e02b2c3d479 |
Examples
Success response
JSON format
{
"Code": "OK",
"HttpStatusCode": "200",
"Message": "success",
"RequestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
"Success": true,
"TaskId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
}
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.