Skip to main content
The Asset Library allows you to upload images, videos, and audio files to the PowerTokens platform and obtain a permanent asset_id. You can then directly reference this asset_id in any generation request without needing to pass the original file URL each time. The Asset Library is divided into three types of assets for different scenarios:

Prerequisites

Before calling any Asset Library API, complete the following steps:
  1. Sign up / Log in: Register and log in at powertokens.ai
  2. Get an API Key: Go to the API Keys management page, click to create a new key, copy and store it securely (it will not be visible again after closing the page)
  3. Enable Asset Library: Go to the Asset Library page, read and agree to the Asset Library User Agreement before using
Note: Using the Asset Library does not require a top-up — it’s free to use once enabled. However, if you need to call generation models like Seedance 2.0, you will need to top up first.

Authentication

All endpoints are authenticated via HTTP headers in the following format:
Every request must include this header (except for the Get Asset ID endpoint), otherwise a 401 Unauthorized error will be returned.

Supported File Types


1. Official Assets

Official Assets are provided by ByteDance and include high-quality assets preloaded on the platform. Official assets belong to the virtual asset type (group_type: 0), but are only visible to authorized customers — ordinary users will not see official asset groups when calling the API.

Workflow

1.1 Get Official Asset Groups

Endpoint: POST /v1/asset/groups/list
Official asset groups share group_type: 0 with user-created virtual asset groups. If you are not an authorized customer, the returned list will not include official asset groups.

1.2 Get Asset List Under a Group

After obtaining an official group_id, query all assets under that group: Endpoint: POST /v1/asset/groups/assets
Each asset in the response includes an asset_id, which can be used directly in generation requests. Supported filter parameters:

2. Virtual Assets

Virtual Assets are user-created asset libraries where you can freely create asset groups, upload files, and manage assets.

Workflow

2.1 Create a Virtual Asset Group

Endpoint: POST /v1/asset/groups/create
Response:

2.2 Upload a File to an Asset Group

Endpoint: POST /v1/asset/upload Content-Type: multipart/form-data
You can also omit group_id and pass group_name instead — the system will automatically create or reuse a virtual group with the same name.
Response:

2.3 Get Asset ID

Uploading is asynchronous. Use the returned task_id to poll and obtain a permanent asset_id: Endpoint: GET /v1/asset/jobs/get-asset-id?task_id=<TASK_ID>
Note: This endpoint does not require authentication — no Authorization header is needed.
Response:
Tip: If the file is still processing, it’s recommended to poll every 2–3 seconds until an asset_id is returned. Small images usually complete within seconds; videos may take longer.

2.4 Manage Asset Groups

List virtual asset groups:
Rename an asset group: POST /v1/asset/groups/rename
Delete an asset group: POST /v1/asset/groups/delete

3. Real Person Assets

Real Person Assets require completing real-person verification first. Only after successful verification can you upload assets of that real person. This ensures compliance and authorization for asset usage.

Workflow

3.1 Get Real-Person Authorization URL

Endpoint: POST /v1/asset/get-authorize-url
Response:

3.2 Complete Real-Person Verification

Open the returned authorization URL in a browser and follow the on-screen instructions to complete identity verification. Once verified, the system will automatically create a real-person asset group.

3.3 Query Real-Person Asset Group to Get group_id

After successful verification, use the Asset Group List endpoint (the same endpoint used in 1. Official Assets) to query your real-person asset group and obtain the group_id:
group_type and real_human_type parameter descriptions: Find your real-person asset group from the response list and take its group_id for the next upload step.

3.4 Upload Real Person Assets

After obtaining the real-person asset group’s group_id, upload that real person’s assets:
Subsequent steps (obtaining asset_id, using it in generation) are the same as Virtual Assets — see step 3 in Section 2.

Using in Generation Requests

Once you have an asset_id (regardless of the asset type), you can reference it in any generation request that supports media input:

Using in Playground

In the Playground interface, uploaded assets appear in the Asset Library panel. Type @ in the prompt input area to browse and insert assets. The interface automatically adapts based on the selected model:
  • Reference image models (e.g., wan2.7-r2v): freely @ any number of reference images in the prompt
  • Keyframe models (e.g., wan2.1-kf2v): displays two fixed slots — Start Frame and End Frame — each slot accepts one @ image

Complete Workflow — Python

Below is a complete example from creating a virtual asset group to generation:

API Quick Reference

Base URL: https://powertokens.ai/api — ensure all requests include the /api prefix; do not concatenate directly to powertokens.ai/v1/....

Asset Operations

Upload File — POST /v1/asset/upload (API Reference)

Get Asset ID — GET /v1/asset/jobs/get-asset-id (API Reference)

This endpoint does not require authentication.

Get Real-Person Authorization URL — POST /v1/asset/get-authorize-url (API Reference)

Asset Group Management

Create Virtual Asset Group — POST /v1/asset/groups/create (API Reference)

List Asset Groups — POST /v1/asset/groups/list (API Reference)

List Assets in Group — POST /v1/asset/groups/assets (API Reference)

Rename Asset Group — POST /v1/asset/groups/rename (API Reference)

Delete Asset Group — POST /v1/asset/groups/delete (API Reference)


For the complete API reference, visit docs.powertokens.ai