Skip to content
Request
Response

Real/Virtual Asset Library API Documentation ​

This document is for integrators who call the Asset Library (Seedance Asset Library) via platform AK/SK, covering:

  1. Generate AK/SK on the platform

  2. Call LivenessFace asset groups and assets CRUD operations via AK/SK

  3. Call AIGC asset groups and assets CRUD operations via AK/SK

  • LivenessFace: Real human portraits, requiring Volcengine real-person authentication H5 link + callback flow to successfully create

  • AIGC: Virtual portraits, callers directly POST to create synchronously

Quick Start ​

Get AK/SK Login to ai-tokenhub console, go to Token Management page, select AK/SK, click Create
Access Key ID (AK): starts with pak*
Secret Key (SK): starts with psk*
Important: SK is only displayed once when generated, please save it properly.

Authentication ​

All API requests (except public callbacks) must carry in HTTP Header:

Authorization: Bearer pak_xxxxxxxx:psk_yyyyyyyy

Concatenate your AK and SK with an English colon :, and add the Bearer prefix.

Base URL ​

All API base paths are provided by the platform operator. This document uses as placeholder, for example https://ai-tokenhub.ai .

Response Format ​

  • Success: Returns corresponding JSON data or HTTP status code (e.g., 201, 204) based on the interface.
  • Error: All non-2xx responses return the following structure:
json
{
    "requestId": "req_01hxy8v7m9n0pqrstuvwxyza7",
    "error": "SecurityConstraintViolation",
    "errorCode": "10501",
    "message": "asset library is not enabled for this tenant",
    "detail": {}
}

Common Error Codes ​

HTTPError ValueDescription
400ValidationErrorMissing or invalid request parameters (path parameters, query parameters, request body validation failed)
401InvalidCredentials / AccessTokenRevokedAK/SK does not exist, has been revoked, or does not match
403SecurityConstraintViolationTenant has not enabled Asset Library / Real-person Authentication / AIGC; Asset group not ready; Asset count exceeded; Preconditions not met
404ResourceNotFoundAsset group or asset does not exist or does not belong to current tenant
404ResourceErrorAsset group or asset does not exist or does not belong to current tenant
500InternalErrorServer internal error

LivenessFace Flow ​

Real human portraits require users to complete real-person authentication to create usable asset groups.

Flow Overview ​

  1. Apply for Authentication Link: Call GET /get-seedance-asset-asset-group-h5link to obtain the H5 authentication URL.
  2. User Redirect for Authentication: Redirect the user to the H5 page, where the user completes face capture.
  3. Callback Notification: After Volcengine completes authentication, it redirects to your specified callbackUrl. Your server needs to call the public callback interface /console/seedance-asset-asset-group/callback to confirm the result.
  4. Asset Group Ready: After successful authentication, the asset group status changes to success, and assets can be uploaded.

Request

GET {{baseUrl}}/console/tenants/{tenantId}/get-seedance-asset-asset-group-h5link

Path Parameters

ParameterTypeRequiredDescription
tenantIdstringYesYour tenant ID

Query Parameters

ParameterTypeRequiredDescription
seedance-asset-asset-group-namestringYesAsset group name
callbackUrlstring(URL)YesFrontend URL for Volcengine to redirect after authentication, must include byteToken and resultCode parameters
descriptionstringNoDescription (saved on platform only)

Response (200)

json
{
    "seedanceAssetGroupId": "ag_xxx",
    "byteToken": "bt_xxx",
    "h5Link": "https://...",
    "callbackUrl": "https://..."
}

Note: The H5 link and byteToken are valid for 120 seconds. Please reapply if expired.

Volcengine Authentication Callback ​

After the user completes authentication, Volcengine will redirect to your callbackUrl. Your server needs to call this interface, passing the byteToken back to the platform. The platform will pull the Volcengine result and update the asset group status.

Request

GET {{baseUrl}}/console/seedance-asset-asset-group/callback?byteToken={byteToken}

Response (200)

json
{
    "seedanceAssetGroupId": "ag_xxx",
    "status": "success", // or "failed"
    "volcGroupId": "vg_xxx" // only returned on success
}

If status=failed, please guide the user to re-initiate authentication.

Status Description ​

Asset Group StatusDescription
creatingCreated as placeholder, waiting for authentication to start
verifyingAuthentication in progress
successAuthentication passed, assets can be uploaded
failedAuthentication failed, cannot be used

AIGC Flow ​

Request

POST {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/aigc
Authorization: Bearer pak_xxx:psk_xxx
Content-Type: application/json

Request Body

json
{
    "name": "AIGC Asset Group",
    "description": "Optional description"
}

Response (200)

json
{
    "seedanceAssetGroupId": "ag_xxx",
    "volcGroupId": "vg_xxx"
}

The asset group is immediately in status=success state, and assets can be uploaded.

Asset Group Management ​

The following interfaces apply to both LivenessFace and AIGC asset groups.

List Asset Groups ​

Request

GET {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group

Query Parameters (all optional)

ParameterTypeDescription
pageintPage number, default 1
pageSizeintItems per page, default 20
namestringFuzzy name match
idstringFuzzy ID match
statusstringExact match: creating/verifying/success/failed

Response (200)

json
{
    "items": [
        {
            "id": "ag_xxx",
            "name": "Production Assets",
            "description": "...",
            "tenantId": "ten_xxx",
            "userId": "usr_xxx",
            "status": "success",
            "groupType": "LivenessFace",
            "volcGroupId": "vg_xxx",
            "expiredAt": "2026-05-28T10:02:30Z",
            "assetsNumber": 1000,
            "createdAt": "2026-05-28T10:00:00Z",
            "updatedAt": "2026-05-28T10:00:00Z"
        }
    ],
    "total": 1
}

The list interface does not return byteToken, h5Link, or callbackUrl. Please use "Get Asset Group Details" to view them.

Get Asset Group Details ​

Request

GET {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}

Response

In addition to the fields returned in the list, also returns byteToken, h5Link, callbackUrl, and statistics seedanceAssetGroupInfo (asset count, success/processing/failed count).

Edit Asset Group ​

Currently only supports modifying description.

Request

PATCH {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}

Request Body

json
{
    "description": "New description"
}

Response (200)

Returns the updated asset group details.

Delete Asset Group ​

Request

DELETE {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group

Request Body

json
{
    "seedanceAssetGroupId": "ag_xxx"
}

Response

json
{
    "status": "deleted"
}

The deletion operation will synchronously clean up Volcengine resources and all subordinate assets.

Asset Management ​

Asset management interfaces apply to both types of asset groups, provided that the asset group status is success and has a volcGroupId.

Upload Asset ​

Request

POST {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}/seedance-asset
Content-Type: multipart/form-data

Form Fields

FieldTypeRequiredDescription
nametextYesAsset name
descriptiontextNoDescription
assetTypetextYesImage / Video / Audio
filefileYesAsset file, maximum 32 MiB per upload

Response (201)

json
{
    "seedanceAsset": {
        "id": "sa_01hxy8v7m9n0pqrstuvwxyza1",
        "name": "Sample Video",
        "description": "A sample video",
        "seedanceAssetGroupId": "ag_01hxy8v7m9n0pqrstuvwxyza1",
        "seedanceAssetSetId": "",
        "userId": "usr_01hxy8v7m9n0pqrstuvwxyza1",
        "status": "creating",
        "volcGroupId": "vg_abc123",
        "volcErrorCode": "",
        "volcErrorMessage": "",
        "projectName": "default",
        "tenantId": "ten_01hxy8v7m9n0pqrstuvwxyza1",
        "assetType": "Video",
        "tosUrl": "https://tokenhub-seedance-asset-asset-group.tos-cn-guangzhou.volces.com/sa_01hxy8v7m9n0pqrstuvwxyza1",
        "createdAt": "2026-05-28T10:00:00Z",
        "updatedAt": "2026-05-28T10:00:00Z"
    }
}

Returns a seedanceAsset object with status as creating and seedanceAssetSetId empty. The platform will asynchronously register the asset to Volcengine. After registration completes, the status changes to success or failed.

Recommendation: After uploading, poll the status through "Get Asset Details" or subscribe to status changes through the frontend until status=success before using.

Get Asset Details ​

Request

GET {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}/seedance-asset/{assetId}

Response (200)

Returns a single object as listed in "List Assets".

Note: assetId is the platform-side asset ID on tokenhub, not the Volcengine-side seedanceAssetSetId. Due to the time required for asset review, the Volcengine-side seedanceAssetSetId cannot be obtained immediately. Use the platform-side assetId to query whether the asset status is status=success.

Edit Asset ​

Supports modifying name and description, at least one must be provided.

Request

PATCH {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}/seedance-asset/{assetId}

Request Body

json
{
    "name": "New Name",
    "description": "New Description"
}

Response (200)

Returns the updated asset object.

Delete Asset ​

Request

DELETE {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-group/{seedanceAssetGroupId}/seedance-asset/{assetId}

Response

204 No Content (no response body).

The deletion operation will synchronously call Volcengine for deletion, with transactional guarantees.

FAQ ​

SymptomPossible CauseSuggestion
401 InvalidCredentialsAK/SK not properly concatenated, key rotated, credential revokedRe-check or rotate keys in console; confirm complete format pak_*:psk_*
403 asset library is not enabled for this tenantTenant has not enabled Asset LibraryContact platform operator to enable Asset Library
403 AIGC asset library is not enabled for this tenantTenant has not enabled AIGC featureContact platform operator to enable AIGC
403 LivenessFace asset library is not enabled for this tenantTenant has not enabled LivenessFace featureContact platform operator to enable LivenessFace
403 seedance asset group service is not configuredBackend not configured with Volcengine AK/SKContact platform operations
403 (upload asset) preconditions not satisfiedAsset group not ready or missing success/volcGroupIdWait for H5 authentication callback (LivenessFace), or confirm AIGC creation succeeded
403 seedance asset(group) limit exceeded for this tenantAsset group / asset count exceeds tenant quotaDelete redundant resources or apply for capacity expansion
Upload 201 but status=creating for a long timeAsync registration to Volcengine not completed or failedPoll through "Get Asset Details"; if stuck, check platform volcErrorCode/volcErrorMessage