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

# Virtual Avatar Assets

>  - Private-domain virtual avatar asset submission API
- Supports batch submission, up to 20 assets per request
- Automatically creates or reuses asset groups; returns a task ID for status polling
- Approved assets can be used directly in Seedance 2.0 video generation 

```bash cURL (Batch submit · new group) theme={null}
curl --request POST \
  --url https://gccai.heqingsong.uk/v1/seedance2/private-avatar \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "group": {
      "name": "virtual-avatar-group",
      "description": "demo group"
    },
    "project_name": "default",
    "asset_type": "Image",
    "assets": [
      {
        "url": "https://example.com/avatar-a.png",
        "name": "avatar-a"
      },
      {
        "url": "https://example.com/avatar-b.png",
        "name": "avatar-b"
      }
    ]
  }'
```

```bash cURL (Use existing group) theme={null}
curl --request POST \
  --url https://gccai.heqingsong.uk/v1/seedance2/private-avatar \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "group_id": "group_xxx",
    "project_name": "default",
    "asset_type": "Image",
    "assets": [
      {
        "url": "https://example.com/avatar-a.png",
        "name": "avatar-a"
      }
    ]
  }'
```

```python Python theme={null}
import requests

url = "https://gccai.heqingsong.uk/v1/seedance2/private-avatar"

payload = {
    "group": {
        "name": "virtual-avatar-group",
        "description": "demo group"
    },
    "project_name": "default",
    "asset_type": "Image",
    "assets": [
        {
            "url": "https://example.com/avatar-a.png",
            "name": "avatar-a"
        },
        {
            "url": "https://example.com/avatar-b.png",
            "name": "avatar-b"
        }
    ]
}

headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript JavaScript theme={null}
const url = "https://gccai.heqingsong.uk/v1/seedance2/private-avatar";

const payload = {
  group: {
    name: "virtual-avatar-group",
    description: "demo group"
  },
  project_name: "default",
  asset_type: "Image",
  assets: [
    {
      url: "https://example.com/avatar-a.png",
      name: "avatar-a"
    },
    {
      url: "https://example.com/avatar-b.png",
      name: "avatar-b"
    }
  ]
};

const headers = {
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
};

fetch(url, {
  method: "POST",
  headers: headers,
  body: JSON.stringify(payload)
})
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error('Error:', error));
```

```json 200 theme={null}
{
  "code": 200,
  "data": {
    "id": "task_01K...",
    "object": "seedance.avatar.asset.task",
    "status": "processing",
    "progress": 10,
    "model": "seedance-2.0"
  }
}
```

```json 400 theme={null}
{
  "error": {
    "code": 400,
    "message": "Invalid request parameters",
    "type": "invalid_request_error"
  }
}
```

```json 401 theme={null}
{
  "error": {
    "code": 401,
    "message": "Authentication failed. Please check your API key.",
    "type": "authentication_error"
  }
}
```

```json 402 theme={null}
{
  "error": {
    "code": 402,
    "message": "Insufficient account balance. Please top up and try again.",
    "type": "payment_required"
  }
}
```

```json 429 theme={null}
{
  "error": {
    "code": 429,
    "message": "Too many requests. Please try again later.",
    "type": "rate_limit_error"
  }
}
```

```json 500 theme={null}
{
  "error": {
    "code": 500,
    "message": "Internal server error. Please try again later.",
    "type": "server_error"
  }
}
```

## Authentication

**Authorization** `string` *required*

All requests require Bearer Token authentication

Get your API Key:

Visit the [API Key Management page](https://gccai.heqingsong.uk/keys) to obtain your API Key

Add the following header to each request:

```
Authorization: Bearer YOUR_API_KEY
```

## Request Parameters

**group** `object`

Asset group information

If `group_id` is not provided, the server will automatically create an `AIGC` asset group based on this field

**Fields**

**name** `string`

Asset group name

**description** `string`

Asset group description

Example:

```json theme={null}
{
  "group": {
    "name": "virtual-avatar-group",
    "description": "demo group"
  }
}
```

> [!WARNING]
>
> Mutually exclusive with `group_id` — do not provide both at the same time

**group\_id** `string`

Existing asset group ID

When provided, skips group creation and submits assets directly to the specified group

> [!WARNING]
>
> Mutually exclusive with `group` — do not provide both at the same time

**project\_name** `string` (default: default)

Project name

Default: `default`

**asset\_type** `string` (default: Image)

Asset type

Options:

* `Image` - Image asset (default)
* `Video` - Video asset
* `Audio` - Audio asset

Default: `Image`

**assets** `array`

Asset list, supports submitting multiple assets in one request

> [!WARNING]
>
> Maximum **20** assets per submission

**Fields**

**url** `string` *required*

Asset URL — must be publicly accessible

**name** `string` *required*

Asset name

Example:

```json theme={null}
{
  "assets": [
    {
      "url": "https://example.com/avatar-a.png",
      "name": "avatar-a"
    },
    {
      "url": "https://example.com/avatar-b.png",
      "name": "avatar-b"
    }
  ]
}
```

**url** `string`

Single-asset shorthand: asset URL

> [!WARNING]
>
> Use either `assets` array or this field — not both. Suitable for submitting a single asset.

**name** `string`

Single-asset shorthand: asset name

> [!WARNING]
>
> Use either `assets` array or this field — not both. Suitable for submitting a single asset.

## Response

**code** `integer`

Response status code, 200 on success

**data** `object`

Task information

**Fields**

**id** `string`

Local task ID, used to query asset review status

**object** `string`

Task object type, always `seedance.avatar.asset.task`

**status** `string`

Initial task status, `processing` after submission

**progress** `integer`

Task progress (0 \~ 100)

**model** `string`

Model name in use

## Examples

### Example 1: Batch submit (auto-create group)

When `group_id` is not provided, the server automatically creates an `AIGC` asset group before submitting.

```json theme={null}
{
  "group": {
    "name": "virtual-avatar-group",
    "description": "demo group"
  },
  "project_name": "default",
  "asset_type": "Image",
  "assets": [
    {
      "url": "https://example.com/avatar-a.png",
      "name": "avatar-a"
    },
    {
      "url": "https://example.com/avatar-b.png",
      "name": "avatar-b"
    }
  ]
}
```

### Example 2: Append assets to an existing group

Provide `group_id` to skip group creation and submit directly.

```json theme={null}
{
  "group_id": "group_xxx",
  "project_name": "default",
  "asset_type": "Image",
  "assets": [
    {
      "url": "https://example.com/avatar-a.png",
      "name": "avatar-a"
    }
  ]
}
```

### Example 3: Single-asset shorthand

For a single asset, use the top-level `url` and `name` fields directly.

```json theme={null}
{
  "group_id": "group_xxx",
  "url": "https://example.com/avatar.png",
  "asset_type": "Image",
  "name": "avatar-1"
}
```

## Query Review Result

Asset submission is an asynchronous task. Use the [Get Task Status](https://gccai.heqingsong.uk/en/api-reference/tasks/status.md) endpoint to poll:

```http theme={null}
GET /v1/tasks/{id}
```

### All Approved

```json theme={null}
{
  "code": 200,
  "data": {
    "id": "task_01K...",
    "status": "completed",
    "progress": 100,
    "result": {
      "assets": [
        {
          "asset_id": "asset_a",
          "asset_url": "asset://asset_a",
          "status": "Active"
        },
        {
          "asset_id": "asset_b",
          "asset_url": "asset://asset_b",
          "status": "Active"
        }
      ],
      "usable_assets": [
        {
          "asset_id": "asset_a",
          "asset_url": "asset://asset_a",
          "status": "Active"
        },
        {
          "asset_id": "asset_b",
          "asset_url": "asset://asset_b",
          "status": "Active"
        }
      ],
      "failed_assets": []
    }
  }
}
```

### Partial Failure

If any asset fails review, the task status becomes `failed`. Successfully approved assets remain usable and appear in `result.usable_assets`.

```json theme={null}
{
  "code": 200,
  "data": {
    "id": "task_01K...",
    "status": "failed",
    "progress": 100,
    "result": {
      "assets": [
        {
          "asset_id": "asset_a",
          "asset_url": "asset://asset_a",
          "status": "Active"
        },
        {
          "asset_id": "asset_b",
          "asset_url": "asset://asset_b",
          "status": "Failed"
        }
      ],
      "usable_assets": [
        {
          "asset_id": "asset_a",
          "asset_url": "asset://asset_a",
          "status": "Active"
        }
      ],
      "failed_assets": [
        {
          "asset_id": "asset_b",
          "asset_url": "asset://asset_b",
          "status": "Failed"
        }
      ]
    },
    "error": {
      "code": "task_failed",
      "message": "Some assets failed review"
    }
  }
}
```

> [!NOTE]
>
> * `result.usable_assets[].asset_url` can be used directly in Seedance 2.0 video generation
> * Assets in `result.failed_assets` must be replaced or resubmitted
> * Single-asset tasks also return `result.asset_url` for compatibility

## Using Approved Assets

Pass the `asset://...` URL directly to the [Seedance 2.0 Video Generation](https://gccai.heqingsong.uk/en/api-reference/videos/seedance-2-0/generation.md) endpoint:

```json theme={null}
{
  "model": "seedance-2.0",
  "prompt": "The character walks naturally along a city street",
  "image_urls": ["asset://asset_a"],
  "duration": 5,
  "resolution": "720p"
}
```

> [!NOTE]
>
> Once the server detects the `asset://` prefix, it submits the generation task directly without triggering another asset review.


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