Zum Inhalt springen
Öffne CastalyKonsole

Video

kling-o1 API

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

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

Beispielausgabekling-o1POST /v1/videos5.0s

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

Prompt: One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, no text.

Anfrage, die dieses Beispiel erstellt hat
{
"model": "kling-o1",
"prompt": "One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, 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-o1",
"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 Omni/O1 verwendet model_name, prompt und Medienlisten. Befolgen Sie die offiziellen Einschränkungen jedes Modells, wenn Sie image_list, video_list, element_list, multi_shot und sound kombinieren.

Feld Erforderlich Notizen
model_name Ja kling-o1
prompt Bedingt Erforderlich, wenn Mehrfachaufnahme deaktiviert ist
mode Nein std / pro
aspect_ratio Bedingt 16:9 / 9:16 / 1:1
duration Nein 3–15 Sekunden (Saite)
image_list Nein Referenzen zum ersten/Endbild, zur Szene oder zum Stil; Omni/O1 erlaubt mehrere Artikel innerhalb der Modellgrenzen
video_list Nein Videobearbeitungs- oder Stilreferenzen
element_list Nein Kling-Element-IDs; Diese Integration bietet keine Elementverwaltung
multi_shot Nein Aktivieren Sie Multi-Shot-Storyboarding
sound Nein Ob synchronisierter Ton erzeugt werden soll

O1 unterstützt 720p/1080p, 3–10 Sekunden und Bild-/Video-/Elementreferenzen. Schalten Sie sound aus, wenn video_list vorhanden ist; 4k und Multi-Shot werden nicht unterstützt.

Terminal-Fensterbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-o1",
"prompt": "让图 1 中的人物在雨中向镜头挥手",
"image_list": [{"image_url": "https://example.com/character.png"}],
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off"
}'

Referenzvideos, Elemente und Multi-Shot-Kombinationen müssen den Einschränkungen dieser Seite entsprechen; Schalten Sie sound aus, wenn ein Referenzvideo vorhanden ist.

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-o1.v1Adapter: video.kling.omni.v1@v1Fingerabdruck: 64a427a3f22b5fe4674625e1d0b00f331fc9e2fcc37837e604944c682ec00002

Offizielle Quelle: Kuaishou Kling

Vertragsparameter

AbsichtsfeldSteuerelementOptionen
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect3 / 5 / 8 / 10
audioswitch—

Unterstützte Funktion

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

Beispiel für eine strukturierte Anfrage

text

Absicht

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

Anbieteranfrage

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

reference

Absicht

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

Anbieteranfrage

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "image_list": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}