Heygen Avatar Iv
heygen-avatar-iv
料金
heygen-avatar-iv per second
| 単価 | $0.150 |
|---|
紹介文を準備中
このモデルの詳細ガイドを準備しています。下記の料金・パラメータ・API ドキュメントはご利用いただけます。
生成タスクの作成
https://api.hiapi.ai/v1/tasks ヘッダー
Authorizationstring必須アカウントの API キー。すべてのリクエストで必須です。例:Bearer YOUR_HIAPI_API_KEY。API キーを取得
Content-Typestring任意リクエストボディは常に JSON として解析されます。送信する場合は application/json(charset 付き可)のみ受け付け、他の値は 415 を返します。例:application/json。
Idempotency-Keystring任意冪等キー。最大 255 バイト。同じアカウントで同じキーの再試行はタスクを 1 つだけ作成し、リプレイは最初の taskId を返します。
ネットワークタイムアウトやクライアントの自動再試行時、同じキーではタスクを 1 回だけ作成し、二重課金は発生しません(適用範囲 = API キーのアカウント)。業務側の一意識別子(例:"order-42")をキーに使うことを推奨します。同じキーのリプレイは最初の taskId を返し、キーは初回送信から 24 時間で失効します。詳細なシナリオ表は統一非同期 API の紹介ページをご覧ください。
ボディ
modelstring必須現在の固定値:heygen-avatar-iv
routestring任意現在の固定値:default
inputobject必須
heygen-avatar-iv とルート default の業務パラメータオブジェクト。下のパラメータ表を参照してください。
voicestring任意デフォルト: "Warm Pro Narrator"minLength 1Voice used to speak the script. Ignored when audio_url is present.
Warm Pro NarratorChill BrianIvyJohn DoeMonika SogamHope Archer Brittneyすべて表示(94 件)
PatrickDavid CastlemoreMichael CAdam Stone JuniperCassidy Jessica Anne BogartArabellaAndrewSpuds Oxley Grace ElderHelenCanyon RiversDerya - Lifelike - ExcitedMellow MarcusJack Sterling - BroadcasterBrenda - UGC - 1.mp4ReidReaganTerryJennyRadio RickDeniseTim in car - ExcitedIskanderThompsonDelicate Daisy - ExcitedKingstonGeorge UGC 1Bold BlakeJaneExpressive EvanMarianne - IAAaronModern Recipe Host - Voice 1WillowCute Chloe - FriendlyRafaelJune - LifelikeCrisp ChloeSlick SimonNassim - InformativeBaritone BenMaxwellEllie Faye - ExcitedMilaniFeisty Fiona - ExcitedProfessor DeanRose - UGC - 1.mp4ShonaHudson WilderAnn - IAAlastair KensingtonOxleyChristinaAndrew Rizz PeytonGerardo - OutdoorChloe - LifelikeStephanieAnthony - IASignal - Voice 1LucaLisa - Voice 1T.W.TuckerJack Sullivan - SeriousWinterMireia - LifelikeGeorgiaStellaMasha - LifelikeCharming Charles - FriendlySerenityAnnie - ExcitedRalphBethanyDominicMason FinnLeenaVeteran VictorTamaraNik PublicCalm ChloeSevikReillyRaulImposing IanRelaxed RayDexter - ProfessionalRelaxed RickEdwinRupert BlackwoodGinnyHopepromptstring任意minLength 1maxLength 5000Text the avatar will speak. Required when audio_url is absent.
audio_urlstring任意pattern ^https://HTTPS audio URL for lip-sync, at most 600 seconds. When present, prompt and voice are ignored.
image_urlstring必須pattern ^https://HTTPS URL of the photo to animate. It must contain one clear, front-facing face. jpg, jpeg, png, webp, gif, avif, heic, heif.
backgroundobject任意
Fills the frame area not covered by the portrait when the output aspect ratio differs from the photo. color takes a #RRGGBB hex value; image takes an HTTPS image URL. Defaults to white.
typestring必須colorimagevaluestring必須minLength 1resolutionstring任意デフォルト: "720p"720p1080paspect_ratiostring任意デフォルト: "16:9"auto keeps the source photo ratio when it can be read, otherwise 16:9.
16:99:164:55:41:1autocallbackobject任意
終了状態の通知設定。省略した場合はコールバックされず、呼び出し側でポーリングします。
作成時に callback.url を指定すると、タスク終了時に HiAPI があなたのサービスへ POST し、ポーリングが不要になります。コールバックのリクエストボディはタスク詳細と同構造です。署名検証・再送・冪等の詳細は統一非同期 API 紹介ページのコールバック説明を参照してください。
urlstring必須callback を指定する場合は必須。タスク終了後にこの URL へ POST します。有効な http(s) URL である必要があります。
whenstring任意デフォルト: "final"現在は final のみ対応(success / fail の両方で通知)。
finalstoragestring任意デフォルト: "temp"成果物の保存期間:temp(デフォルト・約 7 日)または persistent(長期保存・サイズ課金)。残高不足や保存上限超過の場合は temp に自動降格します。実際に適用された段階はタスク詳細レスポンスで確認できます。
temppersistentリクエスト例
# 非同期タスクを送信。成功すると即座に taskId を返します(生成完了は待ちません)
curl -X POST "https://api.hiapi.ai/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "heygen-avatar-iv",
"input": {
"voice": "Warm Pro Narrator",
"image_url": "…",
"resolution": "720p",
"aspect_ratio": "16:9"
}
}' const res = await fetch("https://api.hiapi.ai/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "heygen-avatar-iv",
input: {
"voice": "Warm Pro Narrator",
"image_url": "…",
"resolution": "720p",
"aspect_ratio": "16:9"
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.ai/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "heygen-avatar-iv",
"input": {
"voice": "Warm Pro Narrator",
"image_url": "…",
"resolution": "720p",
"aspect_ratio": "16:9"
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} タスク詳細の取得
https://api.hiapi.ai/v1/tasks/:id レスポンスフィールド
taskIdstring必須タスク ID。先頭は固定で tk-hiapi-。
modelstring必須解決済みのモデル完全名。route パラメータで送信したタスクは base@route(例:gpt-image-2/text-to-image@ext)を返し、それ以外は送信時のモデル名と同一です。
routestring任意route パラメータを明示して送信したタスクでのみ出現し、送信時の値をエコーします。
statusstring必須タスク状態。
queued キュー投入済み、未開始。
handling 処理中。
archiving 処理完了、成果物準備中。
success 終端:完了。成果物利用可能(output を返却)。
fail 終端:失敗(error を返却)。
送信後は status で判断します:success と fail が終端、それ以外は非終端です。1〜3 秒間隔で終端までポーリングすることを推奨します。成功したら output[].url から成果物をダウンロードし、expireAt までに保存先へ転送してください。長期保存が必要な場合は作成時に storage: "persistent" を指定します。
creatednumber必須タスク作成時刻(Unix 秒)。
completednumber必須終了状態になった Unix 秒。非終端では 0 固定。
outputarray任意
status == success のときのみ出現。成果物リスト — 常に配列で、1 タスクで複数の type を同時に返すことがあります(例:video + first_frame)。
Array [ object ]
配列要素
urlstring必須成果物の URL。直接ダウンロードできます。
typestring必須現在の候補値:video、image、audio、first_frame、last_frame、thumbnail。今後拡張される可能性があります。
expireAtnumber必須成果物にアクセスできる期限(Unix 秒)。期限までにダウンロードまたは転送してください。
errorobject任意
status == fail のときのみ出現。
codestring必須業務エラーコード。
messagestring必須エラーの説明。
レスポンス例
成功
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} 処理中(非終端)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} 失敗
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
}