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.
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.
{ "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"}Otentikasi dan titik akhir
Section titled “Otentikasi dan titik akhir”Gunakan kunci API Modelflare dengan https://modelflare.dev/v1. Titik masuk gateway adalah POST /v1/videos.
Authorization: Bearer YOUR_MODELFLARE_API_KEYBuat tugas
Section titled “Buat tugas”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" }'Poll and download
Section titled “Poll and download”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.
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"Minta catatan
Section titled “Minta catatan”Kling menggunakan kolom model_name, prompt, mode, duration, image_list, atau contents / settings khusus keluarga; JSON asli dipertahankan dan diteruskan.
Parameter permintaan
Section titled “Parameter permintaan”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 |
Batas masukan dan keluaran
Section titled “Batas masukan dan keluaran”O1 mendukung 720p/1080p, 3–10 detik, dan referensi gambar/video/elemen. Matikan sound ketika video_list ada; 4k dan multi-shot tidak didukung.
Contoh alur kerja yang terdokumentasi
Section titled “Contoh alur kerja yang terdokumentasi”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.
Kesalahan dan tugas yang gagal
Section titled “Kesalahan dan tugas yang gagal”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.
Cakupan yang didukung
Section titled “Cakupan yang didukung”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.
Pricing and billing
Section titled “Pricing and billing”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
Sumber resmi: Kuaishou Kling
Parameter kontrak
| Bidang maksud | Kontrol | Pilihan |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 |
resolution | select | 720p / 1080p |
duration | select | 3 / 5 / 8 / 10 |
audio | switch | — |
Kemampuan yang didukung
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080pallowed_values·duration· 3, 5, 8, 10max_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"
}