> ## 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.

# Buat grup aset karakter

> Buat grup aset karakter CometAPI untuk referensi Seedance. Grup virtual langsung berstatus aktif, sedangkan grup orang nyata memerlukan verifikasi keaktifan.

Buat grup sebelum mengunggah gambar karakter. Kirim token akses mentah dalam header `Authorization` tanpa awalan `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"
  }'
```

## Kolom permintaan

| Kolom | Tipe | Deskripsi |
| - | - | - |
| `name` | string | Nama grup terdiri dari 1 hingga 64 karakter. |
| `type` | string | Gunakan `virtual` untuk karakter virtual atau `real` untuk orang nyata. |

Respons menyimpan ID grup CometAPI di `data.id`. Grup `virtual` mengembalikan `data.status=active`. Grup `real` mengembalikan `data.status=pending` dan menyertakan `data.liveness.platform_wrapper_url` bertanda tangan.

## Kolom respons

| Kolom | Deskripsi |
| - | - |
| `data.id` | ID grup yang digunakan oleh endpoint unggah dan grup. |
| `data.group_type` | Tipe grup yang Anda kirim. |
| `data.status` | `active`, `pending`, atau `expired`. |
| `data.liveness` | Ada untuk grup orang nyata yang berstatus tertunda. |

Untuk grup orang nyata, lanjutkan ke [Ambil grup aset karakter](https://apidoc.cometapi.com/id/api/video/seedance/get-character-asset-group.md) dan [Aktifkan verifikasi orang nyata](https://apidoc.cometapi.com/id/api/video/seedance/activate-character-asset-liveness.md). Untuk grup virtual, lanjutkan ke [Unggah aset karakter](https://apidoc.cometapi.com/id/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.