TUIWOTUIWO
APIByteDanceSeedance series

Asset groups

Create, get, list, update and delete asset groups.

CreateAssetGroup

curl -X POST 'https://ai.tuiwo.vip/ai?Action=CreateAssetGroup&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "Name": "Product images",
    "Description": "Reference assets",
    "GroupType": "AIGC",
    "ProjectName": "default"
  }'
FieldTypeRequiredDescription
NamestringyesGroup name, up to 64 characters
DescriptionstringnoDescription, up to 300 characters
GroupTypestringnoFor example AIGC or LivenessFace
ProjectNamestringnoProject name, defaults to default

Response:

{
  "Result": {
    "Id": "GROUP_ID"
  }
}

GetAssetGroup

curl -X POST 'https://ai.tuiwo.vip/ai?Action=GetAssetGroup&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"Id":"GROUP_ID"}'
FieldTypeRequiredDescription
IdstringyesGroup ID
ProjectNamestringnoDefaults to default

Result fields: Id, Name, Description, GroupType, ProjectName, CreateTime, UpdateTime.

ListAssetGroups

curl -X POST 'https://ai.tuiwo.vip/ai?Action=ListAssetGroups&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"Filter":{"GroupType":"AIGC","Name":"Product"},"PageNumber":1,"PageSize":20}'
FieldTypeDescription
Filter.GroupTypestringFilter by group type
Filter.GroupIdsstring[]Filter by group IDs
Filter.NamestringFilter by name
NextTokenstringCursor token
MaxResultsintegerCursor page size, 1-100
SortBystringCreateTime or UpdateTime
SortOrderstringDesc or Asc
PageNumberintegerPage number
PageSizeintegerPage size; platform currently caps around 50

Response Result contains Items with the same group fields, plus NextToken, PageNumber, PageSize, and TotalCount.

UpdateAssetGroup

curl -X POST 'https://ai.tuiwo.vip/ai?Action=UpdateAssetGroup&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"Id":"GROUP_ID","Name":"New name"}'
FieldTypeRequiredDescription
IdstringyesGroup ID
NamestringnoNew name
DescriptionstringnoNew description
ProjectNamestringnoDefaults to default

Response Result.Id.

DeleteAssetGroup

curl -X POST 'https://ai.tuiwo.vip/ai?Action=DeleteAssetGroup&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"Id":"GROUP_ID"}'

Deleting a group removes all its assets and is irreversible. Private liveness groups may need to be expired or rejected before deletion.