> ## 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.

# Upload Assets

> Use `POST /v1/seedance/asset/CreateAsset` to import public assets into the Seedance asset library.

# Upload Assets

Import assets into the specified asset group. `URL` is used to pull public HTTPS resources into the asset library (review/transcoding is handled by the server). After the import succeeds, `AssetId` is returned. In [Create Video](./generation), it is recommended to reference it as `asset://{assetId}` instead of repeatedly providing the public URL.

## Method and Path

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

## Request Example

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://octopusx.ai/v1/seedance/asset/CreateAsset \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json" \
    -d '{
      "GroupId": "group-20260415111540-w9pkb",
      "URL": "https://example.com/reference.webp",
      "AssetType": "Image",
      "Name": "child"
    }'
  ```

  ```python theme={null}
  import requests

  resp = requests.post(
      "https://octopusx.ai/v1/seedance/asset/CreateAsset",
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json",
          "Accept": "application/json",
      },
      json={
          "GroupId": "group-20260415111540-w9pkb",
          "URL": "https://example.com/reference.webp",
          "AssetType": "Image",
          "Name": "child",
      },
      timeout=60,
  )
  print(resp.json())
  ```
</CodeGroup>

## Response Example

<ResponseExample>
  ```json 200 theme={null}
  {
    "state": 1,
    "data": {
      "Id": "asset-xxx",
      "task_id": "task_xxx"
    },
    "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 403 theme={null}
  {
    "error": {
      "code": "Forbidden",
      "message": "access denied",
      "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>

Asset processing is an asynchronous flow. Use the returned `task_id` to call [Query Asset](./asset-get), and wait until `Status` becomes `Active` before using it for video generation.

## Authentication

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

## Body

<ParamField body="GroupId" type="string" required>
  Asset group ID, from the `data.Id` returned by [Create Asset Group](./asset-create-group).
</ParamField>

<ParamField body="URL" type="string" required>
  Public HTTPS URL of the asset to be imported.
</ParamField>

<ParamField body="AssetType" type="string" required>
  Asset type: `Image`, `Video`, `Audio`.
</ParamField>

<ParamField body="Name" type="string" required>
  Asset name.
</ParamField>

## Response

<ResponseField name="state" type="integer">
  Business status code.
</ResponseField>

<ResponseField name="data.Id" type="string">
  Asset ID, which can be written as `asset://{Id}` during video generation.
</ResponseField>

<ResponseField name="data.task_id" type="string">
  Import task ID, used for [Query Asset](./asset-get).
</ResponseField>

<ResponseField name="error" type="object | null">
  Error information.
</ResponseField>

## Related Pages

* [Seedance-2 Overview](./overview)
* [Create Asset Group](./asset-create-group)
* [Query Asset](./asset-get)
* [Create Video](./generation)
