Embeds a C2PA digital signature into a user-uploaded image and returns the download URL.
Operation description
Operation description
Specify at least one of
ImageUrlandObjectKey. If both are specified,ObjectKeytakes precedence.When you use
ObjectKey, the system verifies that theObjectKeybelongs to the current caller. Cross-tenant access is not allowed.Supported image formats are JPEG and PNG. Unsupported formats return the
C2PA_FORMAT_UNSUPPORTEDerror.If the original image already contains a C2PA signature, the system retains the original signature as an ingredient and appends a new signature.
Use the
ClientTokenparameter to ensure idempotence. Make sure the value is unique across different requests and does not exceed 64 characters.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. The client generates this value. Make sure the value is unique across different requests. ClientToken supports only ASCII characters and cannot exceed 64 characters in length. |
|
| ImageUrl |
string |
No |
The URL of the image to be signed. HTTP and HTTPS URLs are supported. Specify at least one of |
|
| ObjectKey |
string |
No |
The ObjectKey of the image to be signed in OSS. When you use |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| SignTime |
string |
The signing time in ISO 8601 format, such as |
|
| RequestId |
string |
The request ID. |
|
| SignedImageUrl |
string |
The pre-signed download URL of the signed image. |
|
| CertificateSubject |
string |
The subject information of the signing certificate. |
|
| ObjectKey |
string |
The ObjectKey of the signed image in OSS. You can use this value for subsequent API calls. |
|
| Algorithm |
string |
The algorithm used for signing, such as ps256 or es256. |
|
| Success |
boolean |
Indicates whether the request was successful. |
|
| Message |
string |
The additional information. The value "success" is returned if the request succeeds. |
|
| HttpStatusCode |
integer |
The HTTP status code. The value 200 is returned if the request succeeds. |
|
| Code |
string |
The business error code. The value "OK" is returned if the request succeeds. |
Examples
Success response
JSON format
{
"SignTime": "",
"RequestId": "",
"SignedImageUrl": "",
"CertificateSubject": "",
"ObjectKey": "",
"Algorithm": "",
"Success": true,
"Message": "",
"HttpStatusCode": 0,
"Code": ""
}
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.