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

# Seedance 2.0: Upload an Asset to the Media Library

> Upload an image, video, audio, or document asset to the Seedance 2.0 library and receive an assetId to reference in generation tasks.

Use this endpoint to upload media assets (images, videos, audio, or documents) to the Seedance 2.0 asset library. After upload, reference the asset in generation task parameters using the `asset://{assetId}` format instead of a raw public URL.

**Base URL:** `https://zcbservice.aizfw.cn/kyyReactApiServer`

**Endpoint:** `POST /kyyVideo2/asset/upload`

## When to Use This Endpoint

Upload assets to the Seedance 2.0 library when:

* You have **face images** that require moderation review before use in generation tasks.
* You want to **reuse the same media** across multiple generation tasks without re-supplying a URL each time.
* Your **media URLs are not publicly accessible** and cannot be referenced directly by the API.

***

## Request Parameters

<ParamField body="assetType" type="string" required>
  The type of asset being uploaded. Must be one of the following exact values (case-sensitive, first letter uppercase):

  * `Image` — image files
  * `Video` — video files
  * `Audio` — audio files
  * `Document` — document files
</ParamField>

<ParamField body="url" type="string" required>
  The publicly accessible URL of the asset to upload. The API must be able to fetch this URL at the time of the request.

  Example: `https://example.com/portrait.jpg`
</ParamField>

<ParamField body="name" type="string">
  A descriptive name for the asset to help you identify and manage it in the library.

  Example: `My portrait photo`
</ParamField>

***

## Response Fields

<ResponseField name="code" type="integer">
  Response status code. `0` indicates success; any other value indicates failure.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Returns `null` on success, or an error description on failure.
</ResponseField>

<ResponseField name="data" type="object">
  The response data object, returned on success.

  <Expandable title="data object properties">
    <ResponseField name="data.assetId" type="string">
      The assigned asset ID, in the format `asset-{timestamp}-{random}`. Use this value as `asset://{assetId}` when referencing the asset in generation task parameters.

      Example: `asset-20260330142158-q75m8`
    </ResponseField>
  </Expandable>
</ResponseField>

***

## Asset Types and Requirements

| Type       | Supported Formats               | Use In                                         |
| ---------- | ------------------------------- | ---------------------------------------------- |
| `Image`    | jpeg, png, webp, bmp, tiff, gif | `referenceImages`, `first_image`, `last_image` |
| `Video`    | 480p, 720p                      | `referenceVideos`                              |
| `Audio`    | wav, mp3                        | `referenceAudios`                              |
| `Document` | document files                  | —                                              |

***

## Example Request

```bash theme={null}
curl -X POST https://zcbservice.aizfw.cn/kyyReactApiServer/kyyVideo2/asset/upload \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "assetType": "Image",
    "url": "https://example.com/portrait.jpg",
    "name": "My portrait photo"
  }'
```

**Success response:**

```json theme={null}
{
  "code": 0,
  "msg": null,
  "data": {
    "assetId": "asset-20260330142158-q75m8"
  }
}
```

Once you have the `assetId`, reference the asset in a generation task using the `asset://` prefix:

```json theme={null}
{
  "first_image": "asset://asset-20260330142158-q75m8"
}
```

<Note>
  After uploading an asset, check its status using the [Asset Details](/api-reference/assets/seedance2-asset-detail) endpoint before using it in a generation task. Assets are not always immediately available.
</Note>

<Tip>
  Assets that contain faces are subject to moderation review before they can be used. Wait until the asset status is `Active` before referencing it in a generation task.
</Tip>
