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

# 创建素材组

> 使用 `POST /v1/seedance/asset/CreateAssetGroup` 创建 Seedance 素材组。

# 创建素材组

创建一个新的素材组，用于归类和管理后续上传的素材。上传素材时需传入返回的 `GroupId`。

## 方法与路径

```http theme={null}
POST /v1/seedance/asset/CreateAssetGroup
```

## 请求示例

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://octopusx.ai/v1/seedance/asset/CreateAssetGroup \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{
      "Name": "test",
      "Description": "this is description"
    }'
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/seedance/asset/CreateAssetGroup",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
          "Accept": "application/json",
      },
      json={
          "Name": "test",
          "Description": "this is description",
      },
      timeout=30,
  )
  print(resp.json())
  ```
</CodeGroup>

## 响应示例

<ResponseExample>
  ```json 200 theme={null}
  {
    "state": 1,
    "data": {
      "Id": "group-20260412163933-zwxdc"
    },
    "error": null
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "InvalidParameter",
      "message": "the parameter duration specified in the request is not valid",
      "type": "new_api_error"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": "Unauthorized",
      "message": "Invalid API key provided",
      "type": "new_api_error"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "code": "RateLimitExceeded",
      "message": "当前请求频率过高，请稍后再试",
      "type": "new_api_error"
    }
  }
  ```

  ```json 500 theme={null}
  {
    "error": {
      "code": "InternalError",
      "message": "internal server error",
      "type": "new_api_error"
    }
  }
  ```
</ResponseExample>

## 认证

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Body

<ParamField body="Name" type="string" required>
  素材组名称，最长 64 字符。
</ParamField>

<ParamField body="Description" type="string">
  素材组描述，最长 300 字符。
</ParamField>

## Response

<ResponseField name="state" type="integer">
  业务状态码，`1` 通常表示成功。
</ResponseField>

<ResponseField name="data.Id" type="string">
  素材组 ID，后续 [上传素材](./asset-create-media) 时作为 `GroupId` 传入。
</ResponseField>

<ResponseField name="error" type="object | null">
  错误信息，成功时为 `null`。
</ResponseField>

## 相关页面

* [Seedance-2 概览](./overview)
* [上传素材](./asset-create-media)
* [查询素材](./asset-get)
