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

# Seedance 2.0 Asset Management

> Manage image, video, and audio assets for Seedance 2.0 video generation via Anyfast API.

Seedance 2.0 Asset Management lets you upload and organize media assets (images, videos, audio) for use with Seedance 2.0 video generation. Once uploaded, assets are referenced by ID (`asset://<ID>`) in Seedance 2.0 requests instead of public URLs.

## Why use Asset Management?

* **Persistent storage** — Assets are stored on Volcengine and don't expire like temporary URLs
* **Multi-format support** — Upload images, videos, and audio files
* **Organized by groups** — Group related assets (e.g. per project or campaign)
* **Data isolation** — Each API token sees only its own assets
* **Direct integration** — Use `asset://<ID>` directly in Seedance 2.0 `image_url`, `video_url`, `audio_url` fields

## Supported formats

| Type      | Formats                                    | Limits                                      |
| --------- | ------------------------------------------ | ------------------------------------------- |
| **Image** | JPG, PNG, GIF, WebP, BMP, TIFF, HEIC, HEIF | \< 30 MB, 300–6000 px, aspect ratio 0.4–2.5 |
| **Video** | MP4, MOV                                   | \< 50 MB, 2–15s, 480p/720p, 24–60 FPS       |
| **Audio** | MP3, WAV                                   | \< 15 MB, 2–15s                             |

## Billing models

| Model              | Asset type | Description                             |
| ------------------ | ---------- | --------------------------------------- |
| `volc-asset`       | Image      | Default — no need to specify for images |
| `volc-asset-video` | Video      | **Required** when uploading video       |
| `volc-asset-audio` | Audio      | **Required** when uploading audio       |

## Workflow

```
1. Create an Asset Group        →  Group ID
2. Create an Asset in the Group →  Asset ID
3. Generate a video with Asset  →  async task ID
4. Poll for the result          →  pre-signed download URL
```

## LivenessFace workflow

Use the LivenessFace flow when you need a private real-person portrait group. Anyfast creates a mobile verification page, the user completes liveness face verification on a phone, and the result becomes a `LivenessFace` asset group.

<Tip>
  For the complete authorization flow and official terminology, see [Real-human asset verification](/guides/model-api/bytedance/volc-real-human-assets).
</Tip>

<Warning>
  LivenessFace verification requires an API token created with the **Byteplus-Direct** group. Tokens routed to the regular AIGC asset group only support `GroupType: "AIGC"` and cannot create liveness sessions or LivenessFace assets.
</Warning>

<Steps>
  <Step title="Create a validation session">
    Call `CreateVisualValidateSession` to obtain `H5Link` and `BytedToken`.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/volc/asset/CreateVisualValidateSession \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "CallbackURL": "https://example.com/callback"
      }'
    ```
  </Step>

  <Step title="Open the H5Link on a phone">
    Send the returned `H5Link` to the user and ask them to complete liveness face verification.
  </Step>

  <Step title="Query the result">
    After verification, call `GetVisualValidateResult` with the `BytedToken`. A successful verification returns a `GroupId`.

    ```bash cURL theme={null}
    curl https://www.anyfast.ai/volc/asset/GetVisualValidateResult \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "BytedToken": "2026070222152680501D985EA34A3BE3D8"
      }'
    ```
  </Step>

  <Step title="Manage the LivenessFace group">
    Use the returned `GroupId` with `UpdateAssetGroup`, `ListAssetGroups`, `CreateAsset`, `ListAssets`, and `GetAsset`. When listing liveness groups or assets, include `Filter.GroupType: "LivenessFace"`.
  </Step>
</Steps>

<Note>
  If verification is not completed or did not create a group, `GetVisualValidateResult` may return `{"GroupId": ""}`. Invalid or expired tokens return an upstream error.
</Note>

<Note>
  When uploading an image to a LivenessFace group, the image must match the verified person. Mismatched faces return `FaceMismatch` and the asset status becomes `Failed`.
</Note>

## Step 1: Create an Asset Group

First, create a Group to obtain a Group ID.

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/volc/asset/CreateAssetGroup \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "volc-asset",
      "Name": "your-custom-name"
    }'
  ```

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

  response = requests.post(
      "https://www.anyfast.ai/volc/asset/CreateAssetGroup",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "model": "volc-asset",
          "Name": "your-custom-name"
      }
  )

  group_id = response.json()["Id"]
  print(f"Group ID: {group_id}")
  ```
</CodeGroup>

Expected response:

```json theme={null}
{
  "Id": "group-20260427160000-xxxxx"
}
```

## Step 2: Create an Asset within the Group

Using the Group ID from Step 1, upload your image asset (e.g., a character reference face).

<CodeGroup>
  ```bash cURL theme={null}
  curl https://www.anyfast.ai/volc/asset/CreateAsset \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "volc-asset",
      "GroupId": "group-20260427160000-xxxxx",
      "Name": "character-reference",
      "AssetType": "Image",
      "URL": "https://example.com/example.png"
    }'
  ```

  ```python Python theme={null}
  response = requests.post(
      "https://www.anyfast.ai/volc/asset/CreateAsset",
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "model": "volc-asset",
          "GroupId": "group-20260427160000-xxxxx",
          "Name": "character-reference",
          "AssetType": "Image",
          "URL": "https://example.com/example.png"
      }
  )

  asset_id = response.json()["Id"]
  print(f"Asset ID: {asset_id}")
  ```
</CodeGroup>

Expected response:

```json theme={null}
{
  "Id": "asset-20260427160000-xxxxx"
}
```

> The `URL` field accepts three formats:
>
> * Public URL: `https://example.com/image.jpg`
> * Data URI: `data:image/png;base64,iVBOR...`
> * Raw Base64 string (auto-detected, treated as PNG by default)
>
> Base64 / Data URI are automatically uploaded to object storage.

### Upload video

> Video uploads **must** specify `"model": "volc-asset-video"` and `"AssetType": "Video"`.

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset-video",
    "GroupId": "group-20260427160000-xxxxx",
    "Name": "reference-clip",
    "AssetType": "Video",
    "URL": "https://example.com/clip.mp4"
  }'
```

### Upload audio

> Audio uploads **must** specify `"model": "volc-asset-audio"` and `"AssetType": "Audio"`.

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset-audio",
    "GroupId": "group-20260427160000-xxxxx",
    "Name": "background-music",
    "AssetType": "Audio",
    "URL": "https://example.com/bgm.mp3"
  }'
```

### File upload (multipart)

```bash Upload image theme={null}
curl https://www.anyfast.ai/volc/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/image.jpg" \
  -F "GroupId=group-20260427160000-xxxxx" \
  -F "Name=character-reference"
```

```bash Upload video theme={null}
curl https://www.anyfast.ai/volc/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=volc-asset-video" \
  -F "file=@/path/to/video.mp4" \
  -F "GroupId=group-20260427160000-xxxxx" \
  -F "Name=reference-clip" \
  -F "AssetType=Video"
```

```bash Upload audio theme={null}
curl https://www.anyfast.ai/volc/asset/CreateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=volc-asset-audio" \
  -F "file=@/path/to/audio.mp3" \
  -F "GroupId=group-20260427160000-xxxxx" \
  -F "Name=background-music" \
  -F "AssetType=Audio"
```

## Step 3: Generate a Video Using the Asset

Reference the Asset ID from Step 2 to generate a video.

> **Important:** Assets must be passed in strict order: `text`, `image_url`, `video_url`, `audio_url`. Do not reorder them — doing so may cause errors. When multiple assets are included, do not mix in other asset types.

```bash cURL theme={null}
curl https://www.anyfast.ai/v1/video/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance",
    "content": [
      {
        "type": "text",
        "text": "The person from @image1 walks in the scene from @video1, with @audio1 as background music"
      },
      {
        "type": "image_url",
        "image_url": {
          "url": "asset://asset-20260427160000-xxxxx"
        },
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": {
          "url": "asset://asset-20260427160000-video1"
        },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": {
          "url": "asset://asset-20260427160000-audio1"
        },
        "role": "reference_audio"
      }
    ],
    "resolution": "720p",
    "duration": 5
  }'
```

The response will return an async task ID (prefixed with `asyn`).

## Step 4: Poll for the Result

Use the task ID to check the generation status.

```bash cURL theme={null}
curl https://www.anyfast.ai/v1/video/generations/asynxxxx \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Once complete, the response will contain a pre-signed S3 download link. Please note:

* The download link **expires after 12 hours**.
* If the task reaches 100% progress but returns an error, this typically means the output was flagged by the provider's content moderation (e.g., celebrity likeness or copyrighted IP). In this case, try modifying your prompt or using a different reference image.

## Query assets

### List asset groups

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/ListAssetGroups \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Filter": {"Name": "my-project"},
    "PageNumber": 1,
    "PageSize": 10
  }'
```

### List assets in a group

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/ListAssets \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Filter": {
      "Name": "character",
      "GroupIds": ["group-20260427160000-xxxxx"],
      "GroupType": "AIGC"
    },
    "PageNumber": 1,
    "PageSize": 10
  }'
```

## Manage assets

### Update an asset group

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/UpdateAssetGroup \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Id": "group-20260427160000-xxxxx",
    "Name": "updated-project-assets"
  }'
```

### Update an asset

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/UpdateAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Id": "asset-20260427161000-xxxxx",
    "Name": "updated-character-reference",
    "GroupId": "group-20260427160000-xxxxx"
  }'
```

### Delete an asset

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/DeleteAsset \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Id": "asset-20260427161000-xxxxx"
  }'
```

### Delete an asset group

```bash cURL theme={null}
curl https://www.anyfast.ai/volc/asset/DeleteAssetGroup \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "volc-asset",
    "Id": "group-20260427160000-xxxxx"
  }'
```

## Billing

| Operation                   | Model              | Billed |
| --------------------------- | ------------------ | ------ |
| CreateAssetGroup            | `volc-asset`       | Free   |
| CreateAsset (image)         | `volc-asset`       | Free   |
| CreateAsset (video)         | `volc-asset-video` | Free   |
| CreateAsset (audio)         | `volc-asset-audio` | Free   |
| CreateVisualValidateSession | —                  | Free   |
| GetVisualValidateResult     | —                  | Free   |
| ListAssetGroups             | —                  | Free   |
| ListAssets                  | —                  | Free   |
| GetAsset                    | —                  | Free   |
| UpdateAssetGroup            | `volc-asset`       | Free   |
| UpdateAsset                 | `volc-asset`       | Free   |
| DeleteAsset                 | `volc-asset`       | Free   |
| DeleteAssetGroup            | `volc-asset`       | Free   |

## Data isolation

When using token-based access, the system automatically prefixes asset group names with `[u-{userID}]-[t-{tokenID}]`, providing user and token-level data isolation. Queries automatically filter to return only data accessible by the current token.

## API Reference

<CardGroup cols={2}>
  <Card title="Create Asset Group" icon="folder-plus" href="/api-reference/model-api/bytedance/volc-asset-create-group">
    Create a new asset group.
  </Card>

  <Card title="Create Asset" icon="upload" href="/api-reference/model-api/bytedance/volc-asset-create-image">
    Upload an asset (image, video, audio) to a group.
  </Card>

  <Card title="Create Liveness Session" icon="scan-face" href="/api-reference/model-api/bytedance/volc-asset-create-visual-validate-session">
    Create a mobile liveness face validation session.
  </Card>

  <Card title="Get Liveness Result" icon="badge-check" href="/api-reference/model-api/bytedance/volc-asset-get-visual-validate-result">
    Query the LivenessFace group created by a validation session.
  </Card>

  <Card title="List Asset Groups" icon="folders" href="/api-reference/model-api/bytedance/volc-asset-list-groups">
    Query asset groups.
  </Card>

  <Card title="List Assets" icon="images" href="/api-reference/model-api/bytedance/volc-asset-list-assets">
    Query assets within groups.
  </Card>

  <Card title="Update Asset Group" icon="folder-pen" href="/api-reference/model-api/bytedance/volc-asset-update-group">
    Update asset group information.
  </Card>

  <Card title="Update Asset" icon="file-pen" href="/api-reference/model-api/bytedance/volc-asset-update-asset">
    Update asset information.
  </Card>

  <Card title="Delete Asset" icon="trash" href="/api-reference/model-api/bytedance/volc-asset-delete-asset">
    Delete an asset.
  </Card>

  <Card title="Delete Asset Group" icon="folder-x" href="/api-reference/model-api/bytedance/volc-asset-delete-group">
    Delete an asset group.
  </Card>
</CardGroup>

<script src="/feedback.js" />
