Zum Inhalt springen
Öffne CastalyKonsole

Video

happyhorse-1.1-r2v API

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

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

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

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

Prompt: One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, no text.

Anfrage, die dieses Beispiel erstellt hat, wobei die Eingabemedien-URL ersetzt wurde
{
"model": "happyhorse-1.1-r2v",
"prompt": "One continuous take, no cuts. Keep the woman in the crimson satin coat and the peeling carpet ribbons from the reference and move the event outdoors: she walks out of a revolving door onto a wet plaza and the patterned ribbons keep tearing up behind her, now lifting off the paving stones and streaming out across the square in a long coloured wake. The camera tracks backward ahead of her at waist height and cranes up as the wake spreads. One hard green sign light above the door, warm street lamps across the plaza. Real weight and inertia, satin and wet stone, 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-r2v",
"input": {"prompt": "The person in [Image 1] picks up [Image 2].", "media": [{"type": "reference_image", "url": "https://example.com/person.jpg"}, {"type": "reference_image", "url": "https://example.com/object.jpg"}]},
"parameters": {"resolution": "1080P", "ratio": "16:9", "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 R2V platziert 1–9 reference_image-Elemente in input.media und referenziert sie in der Reihenfolge der Eingabeaufforderung.

Feld Erforderlich Notizen
model Ja happyhorse-1.1-r2v
input.prompt Ja Textbeschreibung oder Referenzanweisungen, bis zu 5.000 nicht-chinesische oder 2.500 chinesische Zeichen
input.media[] Ja 1–9 reference_image Elemente; öffentliche URL oder Base64, unter 20 MB, mindestens 400 Pixel kurze Seite
parameters.resolution Nein 720P / 1080P, Standard 1080P
parameters.ratio Nein 16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 9:21 / 21:9, Standard 16:9
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

R2V verwendet 1–9 reference_image-Elemente und bezeichnet sie in prompter Reihenfolge als Bild 1, Bild 2 usw. Eingabeaufforderungen sind auf 5.000 nicht-chinesische oder 2.500 chinesische Zeichen begrenzt; Die Bilder sind weniger als 20 MB groß und haben eine kurze Seite von mindestens 400 Pixeln.

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-r2v.v1Adapter: video.happyhorse.v1@v1Fingerabdruck: 080ba09723851efe1ae578055ceca7299f987e1fe2602d9e554e47a8431ec35a

Offizielle Quelle: Alibaba Cloud Model Studio

Vertragsparameter

AbsichtsfeldSteuerelementOptionen
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4 / 4:5 / 5:4 / 21:9 / 9:21
resolutionselect720p / 1080p
durationselect3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

Unterstützte Funktion

  • allowed_values · ratio · 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 21:9, 9:21
  • 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 · 9

Beispiel für eine strukturierte Anfrage

reference

Absicht

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

Anbieteranfrage

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