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.
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.
{ "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"}Authentifizierung und Endpunkt
Abschnitt betitelt „Authentifizierung und Endpunkt“Verwenden Sie einen Modelflare-API-Schlüssel mit https://modelflare.dev/v1. Der Gateway-Einstiegspunkt ist POST /v1/videos.
Authorization: Bearer YOUR_MODELFLARE_API_KEYErstellen Sie eine Aufgabe
Abschnitt betitelt „Erstellen Sie eine Aufgabe“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} }'Umfrage und Download
Abschnitt betitelt „Umfrage und Download“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.
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"Notizen anfordern
Abschnitt betitelt „Notizen anfordern“Wan verwendet üblicherweise input und parameters; Frame-Guided- und Reference-Media-Modi dürfen nicht gemischt werden.
Parameter anfordern
Abschnitt betitelt „Parameter anfordern“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 |
Eingabe- und Ausgabegrenzen
Abschnitt betitelt „Eingabe- und Ausgabegrenzen“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.
Dokumentierte Workflow-Beispiele
Abschnitt betitelt „Dokumentierte Workflow-Beispiele“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} }'Fehler und fehlgeschlagene Aufgaben
Abschnitt betitelt „Fehler und fehlgeschlagene Aufgaben“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.
Unterstützter Bereich
Abschnitt betitelt „Unterstützter Bereich“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.
Preise und Abrechnung
Abschnitt betitelt „Preise und Abrechnung“Dieses Modell verwendet eine Videoabrechnung pro Sekunde. Den aktuellen Kundenpreis, den Referenzlistenpreis und die vollständige Spezifikation finden Sie auf der Modellpreisseite.
Varianten
Abschnitt betitelt „Varianten“| Modell-ID | Unterschied |
|---|---|
wan2.7-i2v |
Das auf dieser Seite dokumentierte Modell. |
Medienvertrag · v1
Offizielle Quelle: Alibaba Cloud Model Studio
Vertragsparameter
| Absichtsfeld | Steuerelement | Optionen |
|---|---|---|
resolution | select | 720p / 1080p |
duration | select | 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
Unterstützte Funktion
allowed_values·resolution· 720p, 1080pallowed_values·duration· 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_assets·reference_asset_ids· 3prompt_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"
}
}