Lewati ke konten
Buka CastalyKonsol

Video

kling-o1API

Gunakan ID model kling-o1 yang tepat melalui perutean video asinkron Modelflare.

Gunakan ID model yang tepat kling-o1. Bidang model harus sama persis dengan halaman ini.

Contoh keluarankling-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.

Permintaan yang menghasilkan sampel ini
{
"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"
}

Gunakan kunci API Modelflare dengan https://modelflare.dev/v1. Titik masuk gateway adalah POST /v1/videos.

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
Terminal windowbash
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"
}'

Simpan ID tugas. Jajak pendapat GET /v1/videos/{task_id} dan unduh dengan GET /v1/videos/{task_id}/content. URL hasil mungkin kedaluwarsa, jadi segera transfer file.

Terminal windowbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Kling menggunakan kolom model_name, prompt, mode, duration, image_list, atau contents / settings khusus keluarga; JSON asli dipertahankan dan diteruskan.

Kling Omni/O1 menggunakan model_name, prompt, dan daftar media. Ikuti batasan resmi setiap model saat menggabungkan image_list, video_list, element_list, multi_shot, dan sound.

Bidang Wajib diisi Catatan
model_name Ya kling-o1
prompt Bersyarat Diperlukan ketika multi-shot dinonaktifkan
mode Tidak std / pro
aspect_ratio Bersyarat 16:9 / 9:16 / 1:1
duration Tidak 3–15 detik (string)
image_list Tidak Referensi bingkai pertama/akhir, pemandangan, atau gaya; Omni/O1 mengizinkan beberapa item dalam batas model
video_list Tidak Pengeditan video atau referensi gaya
element_list Tidak ID elemen Kling; integrasi ini tidak menyediakan manajemen elemen
multi_shot Tidak Aktifkan storyboard multi-shot
sound Tidak Apakah akan menghasilkan suara yang disinkronkan

O1 mendukung 720p/1080p, 3–10 detik, dan referensi gambar/video/elemen. Matikan sound ketika video_list ada; 4k dan multi-shot tidak didukung.

Terminal windowbash
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"
}'

Video referensi, elemen, dan kombinasi multi-shot harus mengikuti batasan halaman ini; matikan sound ketika ada video referensi.

Parameter model yang tidak valid menampilkan 4xx dengan ID permintaan. Tugas asinkron juga bisa gagal masuk setelah pembuatan berhasil; gunakan error_code dan error_message dari respon polling sebagai alasan tugas akhir. Jangan coba lagi permintaan yang sama dengan bentuk JSON yang berbeda.

Halaman ini mencakup pembuatan model Modelflare dan panggilan pengeditan. Pengayaan penelusuran atau peta, pengelolaan suara, dan pengelolaan pustaka elemen merupakan API sumber daya di luar permukaan panggilan model publik ini dan bukan merupakan bidang permintaan yang wajib diisi.

Model ini menggunakan penagihan video per detik. Lihat halaman harga model untuk harga pelanggan saat ini, harga daftar referensi, dan spesifikasi lengkap.

Kontrak media · v1

ID Kontrak: media.kling-o1.v1Adaptor: video.kling.omni.v1@v1Sidik Jari: 64a427a3f22b5fe4674625e1d0b00f331fc9e2fcc37837e604944c682ec00002

Sumber resmi: Kuaishou Kling

Parameter kontrak

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

Kemampuan yang didukung

  • 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

Contoh permintaan terstruktur

text

Maksud

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

Permintaan penyedia

{
  "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

Maksud

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

Permintaan penyedia

{
  "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"
}