Real/Virtual Asset Library API Documentation
This document is for integrators who call the Asset Library (Seedance Asset Library) via platform AK/SK, covering:
Generate AK/SK on the platform
Call LivenessFace asset groups and assets CRUD operations via AK/SK
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 createAIGC: 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:
Concatenate your AK and SK with an English colon :, and add the Bearer prefix.
Base URL
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:
{
"requestId": "req_01hxy8v7m9n0pqrstuvwxyza7",
"error": "SecurityConstraintViolation",
"errorCode": "10501",
"message": "asset library is not enabled for this tenant",
"detail": {}
}Common Error Codes
| HTTP | Error Value | Description |
|---|---|---|
| 400 | ValidationError | Missing or invalid request parameters (path parameters, query parameters, request body validation failed) |
| 401 | InvalidCredentials / AccessTokenRevoked | AK/SK does not exist, has been revoked, or does not match |
| 403 | SecurityConstraintViolation | Tenant has not enabled Asset Library / Real-person Authentication / AIGC; Asset group not ready; Asset count exceeded; Preconditions not met |
| 404 | ResourceNotFound | Asset group or asset does not exist or does not belong to current tenant |
| 404 | ResourceError | Asset group or asset does not exist or does not belong to current tenant |
| 500 | InternalError | Server internal error |
LivenessFace Flow
Real human portraits require users to complete real-person authentication to create usable asset groups.
Flow Overview
- Apply for Authentication Link: Call
GET /get-seedance-asset-asset-group-h5linkto obtain the H5 authentication URL. - User Redirect for Authentication: Redirect the user to the H5 page, where the user completes face capture.
- 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/callbackto confirm the result. - Asset Group Ready: After successful authentication, the asset group status changes to
success, and assets can be uploaded.
Apply for Real-person Authentication H5 Link
Request
GET {{baseUrl}}/console/tenants/{tenantId}/get-seedance-asset-asset-group-h5linkPath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | Your tenant ID |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| seedance-asset-asset-group-name | string | Yes | Asset group name |
| callbackUrl | string(URL) | Yes | Frontend URL for Volcengine to redirect after authentication, must include byteToken and resultCode parameters |
| description | string | No | Description (saved on platform only) |
Response (200)
{
"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)
{
"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 Status | Description |
|---|---|
| creating | Created as placeholder, waiting for authentication to start |
| verifying | Authentication in progress |
| success | Authentication passed, assets can be uploaded |
| failed | Authentication 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/jsonRequest Body
{
"name": "AIGC Asset Group",
"description": "Optional description"
}Response (200)
{
"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-groupQuery Parameters (all optional)
| Parameter | Type | Description |
|---|---|---|
| page | int | Page number, default 1 |
| pageSize | int | Items per page, default 20 |
| name | string | Fuzzy name match |
| id | string | Fuzzy ID match |
| status | string | Exact match: creating/verifying/success/failed |
Response (200)
{
"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
{
"description": "New description"
}Response (200)
Returns the updated asset group details.
Delete Asset Group
Request
DELETE {{baseUrl}}/console/tenants/{tenantId}/seedance-asset-asset-groupRequest Body
{
"seedanceAssetGroupId": "ag_xxx"
}Response
{
"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-dataForm Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | text | Yes | Asset name |
| description | text | No | Description |
| assetType | text | Yes | Image / Video / Audio |
| file | file | Yes | Asset file, maximum 32 MiB per upload |
Response (201)
{
"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
{
"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
| Symptom | Possible Cause | Suggestion |
|---|---|---|
| 401 InvalidCredentials | AK/SK not properly concatenated, key rotated, credential revoked | Re-check or rotate keys in console; confirm complete format pak_*:psk_* |
| 403 asset library is not enabled for this tenant | Tenant has not enabled Asset Library | Contact platform operator to enable Asset Library |
| 403 AIGC asset library is not enabled for this tenant | Tenant has not enabled AIGC feature | Contact platform operator to enable AIGC |
| 403 LivenessFace asset library is not enabled for this tenant | Tenant has not enabled LivenessFace feature | Contact platform operator to enable LivenessFace |
| 403 seedance asset group service is not configured | Backend not configured with Volcengine AK/SK | Contact platform operations |
| 403 (upload asset) preconditions not satisfied | Asset group not ready or missing success/volcGroupId | Wait for H5 authentication callback (LivenessFace), or confirm AIGC creation succeeded |
| 403 seedance asset(group) limit exceeded for this tenant | Asset group / asset count exceeds tenant quota | Delete redundant resources or apply for capacity expansion |
| Upload 201 but status=creating for a long time | Async registration to Volcengine not completed or failed | Poll through "Get Asset Details"; if stuck, check platform volcErrorCode/volcErrorMessage |
