YingTu Logo
Google ログインを確認しています…
Seedance ワークスペースへ戻る
REST API リファレンス

実在人物素材 API

API 利用者の YingTu ログインは不要ですが、本人は公式 H5 で本人確認、同意、ライブネス認証を完了する必要があります。

エンドポイント

Base URL

https://yingtu.ai
POST /api/seedance-assets/real-persons/verifications
GET /api/seedance-assets/real-persons/verifications/{verification_id}
POST /api/seedance-assets/real-persons
GET /api/seedance-assets/real-persons/{id}

認証

YingTu または Google へのログインは不要です。LaoZhang API Key を Authorization: Bearer <LAOZHANG_API_KEY> で送信します。

ヘッダー必須説明
AuthorizationBearer 認証で送信する LaoZhang API Key。
Content-TypePOST のみ作成操作は 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文字。

作成リクエスト

1. POST /verifications
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"
  }'
2. GET /verifications/{verification_id}
curl --request GET \
  --url https://yingtu.ai/api/seedance-assets/real-persons/verifications/ver_eyJvcGFxdWUiOiJleGFtcGxlIn0 \
  --header "Authorization: Bearer $LAOZHANG_API_KEY"
3. POST /real-persons
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"
  }'

レスポンス例

POST /verifications · 201
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"
	}
GET /verifications/{id} · 200 pending
{
  "request_id": "req_01JZEXAMPLE",
  "verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
  "status": "pending",
  "expires_at": "2026-07-29T05:30:00.000Z"
}
GET /verifications/{id} · 200 verified
{
  "request_id": "req_01JZEXAMPLE",
  "verification_id": "ver_eyJvcGFxdWUiOiJleGFtcGxlIn0",
  "status": "verified",
  "expires_at": "2026-07-29T05:30:00.000Z"
}
POST /real-persons · 409 pending
{
  "error": {
    "code": "verification_pending",
    "message": "The represented person has not completed verification.",
    "request_id": "req_01JZEXAMPLE",
    "retryable": true
  }
}
GET or POST · 410 expired
{
  "error": {
    "code": "verification_expired",
    "message": "The verification session expired. Create a new session.",
    "request_id": "req_01JZEXAMPLE",
    "retryable": false
  }
}
POST /real-persons · 202
{
  "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=10000

result_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

コード例

JavaScript · Node.js
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);
}
Python · requests
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"
}
Failed · HTTP 200
{
  "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 ステータスエラーコード説明再試行
400invalid_requestリクエスト本文、フィールド、または値が無効です。不可
401invalid_api_keyAPI Key がない、無効、または停止されています。不可
403resource_not_owned認証または素材がこの API Key に属していないか、公開 ID が無効です。不可
403capability_unavailableサービスアカウントで非公開人物素材の権限が有効ではありません。不可
409verification_pending認証が pending の間に POST /real-persons を呼んだ場合のみ返ります。GET の状態照会は HTTP 200 と status=pending を返します。
410verification_expiredGET の認証照会または POST /real-persons で30分の有効期間を過ぎた verification_id を使用しました。不可
413payload_too_largeJSON リクエスト本文が 16 KB を超えています。不可
415unsupported_media_typePOST リクエストが application/json ではありません。不可
429rate_limit_exceededAPI Key の呼び出し上限に達しました。
500internal_errorサービスがリクエストを完了できませんでした。不可
502upstream_error上流の素材または認証サービスでエラーが発生しました。
503authentication_unavailableAPI Key 検証サービスが一時的に利用できません。
503service_unavailable素材 API のサーバー設定が一時的に利用できません。
Error object
{
  "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>