本文へスキップ
Alibaba確認中

Wan 2.7 / Image to Video

wan-2-7-image-to-video

画像から動画出力: 動画入力: テキスト + 画像 + audio
料金を読み込み中…
公式定価 · 未確認

エンドポイント

すべてのモデルは 1 つの非同期ジョブ API を共有します。このモデルは slug で選択されます。

送信
POST https://api.hermes-ai.net/api/v1/jobs

{
  "model": "wan-2-7-image-to-video",
  "input": {
    "firstImageUrl": "https://example.com/input.png",
    "resolution": "720P",
    "duration": "5"
  }
}

その後、 GET /api/v1/jobs/{id} をステータスが終了状態になるまでポーリングします。

認証

送信には jobs:create、ポーリングには jobs:read 権限を持つ API キーを送ってください。

ヘッダー値備考
AuthorizationBearer <API key>または x-api-key でキーを送信します。
Content-Typeapplication/json
Idempotency-Key<unique string ≤128>必須。まったく同じリクエストを再試行する場合のみ再利用してください。

リクエストボディ

フィールド型必須備考
modelstring必須カタログのモデル slug。
inputobject必須モデルの入力スキーマのフィールド。
expectedPriceMicrosinteger任意ユーザーに表示した料金。一致しない場合は課金前に 409 PRICE_CHANGED が返されます。

input フィールド

不明なフィールドは INVALID_MODEL_INPUT で拒否されます。

フィールド型必須デフォルト許可される値と制約
prompt
string任意—

1–5000 chars

firstImageUrl
string必須—

Choose one of two: 1. first_frame=the first frame of the generated video. 2. first_frame+last_frame=start and end frames generate the video.

HTTPS image URL or media:<uuid>

lastImageUrl
string任意—

Choose one of two: 1. first_frame=the first frame of the generated video. 2. first_frame+last_frame=start and end frames generate the video.

HTTPS image URL or media:<uuid>

audioUrl
string任意—

audioUrl MP3 or WAV; maximum 15 MB.

HTTPS audio URL or media:<uuid>

negativePrompt
string任意—

0–500 chars

resolution
string必須"720P"

選択肢: "720P", "1080P"

duration
string必須"5"

選択肢: "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"

promptExtend
boolean任意true

Whether to enable prompt intelligent rewriting. After activation, use the large model to intelligently rewrite the input prompt. For shorter prompt generation, the effect is significantly improved, but it will increase the time consumption.

seed
integer任意—

Randomly select seeds with a value range of [0, 2147483647]. If not specified, the system will automatically generate random seeds. If you need to improve the reproducibility of the generated results, it is recommended to fix the seed value. Please note that due to the probabilistic nature of model generation, even with the same seed, it cannot be guaranteed that the results generated each time will be completely consistent

0–2147483647

レスポンス

新しいタスクは 202、Idempotency-Key の再送が一致した場合は 200 を返します。GET /api/v1/jobs/{id} は replayed を除いた同じ形式を返します。

フィールド型備考
idstringHermes AI のタスク ID。ポーリングに使用します。
modelstringモデル slug。
statusstringタスクのステータスを参照。
errorCodestring | nullタスクが失敗した場合や確認が必要な場合に設定されます。
priceMicrosinteger受付時に確定した見積もり(USD マイクロ単位)。
currency"USD"
createdAt / updatedAtstringISO 8601 形式のタイムスタンプ。
assets[]array{ id, type, url?, text? }。url は同一オリジンの /api/v1/results/<uuid> リンクです。
replayedboolean送信時のみ。冪等な再試行が一致した場合は true。

タスクのステータス

ステータス終了状態意味
queuedいいえ受け付け済みで、ワーカーを待っています。
submittingいいえモデルプロバイダーに送信中です。
runningいいえモデルが生成中です。
succeededはい完了しました。結果は assets にあります。
failedはい結果なしで終了しました。予約は解放されます。
reconciliation_requiredはいThe result is being verified. Keep the task ID and do not resubmit automatically.

エラー

すべてのエラーボディは { code, error } です。code で処理してください。

HTTPコード意味と対応
401AUTH_REQUIREDAPI キーまたはセッションがない、または無効です。
403INSUFFICIENT_SCOPEAPI キーにこのエンドポイントで必要な権限がありません。
403PERMISSION_DENIEDこの認証情報ではこの操作を実行できません。
429API_KEY_RATE_LIMITEDAPI キーのレート制限に達しました。Retry-After に従ってください。
429API_KEY_USAGE_EXCEEDEDAPI キーが使用上限に達しました。新しいキーを作成してください。
400INVALID_REQUESTボディが JSON オブジェクトではないか、必須の値がありません。
400INVALID_IDEMPOTENCY_KEYIdempotency-Key は 1〜128 文字の印字可能な ASCII 文字である必要があります。
400INVALID_MODEL_INPUTinput がモデルのスキーマと一致しません(不明なフィールド、必須フィールドの欠落、または無効な値)。
400 / 413INPUT_TOO_LARGEリクエストボディが 256 KB を超えています。先にメディアをアップロードし、メディア参照を送信してください。
404REQUEST_NOT_FOUNDNo chat request with this ID belongs to your account.
404MODEL_NOT_FOUNDこの slug のモデルはありません。
404JOB_NOT_FOUNDこの ID のタスクはお客様のアカウントに存在しません。
409IDEMPOTENCY_CONFLICTこの Idempotency-Key は別の入力で使用されています。新しいリクエストには新しいキーを使ってください。
409PRICE_CHANGED料金が expectedPriceMicros と異なります。料金を取得して再度確認してください。
409MODEL_PRICE_UNAVAILABLEこのモデルにはまだ料金が設定されていないため、実行できません。
409PAYMENT_REVIEW_REQUIREDA refund left an uncovered balance. Contact support or cover the balance before submitting tasks.
409INSUFFICIENT_CREDITS利用可能なクレジットがタスクの料金に足りません。
429RATE_LIMITED1 分あたりのタスク送信数が多すぎます。後で再試行してください。
429CONCURRENCY_LIMITED未完了のタスクが多すぎます。いずれかが完了するまでお待ちください。
503EXECUTION_UNAVAILABLE現在、このモデルの実行は設定されていません。
429UPSTREAM_RATE_LIMITEDThe model provider is rate limiting chat requests. Retry with backoff; nothing was charged.
502UPSTREAM_ERRORThe model provider failed the chat request. Nothing was charged; retry later.
503PLATFORM_BUDGET_EXCEEDEDThis model is temporarily unavailable. Try again later.
503EXECUTION_TEMPORARILY_UNAVAILABLE一時的に実行できません。同じ Idempotency-Key で再試行してください。
503AUTH_UNAVAILABLE一時的に認証を利用できません。後で再試行してください。
503API_UNAVAILABLE一時的に API を利用できません。後で再試行してください。

API ガイド全文 · OpenAPI 3.1