Zum Inhalt springen
Öffne CastalyKonsole

Video

kling-2.6 API

Verwenden Sie die genaue kling-2.6-Modell-ID über das asynchrone Videorouting von Modelflare.

Verwenden Sie die genaue Modell-ID kling-2.6. Das Modellfeld muss genau mit dieser Seite übereinstimmen.

Beispielausgabekling-2.6POST /v1/videos5.0s

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

Prompt: One continuous take, no cuts. An automatic car wash bay, brushes stopped mid-turn, foam sliding down the glass. A figure in a translucent PVC raincoat steps into the bay and the foam stops being foam: it sets into iridescent shells that peel off the car and the walls and drift up around the coat, each one catching a different colour. The camera pushes in slowly through the bay and rotates around the figure as the shells rise. One hard magenta wash light from the far end, cold blue daylight at the entrance. Real weight and inertia, soap and water still running, no text.

Anfrage, die dieses Beispiel erstellt hat
{
"model": "kling-2.6",
"prompt": "One continuous take, no cuts. An automatic car wash bay, brushes stopped mid-turn, foam sliding down the glass. A figure in a translucent PVC raincoat steps into the bay and the foam stops being foam: it sets into iridescent shells that peel off the car and the walls and drift up around the coat, each one catching a different colour. The camera pushes in slowly through the bay and rotates around the figure as the shells rise. One hard magenta wash light from the far end, cold blue daylight at the entrance. Real weight and inertia, soap and water still running, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

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_name": "kling-2.6",
"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot",
"duration": "5", "mode": "std"
}'

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"

Kling verwendet familienspezifische model_name-, prompt-, mode-, duration-, image_list- oder contents/settings-Felder; nativer JSON bleibt erhalten und wird weitergeleitet.

Kling Legacy verwendet model_name mit den Anforderungsstrukturen text2video / image2video. Informationen zu Modus, Auflösung und Audiospuren finden Sie auf der offiziellen Seite und der Preisseite des Modells.

Feld Erforderlich Notizen
model_name Ja kling-2.6
prompt Bedingt Erforderlich für Text-zu-Video; Kombinieren Sie es mit Bildern für Bild-zu-Video
image Bedingt Bild-URL des ersten Frames oder Base64
image_tail Nein Optionales Endbildbild
video_url Bedingt Referenzvideo zur Kling 3.0-Bewegungssteuerung
image_list Nein Bilderliste für Omni/O1 und multimodale Workflows
negative_prompt Nein Negative Aufforderung
mode Nein std / pro / 4k (modellabhängig)
duration Nein 5 / 10(字符串)
multi_shot Nein Aktivieren Sie Multi-Shot-Storyboarding
sound Nein Erzeugt synchronisierten Sound, sofern unterstützt
camera_control Nein Kamerasteuerung, sofern unterstützt

Kling 2.6 verwendet die Legacy-API mit festen 5/10-Sekunden-Dauern, 720p/1080p, 16:9/9:16/1:1, Bild-zu-Video, nativem Audio und Bewegungssteuerung; sound akzeptiert on/off.

Ältere Modelle wählen je nach Workflow model_name, erstes/Endbild oder Bewegungssteuerungsfelder aus; Feste Dauer und Audiolimits folgen der Tabelle auf dieser Seite.

Terminal-Fensterbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-2.6", "prompt": "一只狗在海边奔跑",
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "on"
}'

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.kling-2-6.v1Adapter: video.kling.legacy.v1@v1Fingerabdruck: b53fa35546d2b5028a69146a031a053d852003d673d1b7a334d8b124997101cc

Offizielle Quelle: Kuaishou Kling

Vertragsparameter

AbsichtsfeldSteuerelementOptionen
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect5 / 10
audioswitch—

Unterstützte Funktion

  • allowed_values · ratio · 16:9, 9:16, 1:1
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 5, 10
  • max_assets · reference_asset_ids · 2

Beispiel für eine strukturierte Anfrage

text

Absicht

{
  "audio": false,
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

Anbieteranfrage

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "mode": "std",
  "model_name": "kling-2.6",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}

reference

Absicht

{
  "audio": false,
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

Anbieteranfrage

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "image": "https://example.com/reference.png",
  "mode": "std",
  "model_name": "kling-2.6",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}