Wan3.0 Video
wan3.0-video
wan3.0-video を試す
入力
出力
料金
wan3.0-video per second
| 仕様 | 単価 |
|---|---|
| 480P | $0.040 |
| 720P | $0.080 |
| 1080P | $0.160 |
紹介文を準備中
このモデルの詳細ガイドを準備しています。下記の料金・パラメータ・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必須現在の固定値:wan3.0-video
routestring任意現在の固定値:default
inputobject必須
wan3.0-video とルート default の業務パラメータオブジェクト。下のパラメータ表を参照してください。
seedinteger任意min 0max 2147483647Use a fixed seed when reproducible output is needed.
audioboolean任意デフォルト: trueInclude a synchronized audio track in the output video.
promptstring必須minLength 1maxLength 20000Describe the scene, motion, camera, lighting, and sound. In reference mode, refer to assets in array order as Image1, Video1, or Audio1.
durationinteger任意デフォルト: 5min 2max 30Output duration in seconds. Reference video duration plus output duration must not exceed 30 seconds.
resolutionstring任意デフォルト: "1080P"Output resolution.
480P720P1080Paspect_ratiostring任意デフォルト: "adaptive"adaptive follows the input media and prompt.
adaptive16:94:31:13:49:16last_frame_urlstring任意One publicly reachable image used as the last frame together with first_frame_url.
first_frame_urlstring任意One publicly reachable image used as the first frame. Do not combine with reference media arrays.
reference_file_urlsarray任意maxItems 1At most one publicly reachable document or presentation.
Array [ string ]
reference_link_urlsarray任意maxItems 1At most one publicly reachable webpage that does not require login.
Array [ string ]
reference_audio_urlsarray任意maxItems 5Up to 5 WAV or MP3 clips, each 1-15 seconds. Pair audio with an image or video.
Array [ string ]
reference_image_urlsarray任意maxItems 10Up to 10 images for all-purpose reference generation.
Array [ string ]
reference_video_urlsarray任意maxItems 5Up to 5 reference videos. Each clip is 1-15 seconds and the combined duration is at most 15 seconds.
Array [ string ]
callbackobject任意
終了状態の通知設定。省略した場合はコールバックされず、呼び出し側でポーリングします。
作成時に 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": "wan3.0-video",
"input": {
"audio": true,
"prompt": "…",
"duration": 5,
"resolution": "1080P",
"aspect_ratio": "adaptive"
}
}' 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: "wan3.0-video",
input: {
"audio": true,
"prompt": "…",
"duration": 5,
"resolution": "1080P",
"aspect_ratio": "adaptive"
}
}),
});
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": "wan3.0-video",
"input": {
"audio": true,
"prompt": "…",
"duration": 5,
"resolution": "1080P",
"aspect_ratio": "adaptive"
}
},
)
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"
}
}
}