Lewati ke konten
Buka CastalyKonsol

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.

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

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

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-2.6",
"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 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

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.

Model lama memilih bidang model_name, bingkai pertama/akhir, atau kontrol gerakan berdasarkan alur kerja; durasi tetap dan batas audio mengikuti tabel halaman ini.

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

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-2-6.v1Adaptor: video.kling.legacy.v1@v1Sidik Jari: b53fa35546d2b5028a69146a031a053d852003d673d1b7a334d8b124997101cc

Sumber resmi: Kuaishou Kling

Parameter kontrak

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

Kemampuan yang didukung

  • 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

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