TUIWOTUIWO
APIByteDanceSeedance series

Asset items

Create, get, list, update and delete image, video and audio assets.

Status

StatusMeaning
PendingQueue state returned by some services (); not usable
ProcessingService is downloading, transcoding or moderating
ActiveReady; can be referenced as asset://<ID>
FailedProcessing failed; inspect Error.Code and Error.Message

Poll until Active before using an asset.

CreateAsset

curl -X POST 'https://ai.tuiwo.vip/ai?Action=CreateAsset&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "GroupId": "GROUP_ID",
    "AssetType": "Image",
    "URL": "https://example.com/product.png",
    "Name": "Product image"
  }'
FieldTypeRequiredDescription
GroupIdstringyesAsset group ID
AssetTypestringyesImage, Video or Audio
URLstringyesPublicly reachable asset URL
NamestringyesAsset name
ProjectNamestringnoDefaults to default

Response Result.Id. The URL must be downloadable by the service. The platform does not store the file and does not convert Base64 into a URL.

GetAsset

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

Result fields: Id, Name, URL, AssetType, Status, GroupId, ProjectName, CreateTime, UpdateTime, LastInferenceTime, Error (Code, Message), Moderation.

ListAssets

curl -X POST 'https://ai.tuiwo.vip/ai?Action=ListAssets&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"Filter":{"GroupIds":["GROUP_ID"],"Statuses":["Active"]},"PageNumber":1,"PageSize":20}'
FieldTypeDescription
Filter.GroupTypestringFilter by group type
Filter.GroupIdsstring[]Filter by group IDs
Filter.NamestringFilter by name
Filter.Statusesstring[]Pending, Processing, Active or Failed; filtering is service-defined, so check each Status
NextTokenstringCursor token
MaxResultsinteger1-100
SortBystringFor example CreateTime or UpdateTime
SortOrderstringDesc or Asc
PageNumberintegerPage number
PageSizeintegerPage size; platform currently caps around 50

Result contains Items with the same fields as GetAsset.Result, plus NextToken, PageNumber, PageSize, and TotalCount. Iterate pages; do not assume the first page has every asset.

UpdateAsset

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

DeleteAsset

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

Deletion is irreversible; the asset can no longer be used for generation.

Common failure causes

ErrorMeaning
DownloadFailedService cannot download the URL
ContentRestrictedModeration failed
TypeMismatchAssetType does not match the content
FormatUnsupported / FormatUndetectableUnsupported or undetectable format
FaceMismatchReal-person asset does not match the verified person
DurationTooShort / DurationTooLongAudio or video duration is out of range
FileSizeTooLargeFile is too large
InternalErrorService internal error

Reference in a video request

Once Active:

{
  "type": "image_url",
  "image_url": {"url": "asset://ASSET_ID"},
  "role": "reference_image"
}

Use video_url / audio_url with the corresponding role for video and audio. asset:// assets must belong to the current workspace.