# Create asset group

Create a new asset group (AssetGroup) for organizing and managing asset files.

Each group belongs to the authenticated user. Groups are isolated between users.
All API keys under the same user share asset groups.

**Third-party SaaS** callers can pass `external_user_id` in the body to scope the new group to a specific end-user (so other end-users behind the same API key won't see it).

## POST /v1/asset-groups

> Create asset group

Create a new asset group (AssetGroup) for organizing and managing asset files.

Each group belongs to the authenticated user. Groups are isolated between users.
All API keys under the same user share asset groups.

**Third-party SaaS** callers can pass `external_user_id` in the body to scope the new group to a specific end-user (so other end-users behind the same API key won't see it).

### Authentication

`Authorization: Bearer tr-xxx`

### Request Body

Content-Type: `application/json`

- **name** `string` **(required)**  
  Group name
- **description** `string`  
  Group description (optional)
- **external_user_id** `string`  
  Optional third-party SaaS end-user identifier (opaque, ≤128 chars). Scopes the group to (api_user, external_user_id) so end-user A can't see end-user B's groups under the same API key. Omit for legacy single-tenant behaviour.

### Response

- **Id** `string`  
  Asset group ID
- **Name** `string`  
  Group name
- **Description** `string`  
  Group description
- **GroupType** ``AIGC``  
  Group type, fixed value `AIGC`
- **CreateTime** `string`  
  Creation time
- **UpdateTime** `string`  
  Last updated time

### Error Codes

- `400`: 
- `401`: 
- `429`: 
- `502`:
