Asset groups
Organize the current account's assets by project or business user. Groups are local MoonNexAI records, and do not authenticate an asset for a model. Omission of group_id during upload uses your default group.
Create a group
curl https://moonnexai.com/v1/asset-groups \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "project-a",
"description": "Project A materials",
"domain": "media"
}'name is required. Optional fields are description and domain; use media for media assets. Save the returned group_id:
{
"object": "asset_group",
"id": "group_xxx",
"group_id": "group_xxx",
"name": "project-a",
"description": "Project A materials",
"domain": "media",
"group_type": "custom",
"status": "enabled",
"visibility": "private"
}List and read groups
curl "https://moonnexai.com/v1/asset-groups?domain=media&p=1&page_size=20" \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Use p and page_size (default 10, at most 100), with optional domain and status=enabled|disabled filters. The response contains success=true, data[], count and total. Read one group with GET /v1/asset-groups/{group_id}.
Upload and query within a group
curl https://moonnexai.com/v1/assets/uploads \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-2.0-kz-fast",
"mode": "asset",
"type": "image",
"url": "https://example.com/reference.png",
"group_id": "group_xxx"
}'List with GET /v1/assets?group_id=group_xxx&p=1&page_size=20. Details may include ?group_id=group_xxx; a mismatch returns not found. Group filters never grant access to another account.
Update a group
curl -X PATCH https://moonnexai.com/v1/asset-groups/group_xxx \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "project-a-updated",
"description": "Updated materials"
}'Send at least one of name or description. To move an asset, use asset management.
Delete a group
curl -X DELETE https://moonnexai.com/v1/asset-groups/group_xxx \
-H "Authorization: Bearer <MOONNEXAI_API_KEY>"Only a custom group can be disabled. Default and system groups cannot be deleted. A successful local disable returns HTTP 200, deleted=true and status=disabled. Member assets are retained; their IDs and existing references are not deleted with the group. Disable individual assets separately when necessary.