Image Annotation
Update:
Manual Annotations
Submit manual annotations for one or more existing image moderation tasks. This endpoint uses your corporation CID and corporation secret. The Image Annotation Callback API uses X-AppId and a different request body and signing format.
POSThttps://console-api.ilivedata.com/api/pir/mark
Headers
Header
Value
Description
Content-Type
application/json;charset=UTF-8
JSON request body
Accept
application/json;charset=UTF-8
Recommended; specifies the expected response format
Corp-Cid
Corporation CID
Available to corporation administrators under Console > Corporation Information; not the project ID
X-TimeStamp
Current UTC time
W3C format, for example 2026-10-19T02:30:00Z; replace with the current request time
Authorization
Signature
Use the corporation secret and the submission signing procedure below
Submission Body
Parameter
Required
Type
Description
pid
Required
Number
Image project ID
taskIds
Required
Array<String>
Existing image moderation task IDs
result
Required
Number
0: pass; 2: reject
tag
Conditional
Number or Array<Number>
Required when result=2. Omit or use 0 when result=0. Supports one or more primary category codes
operator
Optional
String
Operator name; defaults to openApiUser when omitted
Primary category codes: 100 political content, 110 violence and terrorism, 120 prohibited content, 130 pornography, 140 sexually suggestive content, 150 advertising, 160 values-related content, 180 minor protection, and 200 QR codes / mini-program codes / barcodes. Available categories depend on the project configuration.
{"pid":81000001,"taskIds":["image_task_id"],"result":2,"tag":[100,130],"operator":"user_a"}
Follow the parameter contract above and provide valid task IDs, annotation results, and category codes.
Submission Signature
-
Encode the request parameters as UTF-8 JSON using these rules for both signing and transmission:
- Use compact JSON without indentation, line breaks, or spacing between fields. Preserve spaces inside string values.
- Preserve object field order and array element order; do not sort fields.
- Leave Unicode characters and slashes
/ unescaped. Escape double quotes, backslashes, and control characters as required by JSON.
- Represent
pid, result, and category codes as integers, without decimal points or scientific notation.
Compute SHA-256 over these UTF-8 bytes and encode the digest as lowercase hexadecimal. Send the same JSON string; avoid serializing it again after signing.
-
Join these six components with ASCII newlines (\n), without a trailing newline:
POST
console-api.ilivedata.com
/api/pir/mark
<SHA-256 hexadecimal digest from step 1>
Corp-Cid:<exact corporation CID from the header>
X-TimeStamp:<exact timestamp from the header>
For another deployment domain, use the actual request hostname, excluding the scheme and port. The path excludes query parameters. Use the same lowercase hostname in the request and signing string.
-
Compute HMAC-SHA256 using the corporation secret, Base64-encode the binary digest, and send it in Authorization:
Authorization = Base64(HMAC-SHA256(CorpSecret, StringToSign))
Submission Response
Successful response:
{"code":0,"msg":"success.","data":true}
Missing parameters or authentication failures return errors. If the downstream annotation service does not report success, this endpoint returns a generic error with code=999 and data=[]. Check the business response code.
Manual Annotations
Submit manual annotations for one or more existing image moderation tasks. This endpoint uses your corporation CID and corporation secret. The Image Annotation Callback API uses X-AppId and a different request body and signing format.
https://console-api.ilivedata.com/api/pir/markHeaders
| Header | Value | Description |
|---|---|---|
Content-Type |
application/json;charset=UTF-8 |
JSON request body |
Accept |
application/json;charset=UTF-8 |
Recommended; specifies the expected response format |
Corp-Cid |
Corporation CID | Available to corporation administrators under Console > Corporation Information; not the project ID |
X-TimeStamp |
Current UTC time | W3C format, for example 2026-10-19T02:30:00Z; replace with the current request time |
Authorization |
Signature | Use the corporation secret and the submission signing procedure below |
Submission Body
| Parameter | Required | Type | Description |
|---|---|---|---|
pid |
Required | Number | Image project ID |
taskIds |
Required | Array<String> | Existing image moderation task IDs |
result |
Required | Number | 0: pass; 2: reject |
tag |
Conditional | Number or Array<Number> | Required when result=2. Omit or use 0 when result=0. Supports one or more primary category codes |
operator |
Optional | String | Operator name; defaults to openApiUser when omitted |
Primary category codes: 100 political content, 110 violence and terrorism, 120 prohibited content, 130 pornography, 140 sexually suggestive content, 150 advertising, 160 values-related content, 180 minor protection, and 200 QR codes / mini-program codes / barcodes. Available categories depend on the project configuration.
{"pid":81000001,"taskIds":["image_task_id"],"result":2,"tag":[100,130],"operator":"user_a"}
Follow the parameter contract above and provide valid task IDs, annotation results, and category codes.
Submission Signature
-
Encode the request parameters as UTF-8 JSON using these rules for both signing and transmission:
- Use compact JSON without indentation, line breaks, or spacing between fields. Preserve spaces inside string values.
- Preserve object field order and array element order; do not sort fields.
- Leave Unicode characters and slashes
/unescaped. Escape double quotes, backslashes, and control characters as required by JSON. - Represent
pid,result, and category codes as integers, without decimal points or scientific notation.
Compute SHA-256 over these UTF-8 bytes and encode the digest as lowercase hexadecimal. Send the same JSON string; avoid serializing it again after signing.
-
Join these six components with ASCII newlines (
\n), without a trailing newline:POST console-api.ilivedata.com /api/pir/mark <SHA-256 hexadecimal digest from step 1> Corp-Cid:<exact corporation CID from the header> X-TimeStamp:<exact timestamp from the header>For another deployment domain, use the actual request hostname, excluding the scheme and port. The path excludes query parameters. Use the same lowercase hostname in the request and signing string.
-
Compute HMAC-SHA256 using the corporation secret, Base64-encode the binary digest, and send it in
Authorization:Authorization = Base64(HMAC-SHA256(CorpSecret, StringToSign))
Submission Response
Successful response:
{"code":0,"msg":"success.","data":true}
Missing parameters or authentication failures return errors. If the downstream annotation service does not report success, this endpoint returns a generic error with code=999 and data=[]. Check the business response code.