> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitoearn.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Real-person verification

> Verify an authorized person under video generation. The session accepts only callbackUrl, and completion requires bytedToken in the path.

Real-person assets let Seedance use authorized media of a real person. Your integration only needs an AiToEarn `X-Api-Key`; no Volcengine access key or secret key is required.

> [!WARNING]
>
> Use this feature only with the person's explicit authorization. Keep the API key on your backend.

## Separate from virtual portrait assets

Virtual portraits are documented in [Virtual portrait assets](https://docs.aitoearn.ai/en/use/video-generation/virtual-portrait-assets.md). This page covers real-person verification only.

> [!WARNING]
>
> If generating a video with a real-person asset fails, use [Create virtual portrait group](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-groups.md).

## Integration flow

1. Create a verification session and store `bytedToken`.
2. Send `shortLink` or `h5Link` to the person being verified.
3. Complete the session from your backend with the same API key.
4. Store the returned `RealPerson` group ID.
5. Create an asset and wait until its status is `Active`.
6. Pass `asset://{assetId}` to Seedance.

## Create and complete verification

This request has one field. Do not send the virtual portrait fields `name` or `description`:

| Parameter | Required | Meaning |
| - | - | - |
| `callbackUrl` | Yes | HTTP(S) URL to open after verification |

Call [Create verification session](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-visual-validation-sessions.md):

```bash theme={null}
curl --request POST 'https://aitoearn.ai/api/ai/volcengine/assets/visual-validation-sessions' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <API_KEY>' \
  --data '{"callbackUrl":"https://example.com/real-person/callback"}'
```

Store `data.bytedToken`. AiToEarn retains the session for 30 minutes. After verification, the browser redirects to your `callbackUrl` with `bytedToken`, `resultCode`, and other query parameters.

Your backend must still call [Complete verification](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-visual-validation-sessions-byted-token-complete.md) with the same API key:

```bash theme={null}
curl --request POST \
  'https://aitoearn.ai/api/ai/volcengine/assets/visual-validation-sessions/<BYTED_TOKEN>/complete' \
  --header 'X-Api-Key: <API_KEY>'
```

Completion has no request body. Store `data.groupId`. Business code `12329` means the result is not ready; retry the same `bytedToken`. If generating a video with a real-person asset fails, use [Create virtual portrait group](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-groups.md).

## Create an asset

If the file is local or private, use [Asset upload](https://docs.aitoearn.ai/en/use/asset-upload.md) first. Then call [Create asset](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-items.md):

```bash theme={null}
curl --request POST 'https://aitoearn.ai/api/ai/volcengine/assets/items' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <API_KEY>' \
  --data '{
    "groupId": "group_xxx",
    "url": "https://assets.example.com/person-reference.jpg",
    "assetType": "Image"
  }'
```

Store `data.assetId`. Query [Asset details](https://docs.aitoearn.ai/en/api-reference/get-api-ai-volcengine-assets-items-asset-id.md) until the status becomes `Active`:

```bash theme={null}
curl 'https://aitoearn.ai/api/ai/volcengine/assets/items/<ASSET_ID>' \
  --header 'X-Api-Key: <API_KEY>'
```

`Processing` means the asset is still being processed. `Failed` means you should check the source file and create a new asset.

## Use the asset in Seedance

Send the following body to `POST /api/ai/video/generations` with the same `X-Api-Key`:

```json theme={null}
{
  "model": "doubao-seedance-2-0-260128",
  "prompt": "Preserve the person identity and facial features",
  "mode": "multi-ref",
  "images": ["asset://<ASSET_ID>"],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5
}
```

* Keep one verified person per real-person group.
* Use clear face media and avoid multiple faces.
* Keep the source URL publicly accessible while processing.
* Match the asset type to `images`, `videos`, or `audios`.
* Append only the asset ID after `asset://`.
* Use only `Active` assets.

> [!WARNING]
>
> If generating a video with a real-person asset fails, use [Create virtual portrait group](https://docs.aitoearn.ai/en/api-reference/post-api-ai-volcengine-assets-groups.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.