Private Portrait Asset Workflow Guide
This guide details the complete end-to-end integration lifecycle for real-person biometric verification, private portrait asset ingestion, and video generation model invocation via the AGIOne protocol compatibility gateway.
Workflow Sequence Overview
Biometric verification and asset operations use the System API AK/SK with Ark-compatible signing. When submitting the final video rendering task, the client seamlessly switches to the Model API Key with standard Bearer authentication:
Six-Step Implementation Pipeline
Obtain the API Base URL, 4-digit Asset Service ID, System API AK/SK, Model API Key, and the target Video Model ID from your instance administrator. Confirm that the caller can access the asset service and video model, and that the model’s upstream configuration can access assets created through that service. AGIOne access authorization does not replace checks that the upstream account and resource project match.
Call Start Real-Person Verification H5 (CreateVisualValidateSession). The gateway returns a temporary BytedToken and a client-facing H5Link. Provide this link to the actual person to complete real-time face verification in their browser or mobile device. Never bypass this step programmatically.
Once the person completes verification, call Get Verified Asset Group ID (GetVisualValidateResult) with the BytedToken. On success, retrieve the verified GroupId. Frontend callback parameters are informational only; always rely on the authoritative server-side response.
Call Create Asset (CreateAsset) with the GroupId, asset type, and an upstream-accessible media URL. Record the returned asset Id. Poll Get Asset Details (GetAsset) until the Status turns Active. If the status becomes Failed, inspect the error details.
Using your AGIOne Model API Key (Bearer token), call Create Video Task (CreateVideoTask). Reference the active asset in the content image array using the URI scheme: asset://<ASSET_ID>. Describe reference images sequentially in prompts. Record the returned task id.
Periodically poll Get Video Task (GetVideoTask) with exponential backoff while in queued or running states. When the task reaches succeeded, persist the generated video CDN URL. Terminate polling immediately if the task enters failed or expired states.
Error Recovery & Operational Boundaries
- Session Expiration: If the verification link expires before completion, initiate a new session via Step 2. Expired
BytedTokenvalues cannot be renewed. - Asset Creation Retries: Fix media resolution, download accessibility, or face mismatch errors before retrying. Do not automatically retry timed-out POST requests without verifying if the asset was already registered.
- Virtual Avatar Workflows: For non-biometric synthetic avatars, skip the H5 step and call Create Asset Group (CreateAssetGroup) directly with
GroupType="AIGC". - Project Boundary:
ProjectName=defaultis an upstream cloud isolation rule and does not grant cross-tenant access in AGIOne.