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

# CreateAsset

> 通过公网 URL 将图片、音频或视频导入素材组。

```text theme={null}
POST {BaseUrl}/?Action=CreateAsset&Version=2024-01-01
Content-Type: application/json
```

请求需使用 HMAC-SHA256 签名，见[鉴权与通用约定](https://docs-vip.apigo.ai/api-reference/endpoints/seedance/asset-overview.md#鉴权)。

* 素材通过 URL 导入，不支持直接上传本地文件、`file://`、Base64 或 `data:` URI。URL 必须可被服务端直接下载，签名 URL 需预留足够的有效期。
* 返回素材 ID 表示导入请求已受理。素材需经过处理，用 [GetAsset](https://docs-vip.apigo.ai/api-reference/endpoints/seedance/get-asset.md) 查询到 `Status=Active` 后才能用于生成。
* 每次调用都会创建新素材，同一 URL 重复导入会得到不同的素材 ID。

## 请求参数

**GroupId** `string` *required*

所属素材组 ID。导入真人素材组时只能传认证本人的照片，不一致时素材状态变为 `Failed`，`Error.Code` 为 `FaceMismatch`。

**URL** `string` *required*

素材文件的公网 HTTP(S) 地址。字段名全大写。

**AssetType** `string` *required*

素材类型：`Image`、`Audio` 或 `Video`，必须与文件实际类型一致，否则返回 `InvalidParameter.TypeMismatch`。

**Name** `string`

素材名称，最多 64 个字符。

**ProjectName** `string`

可传 `default` 或不传。

## 响应参数

**Result.Id** `string`

素材 ID。在生成任务中以 `asset://<素材ID>` 引用。

```json 图片 theme={null}
{
  "GroupId": "group-20261020080000-abcde",
  "URL": "https://ark-project.tos-cn-beijing.volces.com/doc_image/r2v_tea_pic1.jpg",
  "AssetType": "Image",
  "Name": "tea-reference"
}
```

```json 音频 theme={null}
{
  "GroupId": "group-20261020080000-abcde",
  "URL": "https://ark-project.tos-cn-beijing.volces.com/doc_audio/r2v_tea_audio1.mp3",
  "AssetType": "Audio",
  "Name": "tea-music"
}
```

```json 视频 theme={null}
{
  "GroupId": "group-20261020080000-abcde",
  "URL": "https://ark-project.tos-cn-beijing.volces.com/doc_video/video_by_sd2.mp4",
  "AssetType": "Video",
  "Name": "tea-video"
}
```

```json 200 theme={null}
{
  "ResponseMetadata": {
    "RequestId": "20261020080000ABCDEF",
    "Action": "CreateAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1"
  },
  "Result": {
    "Id": "asset-20261020080000-abcde"
  }
}
```

```json 400 theme={null}
{
  "ResponseMetadata": {
    "RequestId": "20261020080000ABCDEF",
    "Action": "CreateAsset",
    "Version": "2024-01-01",
    "Service": "ark",
    "Region": "ap-southeast-1",
    "Error": {
      "Code": "InvalidParameter.TypeMismatch",
      "Message": "Expected audio, got image."
    }
  }
}
```


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