API リファレンス

動画生成 API:テキスト・画像・リファレンスから動画

生成を送信し、すぐにタスクを返します。クレジットはタスク作成時に消費され、失敗すると自動で返金されます。

API キーを取得Wan 3 API チーム ·
POSThttps://api.wan3api.org/v1/videos/generations

リクエストボディ

項目型説明
model必須stringGET /models のモデル ID。
prompt必須string動画で起こること。最大 5000 文字。
modestringtext・frames・reference のいずれか。省略時は送ったメディアから判断します(フレーム URL なら frames、リファレンス URL なら reference、なければ text)。
durationinteger出力の長さ(整数秒)。既定は 5 秒で、モデルの範囲内に収められます。
resolutionstring480P・1080P などモデルが対応する解像度。既定は最も安いもの。
aspect_ratiostring16:9・9:16・1:1 など。frames モードでは最初のフレームが形を決めるため無視されます。
first_frame_urlstringframes モード:動画の最初の画像(公開 HTTPS)。
last_frame_urlstringframes モード:動画の最後の画像。
image_urlsstring[]reference モード:保ちたい人物・商品・スタイルの画像。
video_urlsstring[]reference モード:動きやカメラの参考クリップ。アップロード秒数も課金されます。
audio_urlsstring[]reference モード:参考にする音声。
callback_urlstring完了したタスクを POST する公開 HTTPS URL。
curl -X POST "https://api.wan3api.org/v1/videos/generations" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "wan-3",
  "prompt": "A red fox runs through fresh snow at sunrise, slow motion, cinematic",
  "duration": 5,
  "resolution": "480P",
  "aspect_ratio": "16:9"
}'

モード

  • text — テキストから動画:プロンプトのみ。
  • frames — 画像から動画:最初のフレーム(任意で最後のフレーム)と動きを説明するプロンプト。
  • reference — リファレンスから動画:画像 10 枚・クリップ 5 本・音声 5 つまでのリファレンスに忠実な動画(Wan 3.0 と Wan 3.0 Prime)。

画像から動画

json
{
  "model": "wan-3",
  "prompt": "The camera slowly pushes in as she turns and smiles",
  "duration": 5,
  "resolution": "480P",
  "first_frame_url": "https://example.com/first-frame.jpg"
}

リファレンスから動画

json
{
  "model": "wan-3",
  "prompt": "Image 1 walks through a neon-lit night market, handheld camera",
  "duration": 5,
  "resolution": "480P",
  "aspect_ratio": "16:9",
  "image_urls": [
    "https://example.com/character.png"
  ],
  "callback_url": "https://your-app.com/webhooks/video"
}

メディア URL

送信時に各 URL をダウンロードするため、公開 HTTPS で 20 秒以内に応答する必要があります。サイズや長さの上限は Web アプリのアップロードと同じです。取得できない URL は課金前に 400 media_unreachable を返します。

冪等性

Idempotency-Key ヘッダー(255 文字までの一意な文字列)を送ると安全に再試行できます。同じキーでの再送は元のタスクを Idempotent-Replayed: true ヘッダー付きで返し、課金しません。

レスポンス

200 とタスクオブジェクト。生成が終わるまで status は processing です。

json
{
  "id": "3f1c9a52-6d1e-4c1b-9a77-2f4d8f0c9e10",
  "object": "video.generation",
  "model": "wan-3",
  "mode": "text",
  "status": "processing",
  "progress": 0,
  "prompt": "A red fox runs through fresh snow at sunrise, slow motion, cinematic",
  "duration": 5,
  "resolution": "480P",
  "aspect_ratio": "16:9",
  "video_url": null,
  "credits": 15,
  "refunded": false,
  "error": null,
  "source": "api",
  "created_at": "2026-11-01T08:00:00.000Z",
  "completed_at": null
}

料金

出力秒数 × 解像度ごとのモデルの秒単価に、リファレンス動画の秒数を同じ単価で加えたもの。リファレンス画像は無料です。レスポンスの credits が実際の消費量です。単価は「モデルと料金」を参照してください。 モデルと料金 →