Zum Inhalt springen
Öffne CastalyKonsole

Video

happyhorse-1.1-i2v API

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

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

Beispielausgabehappyhorse-1.1-i2vPOST /v1/videos5.2s

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

Prompt: One continuous take, no cuts. The braided steam keeps thickening until the ribbons lock into one coral and ultraviolet serpent that uncoils along the ceiling, drops down past the stools and pours out through the open door into the rain, the cook in the orange jacket stepping back to let it pass. The camera holds at counter height, then tracks with the serpent to the doorway and tilts to watch it leave. One hard tungsten bulb overhead stays the only warm source. Real weight and inertia, visible density in the steam, no text.

Anfrage, die dieses Beispiel erstellt hat, wobei die Eingabemedien-URL ersetzt wurde
{
"model": "happyhorse-1.1-i2v",
"prompt": "One continuous take, no cuts. The braided steam keeps thickening until the ribbons lock into one coral and ultraviolet serpent that uncoils along the ceiling, drops down past the stools and pours out through the open door into the rain, the cook in the orange jacket stepping back to let it pass. The camera holds at counter height, then tracks with the serpent to the doorway and tilts to watch it leave. One hard tungsten bulb overhead stays the only warm source. Real weight and inertia, visible density in the steam, 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": "happyhorse-1.1-i2v",
"input": {"prompt": "The cat runs across the grass as the camera follows smoothly.", "media": [{"type": "first_frame", "url": "https://example.com/cat.png"}]},
"parameters": {"resolution": "1080P", "duration": 5, "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"

HappyHorse verwendet input.prompt; Wählen Sie die input.media-Form, die der Modell-ID t2v, i2v oder r2v entspricht.

HappyHorse I2V platziert ein first_frame-Bild in input.media.

Feld Erforderlich Notizen
model Ja happyhorse-1.1-i2v
input.prompt Nein Optionale Bewegungs- und Kamerabeschreibung, bis zu 5.000 nicht-chinesische oder 2.500 chinesische Zeichen
input.media[] Ja Genau ein first_frame; öffentliche URL oder Base64-Daten-URL, unter 20 MB, mindestens 300 Pixel Seiten und Seitenverhältnis 1:2,5–2,5:1
parameters.resolution Nein 720P / 1080P, Standard 1080P
parameters.ratio Nein Nicht unterstützt; Die Ausgabe folgt dem Bildverhältnis des ersten Frames
parameters.duration Nein 3–15 Sekunden, Standard 5
parameters.watermark Nein Ob das HappyHorse-Wasserzeichen hinzugefügt werden soll
parameters.seed Nein Optionaler Startwert von 0 bis 2.147.483.647

I2V verwendet ein first_frame-Bild; Akzeptieren Sie eine öffentliche URL oder Base64-Daten-URL unter 20 MB mit mindestens 300 Pixel Seiten und einem Seitenverhältnis von 1:2,5–2,5:1 und behalten Sie ungefähr das Eingabeverhältnis bei.

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.

Medienvertrag · v1

Vertrags-ID: media.happyhorse-1-1-i2v.v1Adapter: video.happyhorse.v1@v1Fingerabdruck: 01f7b831efe834006a6606efc8aa63b9cf704640b40556d3c3e1f70d0a91a3db

Offizielle Quelle: Alibaba Cloud Model Studio

Vertragsparameter

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

Unterstützte Funktion

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

Beispiel für eine strukturierte Anfrage

reference

Absicht

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

Anbieteranfrage

{
  "duration": 3,
  "image": "https://example.com/reference.png",
  "model": "happyhorse-1.1-i2v",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "resolution": "720p",
  "seconds": "3"
}