TUIWOTUIWO
APIByteDanceSeedance series

Real-person liveness

Create a liveness session, obtain a LivenessFace group and upload real-person assets.

Real-person imagery must complete liveness verification first. Upload the verified person's assets to the returned LivenessFace group, then reference them as asset://.

1. Create a session

curl -X POST 'https://ai.tuiwo.vip/ai?Action=CreateVisualValidateSession&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"CallbackURL":"https://example.com/done"}'
FieldTypeRequiredDescription
CallbackURLstringnoBrowser redirect after the person taps Done in the H5 page; not a server callback. Public HTTP(S) only.

Result fields:

FieldTypeDescription
BytedTokenstringToken for polling the result
H5LinkstringLiveness page URL

Treat H5Link as a sensitive link and do not share it publicly.

2. Complete liveness

The verified person opens H5Link on a phone and normally has about 15 minutes to complete liveness verification.

3. Poll the result

curl -X POST 'https://ai.tuiwo.vip/ai?Action=GetVisualValidateResult&Version=2024-01-01' \
  -H 'Authorization: Bearer $TUIWO_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"BytedToken":"BYTED_TOKEN"}'

Poll every 3-5 seconds until Result.GroupId is non-empty.

  • While verification is pending, GroupId is an empty string.
  • Failure returns VisualValidateFailed.
  • Expiry returns VisualValidateSessionExpired.

Create a new session after failure or expiry.

4. Upload real-person assets

Use CreateAsset to upload images or video of the same verified person to Result.GroupId; wait for Active, then use asset://.

Shared workspace caveats

  • Liveness groups count toward the asset-group quota and appear in ListAssetGroups with GroupType = LivenessFace.
  • The current workspace is shared: customers in the same authorized group can see and reference each other's groups, including liveness groups.
  • Only share a group with trusted customers and obtain lawful authorization for real-person assets.
  • Deleting a private liveness group usually requires it to be expired or rejected.
  • CreateVisualValidateSession
  • GetVisualValidateResult

CreateRealValidateH5 is present in the proxy allowlist but not documented service; do not rely on it until confirmed.