Asset Library API Integration Guide
Digital Human Asset Library · API Documentation#
The digital human asset library APIs let you upload digital human assets, query asset status, update descriptions, and delete assets. After a successful upload, the API returns a stable, platform-neutral asset ID (mat_xxx) that you can reference in video-generation requests.This document covers only APIs related to digital human assets. It does not include video-generation or other APIs.This asset API supports the following models:
doubao-seedance-2-0-260128
doubao-seedance-2-0-fast-260128
doubao-seedance-2-0-mini-260615
doubao-seedance-2-5-260628
dreamina-seedance-2-0-hc
dreamina-seedance-2-0-fast-hc
dreamina-seedance-2-0-mini-hc
dreamina-seedance-2-5-hc
1. Authentication and Groups#
All APIs are called through the Aggregation API Gateway. Include your API token (with the sk- prefix) in the request header:Authorization: Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The gateway rejects requests when the API token is invalid, disabled, or missing.
All asset APIs accept group_id (with the ak- prefix) to specify the asset group to operate on.
group_id is optional. If it is omitted on the first upload, the system automatically creates an asset group for the current user. If the user already has groups, the earliest enabled group is reused. The group_id actually used is returned in the response.
For POST and PUT, place group_id in the JSON request body.
For GET and DELETE, place group_id in the URL query string.
If the group does not exist or has been disabled, the API returns 401 Group does not exist or has been disabled.
When group_id is provided, you can operate only on assets in that group. When it is omitted, the system queries or operates within the asset space of the user associated with the current API token.
2. General Conventions#
Base URL#
https://<Aggregation API Gateway host>
The cURL examples below use these variables:Response Structure#
All APIs return the following structure:{
"success": true,
"message": "",
"data": { ... }
}
success: Boolean. true indicates success; false indicates failure.
message: Error description when a request fails. It is normally empty on success.
data: Business data. Its structure is described for each API.
Asset ID#
A successful upload returns an asset_id such as mat_ADyx4iQvkHUy7jDzPKqp. This is a stable, platform-neutral identifier.
Reference the asset in a video-generation request by using either mat_xxx or asset://mat_xxx.
Asset Status (status)#
| Status | Meaning | Usable for video generation |
|---|
pending | Processing; upload or moderation is not complete | No. Try again later. |
ready | Ready; moderation passed | Yes |
failed | Processing failed, for example because moderation failed | No. See failure_reason. |
Status advances asynchronously in the background. After upload, an asset may initially be pending and later become ready when queried again.Idempotency#
Uploading the same URL to the same group_id is idempotent: the service does not create a duplicate and returns the same asset_id. To change the description, use the update API instead of uploading the asset again.When group_id is omitted, the upload uses the current user's earliest enabled asset group. If the user has no available group, the system creates one automatically. The group_id in the response can be used to explicitly select the group in later requests.
3. API List#
| Method | Path | Description |
|---|
| POST | /v1/assets/upload | Upload one or multiple assets |
| GET | /v1/assets | List ready assets with pagination |
| GET | /v1/assets/{asset_id} | Query the status of one asset |
| PUT | /v1/assets/{asset_id} | Update an asset description |
| DELETE | /v1/assets/{asset_id} | Delete an asset |
4. Upload Assets#
Submit asset URLs to the asset library and receive asset IDs. The API supports either a single URL or multiple URLs in one batch.Request Parameters#
| Parameter | Type | Required | Description |
|---|
group_id | string | No | Asset group ID with the ak- prefix. If omitted, the user's earliest enabled group is reused; if no group is available, one is created automatically. |
url | string | One of url or urls | Public URL of a single asset |
urls | string[] | One of url or urls | List of asset URLs; up to 10 per request |
purpose | string | Yes | Asset purpose or description. If missing, the API returns success=false and purpose is required. |
type | string | No | Asset type: image, video, or audio. The default is image. |
Provide either url or urls. If both are provided, urls takes precedence.URL Requirements#
The URL must be a publicly accessible http(s) address. localhost, private or loopback IP addresses, and local files are not supported.
The extension must be supported and must match type:Images: jpeg / jpg / png / webp / bmp / tiff / gif / heic
Request Example (Single Asset)#
{
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://cdn.example.com/portrait.jpg",
"type": "image",
"purpose": "Digital human appearance"
}
Response Example (Single Asset)#
{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"status": "pending",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
When asset processing fails, the response also includes failure_reason:{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"status": "failed",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"failure_reason": "Asset moderation failed: the image may be subject to copyright restrictions"
}
}
failure_reason appears only when status = failed and gives the client a meaningful reason. If no specific moderation reason is available, the generic message is: "Asset processing failed. Please try again later or use a different asset."
Request Example (Batch)#
{
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"urls": [
"https://cdn.example.com/a.jpg",
"https://cdn.example.com/b.png"
],
"type": "image",
"purpose": "Batch digital human appearances"
}
Response Example (Batch)#
Results are returned item by item. An invalid item is marked with an error without affecting the other items:{
"success": true,
"message": "",
"data": {
"assets": [
{ "url": "https://cdn.example.com/a.jpg", "asset_id": "mat_xxx1", "status": "pending" },
{ "url": "https://cdn.example.com/b.png", "error": "Unsupported URL file type. Ensure that the URL ends with a supported extension." }
],
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
Successful item: { url, asset_id, status }
Failed item: { url, error }
5. List Assets#
Returns the ready assets that can be used for video generation in the current user's asset space, with pagination. When group_id is provided, only assets in that group are returned. When it is omitted, assets from all enabled groups belonging to the current user are returned.Query Parameters#
| Parameter | Type | Required | Description |
|---|
group_id | string | No | Asset group ID with the ak- prefix. If omitted, all enabled groups belonging to the current user are queried. |
page | int | No | Page number; defaults to 1 |
page_size | int | No | Number of items per page |
purpose | string | No | Fuzzy search by asset description |
sort_order | string | No | asc or desc; defaults to desc |
Response Example#
{
"success": true,
"message": "",
"data": {
"items": [
{
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "image",
"purpose": "Digital human appearance",
"original_url": "https://cdn.example.com/portrait.jpg",
"status": "ready",
"created_at": 1751270400
}
],
"total": 1,
"page": 1,
"page_size": 10
}
}
Note: The list contains only ready assets. Use the Get Asset API with asset_id to view pending or failed assets.
6. Get an Asset#
GET /v1/assets/{asset_id}?group_id={group_id}group_id is optional. When omitted, the query is performed in the asset space of the user associated with the current API token.Queries the aggregate status by asset ID.Response Example#
{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "image",
"purpose": "Digital human appearance",
"original_url": "https://cdn.example.com/portrait.jpg",
"status": "ready",
"created_at": 1751270400
}
}
Failed assets also include failure_reason:{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": "failed",
"type": "image",
"purpose": "Digital human appearance",
"original_url": "https://cdn.example.com/portrait.jpg",
"created_at": 1751270400,
"failure_reason": "Asset moderation failed: ..."
}
}
If the asset does not exist or the current user is not authorized to access it, the API returns 404 asset not found.
7. Update an Asset Description#
PUT /v1/assets/{asset_id}Updates the asset description (purpose) without changing the asset itself or its status.Request Parameters#
| Parameter | Type | Required | Description |
|---|
group_id | string | No | Asset group ID. If omitted, the operation is performed in the current user's asset space. |
purpose | string | No | New asset description. Omitting it or passing an empty string clears the description. |
Request Example#
{
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"purpose": "Updated purpose description"
}
Response Example#
{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "image",
"purpose": "Updated purpose description",
"original_url": "https://cdn.example.com/portrait.jpg",
"status": "ready",
"created_at": 1751270400
}
}
If the asset does not exist or the current user is not authorized to access it, the API returns 404 asset not found.
8. Delete an Asset#
DELETE /v1/assets/{asset_id}?group_id={group_id}group_id is optional. When omitted, the operation is performed in the asset space of the user associated with the current API token.Deletes the asset. After deletion, the asset ID can no longer be used to generate videos.Response Example#
{
"success": true,
"message": "",
"data": {
"asset_id": "mat_ADyx4iQvkHUy7jDzPKqp",
"group_id": "ak-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
If the asset does not exist or the current user is not authorized to access it, the API returns 404 asset not found.
9. Reference Assets in Video Generation#
After obtaining mat_xxx from an upload, place mat_xxx or asset://mat_xxx in an asset field of the video-generation request. The system automatically replaces it with a usable reference. The following fields are supported:Top-level image or images[]
image_url.url, video_url.url, or audio_url.url in each content[] item
metadata.first_frame_image or metadata.last_frame_image
metadata.reference_images[], metadata.reference_videos[], or metadata.reference_audios[]
Note: first_frame_image, last_frame_image, and reference_* must be placed under metadata, and the field names must match those listed above.For a one-time temporary asset that does not need moderation or reuse, you can put a public URL directly in any of the fields above. The URL must be publicly accessible and use a supported extension; you do not need to upload it first to obtain mat_xxx.
10. Error Handling#
{
"success": false,
"message": "Error description"
}
| Scenario | HTTP | message |
|---|
| Invalid API token | 401 | Returned by the Aggregation API Gateway |
| Asset service configuration error | 500 | Asset service is temporarily unavailable. Contact the administrator. |
| Asset service connection failed | 502 | Asset service connection failed. Please try again later. |
| Group does not exist or has been disabled | 401 | Group does not exist or has been disabled |
| Invalid user identity | 401 | Invalid user identity |
Missing purpose | 200 | purpose is required |
Invalid type | 200 | invalid type, must be image/video/audio |
Missing url | 200 | url is required |
| Batch exceeds 10 items | 200 | A batch upload supports at most 10 URLs per request |
| URL is not publicly accessible | 200 | The asset URL must be publicly accessible... |
| Unsupported extension | 200 | Unsupported URL file type... |
| Asset does not exist or access is denied | 404 | asset not found |
Business parameter errors follow the current APIs' unified response convention: the HTTP status is 200, and failure is determined from success: false and message in the response body. Authentication errors, group-validation errors, and missing resources use their corresponding HTTP status codes.
Modified at 2026-09-10 03:00:20