実在人物素材 API
API 利用者の YingTu ログインは不要ですが、本人は公式 H5 で本人確認、同意、ライブネス認証を完了する必要があります。
エンドポイント
Base URL
https://yingtu.aiPOST /api/seedance-assets/real-persons/verificationsGET /api/seedance-assets/real-persons/verifications/{verification_id}POST /api/seedance-assets/real-personsGET /api/seedance-assets/real-persons/{id}認証
YingTu または Google へのログインは不要です。LaoZhang API Key を Authorization: Bearer <LAOZHANG_API_KEY> で送信します。
| ヘッダー | 必須 | 説明 |
|---|---|---|
Authorization | 可 | Bearer 認証で送信する LaoZhang API Key。 |
Content-Type | POST のみ | 作成操作は application/json を使用します。 |
リクエスト
POST /api/seedance-assets/real-persons/verifications
| フィールド | 必須 | 説明 |
|---|---|---|
callback_url | 必須 | 認証完了後に開く HTTPS URL。 |
language | 任意 | 公式 H5 言語:zh、en、zh-Hant。既定値は zh。 |
GET /api/seedance-assets/real-persons/verifications/{verification_id}
| フィールド | 必須 | 説明 |
|---|---|---|
verification_id | 必須 | 認証作成レスポンスで返されるパスパラメータ。 |
POST /api/seedance-assets/real-persons
| フィールド | 必須 | 説明 |
|---|---|---|
verification_id | 必須 | verified 状態かつ同じ API Key に属すること。 |
image_url | 必須 | 同一人物の鮮明な正面画像を指す公開 HTTPS URL。 |
name | 任意 | 素材名、最大64文字。 |
作成リクエスト
curl --request POST \
--url https://yingtu.ai/api/seedance-assets/real-persons/verifications \
--header "Authorization: Bearer $LAOZHANG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"callback_url": "https://customer.example.com/seedance/verified",
"language": "en"
}'curl --request GET \
--url https://yingtu.ai/api/seedance-assets/real-persons/verifications/ver_eyJvcGFxdWUiOiJleGFtcGxlIn0 \
--header "Authorization: Bearer $LAOZHANG_API_KEY"curl --request POST \
--url https://yingtu.ai/api/seedance-assets/real-persons \
--header "Authorization: Bearer $LAOZHANG_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"image_url": "https://cdn.example.com/presenter.webp",
"name": "presenter-a"
}'レスポンス例
HTTP/1.1 201 Created
Content-Type: application/json
{
"request_id": "req_01JZEXAMPLE",
"verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"status": "requires_user_action",
"verification_url": "https://official-h5.example/?...&lng=en",
"callback_url": "https://customer.example.com/seedance/verified",
"expires_at": "2026-07-29T05:30:00.000Z"
}{
"request_id": "req_01JZEXAMPLE",
"verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"status": "pending",
"expires_at": "2026-07-29T05:30:00.000Z"
}{
"request_id": "req_01JZEXAMPLE",
"verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"status": "verified",
"expires_at": "2026-07-29T05:30:00.000Z"
}{
"error": {
"code": "verification_pending",
"message": "The represented person has not completed verification.",
"request_id": "req_01JZEXAMPLE",
"retryable": true
}
}{
"error": {
"code": "verification_expired",
"message": "The verification session expired. Create a new session.",
"request_id": "req_01JZEXAMPLE",
"retryable": false
}
}{
"request_id": "req_01JZEXAMPLE",
"id": "ast_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"object": "seedance.asset",
"kind": "real_person",
"name": "presenter-a",
"status": "Processing",
"uri": "asset://asset-20260729-example"
}認証コールバック
GET https://customer.example.com/seedance/verified
?verification_id=ver_eyJvcGFxdWUiOiJleGFtcGxlIn0
&result_code=10000result_code=10000 は公式 H5 フローの完了を示します。以後の GET と POST には callback の Location にある verification_id を使用します。pending の GET は HTTP 200、早すぎる素材 POST は HTTP 409、期限切れ ID は HTTP 410 です。BytedToken は callback に公開されません。
公式認証ページの言語
公式資料に記載されているのは lng=zh、lng=en、lng=zh-Hant のみで、既定値は zh です。本 API は language を返却リンクに設定します。
推奨マッピング:zh→zh、en→en、ru/ja/ko/es→en。繁体字は zh-Hant を利用できます。日本語を含む他4言語の公式認証ページは現在公表されていません。
zh → lng=zh
en → lng=en
ru / ja / ko / es → lng=en
Traditional Chinese → lng=zh-Hantコード例
const headers = {
Authorization: `Bearer ${process.env.LAOZHANG_API_KEY}`,
"Content-Type": "application/json",
};
const begin = await fetch("https://yingtu.ai/api/seedance-assets/real-persons/verifications", {
method: "POST",
headers,
body: JSON.stringify({
callback_url: "https://customer.example.com/seedance/verified",
language: "en",
}),
});
if (!begin.ok) throw new Error(await begin.text());
const session = await begin.json();
const verificationUrl = session.verification_url;
// Deliver verificationUrl only to the represented person's authenticated UI.
// Do not log or persist this short-lived URL.
// After the represented person finishes the official H5 flow:
const callbackVerificationId =
"<verification_id received at your callback URL>";
const verified = await fetch(
`https://yingtu.ai/api/seedance-assets/real-persons/verifications/${callbackVerificationId}`,
{ headers: { Authorization: headers.Authorization } },
).then((response) => response.json());
if (verified.status === "verified") {
const asset = await fetch("https://yingtu.ai/api/seedance-assets/real-persons", {
method: "POST",
headers,
body: JSON.stringify({
verification_id: callbackVerificationId,
image_url: "https://cdn.example.com/presenter.webp",
name: "presenter-a",
}),
}).then((response) => response.json());
console.log(asset);
}import os
import requests
endpoint = "https://yingtu.ai/api/seedance-assets/real-persons"
verification_endpoint = f"{endpoint}/verifications"
headers = {"Authorization": f"Bearer {os.environ['LAOZHANG_API_KEY']}"}
session = requests.post(
verification_endpoint,
headers=headers,
json={
"callback_url": "https://customer.example.com/seedance/verified",
"language": "en",
},
timeout=30,
)
session.raise_for_status()
verification = session.json()
verification_url = verification["verification_url"]
# Deliver verification_url only to the represented person's authenticated UI.
# Do not log or persist this short-lived URL.
# Run this after the represented person completes the official H5 flow.
callback_verification_id = "<verification_id received at your callback URL>"
status = requests.get(
f"{verification_endpoint}/{callback_verification_id}",
headers=headers,
timeout=30,
)
status.raise_for_status()
if status.json()["status"] == "verified":
asset = requests.post(
endpoint,
headers=headers,
json={
"verification_id": callback_verification_id,
"image_url": "https://cdn.example.com/presenter.webp",
"name": "presenter-a",
},
timeout=60,
)
asset.raise_for_status()
print(asset.json())素材ステータス照会
curl --request GET \
--url https://yingtu.ai/api/seedance-assets/real-persons/ast_eyJvcGFxdWUiOiJleGFtcGxlIn0 \
--header "Authorization: Bearer $LAOZHANG_API_KEY"HTTP/1.1 200 OK
Content-Type: application/json
{
"request_id": "req_01JZEXAMPLE",
"id": "ast_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"object": "seedance.asset",
"kind": "real_person",
"status": "Active",
"uri": "asset://asset-20260729-example",
"created_at": "2026-07-29T05:00:00Z",
"updated_at": "2026-07-29T05:01:00Z"
}{
"request_id": "req_01JZEXAMPLE",
"id": "ast_eyJvcGFxdWUiOiJleGFtcGxlIn0",
"object": "seedance.asset",
"kind": "real_person",
"status": "Failed",
"uri": "asset://asset-20260729-example",
"failure": {
"code": "InvalidImage",
"message": "The image did not pass upstream validation."
}
}エラー
| HTTP ステータス | エラーコード | 説明 | 再試行 |
|---|---|---|---|
| 400 | invalid_request | リクエスト本文、フィールド、または値が無効です。 | 不可 |
| 401 | invalid_api_key | API Key がない、無効、または停止されています。 | 不可 |
| 403 | resource_not_owned | 認証または素材がこの API Key に属していないか、公開 ID が無効です。 | 不可 |
| 403 | capability_unavailable | サービスアカウントで非公開人物素材の権限が有効ではありません。 | 不可 |
| 409 | verification_pending | 認証が pending の間に POST /real-persons を呼んだ場合のみ返ります。GET の状態照会は HTTP 200 と status=pending を返します。 | 可 |
| 410 | verification_expired | GET の認証照会または POST /real-persons で30分の有効期間を過ぎた verification_id を使用しました。 | 不可 |
| 413 | payload_too_large | JSON リクエスト本文が 16 KB を超えています。 | 不可 |
| 415 | unsupported_media_type | POST リクエストが application/json ではありません。 | 不可 |
| 429 | rate_limit_exceeded | API Key の呼び出し上限に達しました。 | 可 |
| 500 | internal_error | サービスがリクエストを完了できませんでした。 | 不可 |
| 502 | upstream_error | 上流の素材または認証サービスでエラーが発生しました。 | 可 |
| 503 | authentication_unavailable | API Key 検証サービスが一時的に利用できません。 | 可 |
| 503 | service_unavailable | 素材 API のサーバー設定が一時的に利用できません。 | 可 |
{
"error": {
"code": "invalid_request",
"message": "image_url is required.",
"request_id": "req_01JZEXAMPLE",
"retryable": false
}
}レート制限と追跡
API Key ごとに作成系 POST は1時間あたり最大12回です。GET の状態照会はカウントされません。上流権限による追加制限があります。制限時は 429 と Retry-After(秒)を返します。
成功・エラー応答には request_id が含まれます。問い合わせ時はこの値を提示し、完全な API Key は送信しないでください。
X-RateLimit-Limit: <limit>
X-RateLimit-Remaining: <remaining>
X-RateLimit-Reset: <unix-seconds>
Retry-After: <seconds>