Video
kling-2.5-turboAPI
Gunakan ID model kling-2.5-turbo yang tepat melalui perutean video asinkron Modelflare.
Gunakan ID model yang tepat kling-2.5-turbo. Bidang model harus sama persis dengan halaman ini.
Parameter: duration=5resolution=1080pratio=16:9
Prompt: One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, no text.
{ "model": "kling-2.5-turbo", "prompt": "One continuous take, no cuts. A night market grill under plastic awnings, skewers over coals. A cook in a lacquer-red jacket fans the fire once and the sparks refuse to die: they climb, gather and turn into a flock of small orange birds that wheels above the stalls and pours down the length of the street. The camera starts tight on the coals, pulls back and rises with the flock over the awnings. One hard warm key from the grill itself, cold blue street beyond. Real weight and inertia, smoke and heat shimmer, 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.5-turbo", "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.5-turbo |
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.5 Turbo menggunakan API Lama dengan durasi tetap 5/10 detik dan 720p/1080p. Ini mendukung teks-ke-video dan gambar-ke-video bingkai pertama tunggal, tetapi tidak mendukung audio asli, suara, multi-shot, kuas gerak, atau kontrol kamera.
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.5-turbo", "prompt": "一只狗在海边奔跑", "duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off" }'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 |
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
{
"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.5-turbo",
"prompt": "A red paper kite over a quiet harbour at dusk."
}reference
Maksud
{
"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.5-turbo",
"prompt": "A red paper kite over a quiet harbour at dusk."
}