> ## Documentation Index
> Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 캐릭터 에셋 그룹 생성

> Seedance 참조용 CometAPI 캐릭터 에셋 그룹을 생성합니다. 가상 그룹은 즉시 활성화되고 실존 인물 그룹은 인증이 필요합니다.

캐릭터 이미지를 업로드하기 전에 그룹을 생성하세요. `Authorization` 헤더에는 `Bearer` 접두사 없이 액세스 토큰을 그대로 전달합니다.

```bash theme={null}
curl \
  https://api.cometapi.com/api/asset/groups \
  -H "Authorization: $COMETAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-character",
    "type": "virtual"
  }'
```

## 요청 필드

| 필드 | 유형 | 설명 |
| - | - | - |
| `name` | string | 1\~64자의 그룹 이름입니다. |
| `type` | string | 가상 캐릭터에는 `virtual`, 실존 인물에는 `real`을 사용합니다. |

응답의 `data.id`에 CometAPI 그룹 ID가 저장됩니다. `virtual` 그룹은 `data.status=active`를 반환합니다. `real` 그룹은 `data.status=pending`를 반환하고 서명된 `data.liveness.platform_wrapper_url`을 포함합니다.

## 응답 필드

| 필드 | 설명 |
| - | - |
| `data.id` | 업로드 및 그룹 엔드포인트에서 사용하는 그룹 ID입니다. |
| `data.group_type` | 전송한 그룹 유형입니다. |
| `data.status` | `active`, `pending` 또는 `expired`. |
| `data.liveness` | 보류 중인 실존 인물 그룹에 포함됩니다. |

실존 인물 그룹은 [캐릭터 에셋 그룹 조회](https://apidoc.cometapi.com/ko/api/video/seedance/get-character-asset-group.md)와 [실존 인물 인증 활성화](https://apidoc.cometapi.com/ko/api/video/seedance/activate-character-asset-liveness.md)를 차례로 진행하세요. 가상 그룹은 [캐릭터 에셋 업로드](https://apidoc.cometapi.com/ko/api/video/seedance/upload-character-asset.md)로 진행하세요.


## OpenAPI

````yaml api/openapi/video/seedance/post-create-character-asset-group.openapi.json POST /api/asset/groups
openapi: 3.1.0
info:
  title: Create character asset group API
  version: 1.0.0
  description: Create a CometAPI character asset group for Seedance references.
servers:
  - url: https://api.cometapi.com
security:
  - accessTokenAuth: []
paths:
  /api/asset/groups:
    post:
      summary: Create a character asset group
      description: >-
        Create a character asset group. Virtual groups become active
        immediately. Real-person groups begin in pending status and require
        liveness verification.
      operationId: seedance_create_character_asset_group
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGroupRequest'
            examples:
              virtual:
                summary: Create a virtual character group
                value:
                  name: my-character
                  type: virtual
              real:
                summary: Create a real-person group
                value:
                  name: my-real-character
                  type: real
      responses:
        '200':
          description: Character asset group created.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - message
                  - data
                properties:
                  success:
                    type: boolean
                    description: Whether the request succeeded.
                  message:
                    type: string
                    description: Status or error message.
                  data:
                    $ref: '#/components/schemas/GroupView'
              examples:
                success:
                  summary: Active virtual group
                  value:
                    success: true
                    message: ''
                    data:
                      id: ag-example
                      name: my-character
                      group_type: virtual
                      status: active
                      created_at: 1777385418
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: invalid request body
        '401':
          description: The access token is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                message: unauthorized
      x-codeSamples:
        - lang: Shell
          label: Character asset request
          source: |-
            curl https://api.cometapi.com/api/asset/groups \
              -H "Authorization: $COMETAPI_ACCESS_TOKEN" \
              -H "Content-Type: application/json" \
              -d '{"name":"my-character","type":"virtual"}'
        - lang: Python
          label: Character asset request
          source: |
            import os
            import requests

            response = requests.post(
                "https://api.cometapi.com/api/asset/groups",
                headers={"Authorization": os.environ["COMETAPI_ACCESS_TOKEN"]},
                json={"name": "my-character", "type": "virtual"},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: JavaScript
          label: Character asset request
          source: >
            const response = await
            fetch("https://api.cometapi.com/api/asset/groups", {
              method: "POST",
              headers: {
                Authorization: process.env.COMETAPI_ACCESS_TOKEN,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({ name: "my-character", type: "virtual" }),
            });


            if (!response.ok) throw new Error(await response.text());

            console.log(await response.json());
components:
  schemas:
    CreateGroupRequest:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 64
          description: Group name.
          example: my-character
        type:
          type: string
          enum:
            - virtual
            - real
          description: Character type.
    GroupView:
      type: object
      required:
        - id
        - name
        - group_type
        - status
        - created_at
      properties:
        id:
          type: string
          description: CometAPI group ID.
          example: ag-example
        name:
          type: string
          description: Group name.
          example: my-character
        group_type:
          type: string
          enum:
            - virtual
            - real
          description: Character type.
        status:
          type: string
          enum:
            - pending
            - active
            - expired
          description: Group status.
        created_at:
          type: integer
          description: Creation time as a Unix timestamp in seconds.
        liveness:
          type: object
          description: Present for a pending real-person group.
          properties:
            platform_wrapper_url:
              type: string
              format: uri
              description: Signed verification URL.
            activated:
              type: boolean
              description: Whether a verification session is active.
            hint:
              type: string
              description: Optional action hint.
          required:
            - platform_wrapper_url
            - activated
    ErrorResponse:
      type: object
      required:
        - success
        - message
      properties:
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Description of the request error.
        data:
          type:
            - object
            - array
            - 'null'
          description: Error details when returned.
      additionalProperties: true
  securitySchemes:
    accessTokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Raw CometAPI access token. Do not prefix it with Bearer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.