Video
kling-2.6API
Gunakan ID model kling-2.6 yang tepat melalui perutean video asinkron Modelflare.
Gunakan ID model yang tepat kling-2.6. Bidang model harus sama persis dengan halaman ini.
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.
{ "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"}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-2.6", "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 Legacy menggunakan model_name dengan struktur permintaan text2video / image2video. Periksa halaman resmi model dan halaman harga untuk mode, resolusi, dan jalur audio.
| Bidang | Wajib diisi | Catatan |
|---|---|---|
model_name |
Ya | kling-2.6 |
prompt |
Bersyarat | Diperlukan untuk teks-ke-video; digabungkan dengan gambar untuk gambar-ke-video |
image |
Bersyarat | URL gambar bingkai pertama atau Base64 |
image_tail |
Tidak | Gambar bingkai akhir opsional |
video_url |
Bersyarat | Video referensi untuk kontrol gerak Kling 3.0 |
image_list |
Tidak | Daftar gambar untuk alur kerja Omni/O1 dan multimodal |
negative_prompt |
Tidak | Perintah negatif |
mode |
Tidak | std / pro / 4k (tergantung model) |
duration |
Tidak | 5 / 10(字符串) |
multi_shot |
Tidak | Aktifkan storyboard multi-shot |
sound |
Tidak | Menghasilkan suara tersinkronisasi jika didukung |
camera_control |
Tidak | Kontrol kamera jika didukung |
Batas masukan dan keluaran
Section titled “Batas masukan dan keluaran”Kling 2.6 menggunakan API Lama dengan durasi tetap 5/10 detik, 720p/1080p, 16:9/9:16/1:1, gambar-ke-video, audio asli, dan kontrol gerakan; sound menerima on/off.
Contoh alur kerja yang terdokumentasi
Section titled “Contoh alur kerja yang terdokumentasi”Model lama memilih bidang model_name, bingkai pertama/akhir, atau kontrol gerakan berdasarkan alur kerja; durasi tetap dan batas audio mengikuti tabel halaman ini.
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" }'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 | 5 / 10 |
audio | switch | — |
Kemampuan yang didukung
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080pallowed_values·duration· 5, 10max_assets·reference_asset_ids· 2
Contoh permintaan terstruktur
text
Maksud
{
"audio": false,
"duration": 5,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}Permintaan penyedia
{
"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
Maksud
{
"audio": false,
"duration": 5,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}Permintaan penyedia
{
"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"
}