青峰智影青峰智影
API ReferenceMirava
AI Model APIVideosSeedance Format

Asset Library API

Upload, query, and reference image / video / audio assets for use with Seedance video generation.

The asset library centrally manages reusable reference assets. Upload once, then reference them by official_id in video generation requests, avoiding embedding large files or re-uploading on every request.

Basic Info

ItemValue
Endpoint Prefixhttps://qfzyapi.qfzy.art/api/asset-library
AuthenticationSee "Authentication" below

Authentication

MethodUsageScenario
API tokenAuthorization: Bearer sk-xxxServer-side integration
User Access TokenAuthorization: Bearer {access_token}Platform calling on behalf of a user
Session CookieCookie carries the sessionBrowser-side debugging

Some endpoints also require the New-Api-User request header to identify the user.

Field Conventions

FieldDescription
library_idAsset library ID
official_idThe asset's official ID upstream; used when referencing
group_idOwning group
asset_typeAsset type: image / video / audio
statusAsset status

Endpoint Overview

MethodPathDescription
GET/api/asset-library/librariesList asset libraries
POST/api/asset-library/librariesCreate an asset library
GET/api/asset-library/libraries/{library_id}Get asset library details
GET/api/asset-library/assetsList assets
POST/api/asset-library/assetsUpload an asset
GET/api/asset-library/assets/{official_id}Get asset details
DELETE/api/asset-library/assets/{official_id}Delete an asset
POST/api/asset-library/assets/{official_id}/refreshRefresh asset status
GET/api/asset-library/assets/{official_id}/downloadDownload / get the asset URL

Upload Asset Example

curl -X POST "https://qfzyapi.qfzy.art/api/asset-library/assets" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "library_id": "2",
    "asset_type": "image",
    "url": "https://example.com/source.png",
    "name": "reference-image-01"
  }'

Referencing in Video Generation

After a successful upload, put the returned official_id into the video generation content:

{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    { "type": "text", "text": "Generate a walking animation of the subject in the reference asset" },
    {
      "type": "image_url",
      "role": "reference_image",
      "image_url": { "url": "asset://official/{official_id}" }
    }
  ]
}

Asset State Machine

StateDescription
processingProcessing (upload / transcode / moderation)
activeAvailable
failedProcessing failed

Only assets in the active state can be used for video generation.

Validity and Cleanup

Asset validity is controlled by config.valid_hours. Expired assets are cleaned up by a scheduled task at 3 AM daily. Do not use the asset library as long-term storage.

The asset library must match the channel family. Assets from the BytePlus family cannot be used with Kuaikuai group families, and vice versa. Cross-family references return asset-not-found or unavailable.

How is this guide?