Skip to content
Guides · ポートレート

ポートレート

仮想人物または本人確認済みの人物 Portrait を登録し、Seedance 2.0 で asset:// として参照します。


概要

Portrait converts a virtual spokesperson or verified real person into reusable assets for video generation. The flow returns an asset_id, which Seedance 2.0 can consume as asset://<asset-id>.

The API uses Volcengine-style Action + Version routing with JSON request bodies.

パスを選ぶ

人物が架空か、本人の H5 生体確認が必要な実在人物かに応じてパスを選びます。

Decision tree for choosing between the AIGC virtual portrait path and the LivenessFace real-person portrait path.
Choose AIGC for virtual or fictional portraits; choose LivenessFace when a real person must complete H5 liveness verification.

AIGC virtual portrait flow

Use the AIGC path for fictional or brand-owned characters: create a group, register media, then poll until the asset is active.

Swimlane sequence diagram showing CreateAssetGroup, media upload, CreateAsset, GetAsset polling, and asset_id readiness for the AIGC virtual portrait flow.
AIGC virtual portraits create the group directly, upload media by public URL, then poll the asset until it is ready for Seedance 2.0.
  • CreateAssetGroup requires GroupType=AIGC and Name.
  • CreateAsset accepts AssetType: Image, Video, or Audio.

Wait for UpstreamStatus=Active before using the asset. Poll GetAsset(Id) roughly every 3 seconds, up to about 60 seconds, until Result.UpstreamStatus becomes Active. Seedance rejects assets still in Processing.

LivenessFace real-person flow

Use LivenessFace for a real person. Create a visual validation session, open H5Link on the user phone, then exchange BytedToken for GroupId.

Swimlane sequence diagram showing CreateVisualValidateSession, H5Link scan, CallbackURL, GetVisualValidateResult, and the shared CreateAsset polling tail for LivenessFace.
LivenessFace adds the H5 scan and callback before returning a verified GroupId; after that, asset creation follows the same tail as AIGC.
  • BytedToken and H5Link are valid for about 120 seconds.
  • ValidatePending means the H5 scan is not finished yet.

Wait for UpstreamStatus=Active before using the asset. Poll GetAsset(Id) roughly every 3 seconds, up to about 60 seconds, until Result.UpstreamStatus becomes Active. Seedance rejects assets still in Processing.

Seedance 2.0 で asset_id を使う

警告

Only seedance-2.0 and seedance-2.0-fast support asset://. seedance-1.5-pro does not; passing an asset:// URL to it will be rejected upstream.

After GetAsset returns UpstreamStatus=Active, pass the Portrait asset into Seedance 2.0 using an asset:// URL.

cURL: use asset_id in Seedance 2.0
1curl https://api.alltoken.ai/v1/videos/generations -H "Authorization: Bearer $ALLTOKEN_API_KEY" -H "Content-Type: application/json" -d '{
2 "model": "seedance-2.0",
3 "prompt": "A confident keynote speaker on stage, cinematic 4K",
4 "ratio": "16:9",
5 "duration": 5,
6 "resolution": "720p",
7 "content": [
8 { "type": "image_url", "image_url": { "url": "asset://asset-20260318035710-xxxxx" }, "role": "first_frame" }
9 ]
10 }'

クォータとアップロード

  • Maximum 50 active groups per customer. DeleteAssetGroup releases quota immediately.
  • Maximum 50 assets per group.
  • Name is limited to 50 characters.

Two ways to register media into Portrait, depending on whether you have a CDN / public host:

  • With CDN / public host: POST /v1/portrait/?Action=CreateAsset with URL in JSON body. The URL must be publicly reachable by Volcengine.
  • Without CDN: POST /v1/portrait/upload as multipart/form-data with file + GroupId. The gateway uploads to R2 and auto-registers with Volcengine.

multipart limits: image/jpeg / image/png / image/webp; max size 10 MB; shares the same 50-asset quota as CreateAsset.

multipart upload (cURL)
1curl https://api.alltoken.ai/v1/portrait/upload -H "Authorization: Bearer $ALLTOKEN_API_KEY" -F "GroupId=group-20260318035710-xxxxx" -F "file=@./portrait.jpg"

全 12 Actions

The /v1/portrait/ endpoint multiplexes 12 Actions via ?Action=... query (Volcengine Action protocol style).

ActionPurposePath
CreateAssetGroupCreate AIGC virtual portrait groupAIGC only
GetAssetGroupGet group detailsBoth
ListAssetGroupsList groups (filter by GroupType)Both
UpdateAssetGroupRename / update group metaBoth
DeleteAssetGroupDelete group (releases quota)Both
CreateAssetRegister asset by URLBoth
GetAssetGet asset status / metadataBoth
ListAssetsList assets in a groupBoth
UpdateAssetRename assetBoth
DeleteAssetDelete asset (releases quota)Both
CreateVisualValidateSessionStart H5 face-scan sessionLivenessFace only
GetVisualValidateResultFetch GroupId after scanLivenessFace only

Complete API reference: Portrait API reference.

エラー

CodeWhen it appearsWhat to do
InvalidParameterWrong GroupType, invalid AssetType, or malformed bodyFix the request body and retry.
AIGCNotAvailableAIGC group creation is not enabled for the accountContact AllToken support or use LivenessFace.
ValidatePendingH5 scan is not finished yetWait briefly, then retry before the 120-second token window expires.
InvalidTokenBytedToken is unknown or not owned by the API keyCreate a new validation session.
TokenExpiredBytedToken has expiredCreate a new validation session and ask the user to scan again.
QuotaExceededGroup or asset quota is fullDelete unused groups or assets, then retry.
ForbiddenCross-customer access to GroupId / AssetId owned by another customerUse only IDs returned to your own API key. Existence is intentionally hidden.
InvalidParameterCreateAssetGroup with GroupType=LivenessFaceLivenessFace groups are auto-created by the H5 scan flow only; do not call CreateAssetGroup for them.