Asset Groups
List, create, query, update, and delete asset groups (ListAssetGroups / GetAssetGroup / CreateAssetGroup / UpdateAssetGroup / DeleteAssetGroup)
An asset group is the container for assets. Create a group first, then upload assets into it (see Assets). All five Actions below use the CRUD envelope response format.
Ark-compatible entry: every Action on this page also works as
POST /?Action={Action}&Version=2024-01-01(alias/api/ark). Request bodies use the same schemas;ListAssetGroupsis answered from the gateway ownership table on both forms. See Ark-compatible examples below and Differences Between the Two Forms.
ListAssetGroups — List Asset Groups
Lists the asset groups owned by the current API key, read from the gateway ownership table (no upstream call). Both the path form and the Ark-compatible form use this same source.
Request
| Field | Type | Required | Description |
|---|---|---|---|
Filter.GroupType | string | No | Group type filter (AIGC / LivenessFace) |
PageNumber | int | No | Page number, starting at 1; values below 1 fall back to 1 |
PageSize | int | No | Page size, 1–100; values outside that range fall back to 20 |
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/api/material/ListAssetGroups" \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"Filter":{"GroupType":"AIGC"},"PageNumber":1,"PageSize":20}'Response
{
"ResponseMetadata": { "RequestId": "req_local_1_1", "Action": "ListAssetGroups", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": {
"TotalCount": 1,
"Items": [
{ "Id": "group-xxx", "Name": "My Asset Group", "GroupType": "AIGC", "CreateTime": "2026-08-19T02:10:00Z", "UpdateTime": "2026-08-19T02:10:00Z" }
],
"PageNumber": 1,
"PageSize": 20
}
}The list is built from the gateway ownership table, so a group renamed through
UpdateAssetGroupmay still show its oldNamehere until the local record is refreshed. UseGetAssetGroup(which reads upstream) for the current name. The Ark-compatible form uses the same local ownership table and applies the same API-key isolation — see Ark-compatible examples.
GetAssetGroup — Get Asset Group Details
Query an asset group by Id. Only groups owned by the current API key are accessible; others return 404 NotFound.
Request
| Field | Type | Required | Description |
|---|---|---|---|
Id | string | Yes | Asset group id (group-...) |
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/api/material/GetAssetGroup" \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"Id":"group-xxx"}'Response
{
"ResponseMetadata": { "RequestId": "req_xxx", "Action": "GetAssetGroup", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": { "Id": "group-xxx", "Name": "My Asset Group", "GroupType": "AIGC", "CreateTime": "2026-08-19T02:10:00Z", "UpdateTime": "2026-08-19T02:10:00Z" }
}CreateAssetGroup — Create Asset Group
Request
| Field | Type | Required | Description |
|---|---|---|---|
Name | string | Yes | Group name (≤255 chars, no </>, otherwise 400 InvalidParameter). Prefer ASCII — upstream may corrupt Chinese names into � |
Description | string | No | Description |
GroupType | string | Yes | Group type; currently only AIGC |
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/api/material/CreateAssetGroup" \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"Name":"My Asset Group","Description":"test","GroupType":"AIGC"}'Response
{
"ResponseMetadata": { "RequestId": "req_xxx", "Action": "CreateAssetGroup", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": { "Id": "group-xxx" }
}UpdateAssetGroup — Update Asset Group
Both
DescriptionandNamecan be updated;Namemust be ≤255 chars and free of</>(otherwise400 InvalidParameter). Groups not owned by you return404 NotFound.Note: renaming (
Name) writes straight to upstream, butListAssetGroupsis served from the gateway's local ownership table, which is not refreshed immediately after a rename — it may still show the old name. Trust theGetAssetGroup(direct upstream) result.
Request
| Field | Type | Required | Description |
|---|---|---|---|
Id | string | Yes | Asset group id |
Description | string | No | New description |
Name | string | No | New name (≤255 chars, no </>, otherwise 400 InvalidParameter) |
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/api/material/UpdateAssetGroup" \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"Id":"group-xxx","Description":"New description"}'Response
{
"ResponseMetadata": { "RequestId": "req_xxx", "Action": "UpdateAssetGroup", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": {}
}DeleteAssetGroup — Delete Asset Group
Deletes the group and all assets within it. Only groups owned by the current API key can be deleted; others return 404 NotFound (gateway groupOwnedByCurrentUser check).
Request
| Field | Type | Required | Description |
|---|---|---|---|
Id | string | Yes | Asset group id |
BASE_URL="https://yunjizi.cn" # Domestic; overseas use https://api.yunjizi.cn
curl "$BASE_URL/api/material/DeleteAssetGroup" \
-H "Authorization: Bearer sk-YOUR-KEY" \
-H "Content-Type: application/json" \
-d '{"Id":"group-xxx"}'Response
{
"ResponseMetadata": { "RequestId": "req_xxx", "Action": "DeleteAssetGroup", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": {}
}Ark-Compatible Examples
Every Action on this page also accepts Action in the query string. Request bodies are unchanged; the success Result is the same object shown above, wrapped in ResponseMetadata:
BASE_URL="https://api.yunjizi.cn"
# ListAssetGroups — served from the gateway ownership table, isolated per API key
curl -X POST "$BASE_URL/?Action=ListAssetGroups&Version=2024-01-01" \
-H "Authorization: Bearer sk-YOUR-KEY" -H "Content-Type: application/json" \
-d '{"Filter":{"GroupType":"AIGC"},"PageNumber":1,"PageSize":20}'
# CreateAssetGroup
curl -X POST "$BASE_URL/?Action=CreateAssetGroup&Version=2024-01-01" \
-H "Authorization: Bearer sk-YOUR-KEY" -H "Content-Type: application/json" \
-d '{"Name":"My Asset Group","Description":"test","GroupType":"AIGC"}'
# GetAssetGroup
curl -X POST "$BASE_URL/?Action=GetAssetGroup&Version=2024-01-01" \
-H "Authorization: Bearer sk-YOUR-KEY" -H "Content-Type: application/json" \
-d '{"Id":"group-xxx"}'
# UpdateAssetGroup
curl -X POST "$BASE_URL/?Action=UpdateAssetGroup&Version=2024-01-01" \
-H "Authorization: Bearer sk-YOUR-KEY" -H "Content-Type: application/json" \
-d '{"Id":"group-xxx","Description":"New description"}'
# DeleteAssetGroup
curl -X POST "$BASE_URL/?Action=DeleteAssetGroup&Version=2024-01-01" \
-H "Authorization: Bearer sk-YOUR-KEY" -H "Content-Type: application/json" \
-d '{"Id":"group-xxx"}'ListAssetGroups response through the query form — read from the same local ownership table as the path form, wrapped in the Ark envelope:
{
"ResponseMetadata": { "RequestId": "req_xxx", "Action": "ListAssetGroups", "Version": "2024-01-01", "Service": "ark", "Region": "cn-beijing" },
"Result": {
"TotalCount": 1,
"Items": [
{ "Id": "group-xxx", "Name": "My Asset Group", "GroupType": "AIGC", "CreateTime": "2026-08-19T02:10:00Z", "UpdateTime": "2026-08-19T02:10:00Z" }
],
"PageNumber": 1,
"PageSize": 20
}
}Errors on the query form use ResponseMetadata.Error. Actions forwarded to upstream keep the upstream HTTP status; a failure of the local ListAssetGroups query returns 500 InternalError from the gateway. A non-string Id is rejected with 400 InvalidParameter before any ownership check. The /api/ark alias accepts the same query string when POST / is intercepted.