Zum Inhalt springen
Öffne CastalyKonsole

Video

wan2.7-i2v API

Verwenden Sie die genaue wan2.7-i2v-Modell-ID über das asynchrone Videorouting von Modelflare.

Verwenden Sie die genaue Modell-ID wan2.7-i2v. Das Modellfeld muss genau mit dieser Seite übereinstimmen.

Beispielausgabewan2.7-i2vPOST /v1/videos5.0s

Parameter: duration=5resolution=1080pratio=16:9Eingabebild

Prompt: One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.

Anfrage, die dieses Beispiel erstellt hat, wobei die Eingabemedien-URL ersetzt wurde
{
"model": "wan2.7-i2v",
"prompt": "One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9",
"image": "https://example.com/input-image.png"
}

Verwenden Sie einen Modelflare-API-Schlüssel mit https://modelflare.dev/v1. Der Gateway-Einstiegspunkt ist POST /v1/videos.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
Terminal-Fensterbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-i2v",
"input": {"prompt": "The camera moves closer as the lanterns begin to glow in time with the music.", "media": [{"type": "first_frame", "url": "https://example.com/first-frame.png"}]},
"parameters": {"resolution": "1080P", "duration": 5, "prompt_extend": false, "watermark": false}
}'

Speichern Sie die Aufgaben-ID. Abfrage GET /v1/videos/{task_id} und Download mit GET /v1/videos/{task_id}/content. Ergebnis-URLs können ablaufen. Übertragen Sie die Datei daher umgehend.

Terminal-Fensterbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Wan verwendet üblicherweise input und parameters; Frame-Guided- und Reference-Media-Modi dürfen nicht gemischt werden.

Wan2.7 I2V verwendet input.prompt und input.media. Befolgen Sie die dokumentierten Kombinationen für erstes/letztes Bild, Fahrton und einen ersten Clip.

Feld Erforderlich Notizen
model Ja wan2.7-i2v
input.prompt Ja Bewegungs- und Szenenbeschreibung
input.media[] Ja first_frame, last_frame, driving_audio oder first_clip
parameters.resolution Nein 720P / 1080P (Standard 1080P)
parameters.duration Nein Gesamtdauer; Enthält den Eingabeclip zur Fortsetzung
parameters.prompt_extend Nein Legen Sie „false“ fest, wenn dieser dedizierte Modellvertrag dies erfordert
parameters.watermark Nein Ob ein Wasserzeichen hinzugefügt werden soll

I2V-Medien müssen einer unterstützten Kombination wie first_frame, first_frame + last_frame, first_frame + driving_audio oder first_clip mit dem dokumentierten optionalen Endrahmen folgen. Jeder Medientyp kommt höchstens einmal vor; Die Ausgabe erfolgt in 720P oder 1080P.

Terminal-Fensterbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-i2v",
"input": {"prompt": "镜头从第一帧推进到最后一帧", "media": [
{"type": "first_frame", "url": "https://example.com/first.png"},
{"type": "last_frame", "url": "https://example.com/last.png"}
]},
"parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false}
}'

Ungültige Modellparameter geben ein 4xx mit einer Anforderungs-ID zurück. Eine asynchrone Aufgabe kann auch nach erfolgreicher Erstellung als fehlgeschlagen gelten. Verwenden Sie error_code und error_message aus der Umfrageantwort als letzten Aufgabengrund. Wiederholen Sie dieselbe Anfrage nicht mit einer anderen JSON-Form.

Auf dieser Seite werden Modelflare-Modellgenerierungs- und -bearbeitungsaufrufe behandelt. Such- oder Kartenanreicherung, Sprachverwaltung und Elementbibliotheksverwaltung sind Ressourcen-APIs außerhalb dieser öffentlichen Modellaufrufoberfläche und keine erforderlichen Anforderungsfelder.

Dieses Modell verwendet eine Videoabrechnung pro Sekunde. Den aktuellen Kundenpreis, den Referenzlistenpreis und die vollständige Spezifikation finden Sie auf der Modellpreisseite.

Modell-ID Unterschied
wan2.7-i2v Das auf dieser Seite dokumentierte Modell.
Medienvertrag · v1

Vertrags-ID: media.wan2-7-i2v.v1Adapter: video.wan.i2v.v1@v1Fingerabdruck: f88d7c8cb3fd7273312b35a66e10fc485ceaa6e2848487aa73b4819fff587413

Offizielle Quelle: Alibaba Cloud Model Studio

Vertragsparameter

AbsichtsfeldSteuerelementOptionen
resolutionselect720p / 1080p
durationselect2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

Unterstützte Funktion

  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  • required_assets · reference_asset_ids
  • max_assets · reference_asset_ids · 3
  • prompt_optional_with_reference · prompt

Beispiel für eine strukturierte Anfrage

reference

Absicht

{
  "duration": 2,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "reference_asset_ids": [
    "asset_example"
  ],
  "resolution": "720p"
}

Anbieteranfrage

{
  "input": {
    "media": [
      {
        "type": "first_frame",
        "url": "https://example.com/reference.png"
      }
    ],
    "prompt": "A red paper kite over a quiet harbour at dusk."
  },
  "model": "wan2.7-i2v",
  "parameters": {
    "duration": 2,
    "resolution": "720P"
  }
}