Video
wan2.7-i2vAPI
Gunakan ID model wan2.7-i2v yang tepat melalui perutean video asinkron Modelflare.
Gunakan ID model yang tepat wan2.7-i2v. Bidang model harus sama persis dengan halaman ini.
Parameter: duration=5resolution=1080pratio=16:9Gambar masukan
Prompt: One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.
{ "model": "wan2.7-i2v", "prompt": "One continuous take, no cuts. The ribbon of film keeps unwinding and speeds up until every frame is lit, tightening into a neon helix that lifts off the deck and climbs past the parapet into the dusk sky, the woman in the cobalt coat turning to follow it up. The camera starts low behind her, is pushed back as the helix rises, then cranes up over the parapet and looks along the coil toward the city. One hard magenta key stays raking across the deck. Real weight and inertia, paper and emulsion catching the light, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9", "image": "https://example.com/input-image.png"}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": "wan2.7-i2v", "input": {"prompt": "The camera moves closer as the lanterns begin to glow in time with the music.", "media": [{"type": "first_frame", "url": "https://example.com/first-frame.png"}]}, "parameters": {"resolution": "1080P", "duration": 5, "prompt_extend": false, "watermark": false} }'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”Wan biasanya menggunakan input dan parameters; mode panduan bingkai dan media referensi tidak boleh dicampur.
Parameter permintaan
Section titled “Parameter permintaan”Wan2.7 I2V menggunakan input.prompt dan input.media. Ikuti kombinasi yang terdokumentasi untuk frame pertama/terakhir, audio penggerak, dan klip awal.
| Bidang | Wajib diisi | Catatan |
|---|---|---|
model |
Ya | wan2.7-i2v |
input.prompt |
Ya | Deskripsi gerak dan pemandangan |
input.media[] |
Ya | first_frame, last_frame, driving_audio, atau first_clip |
parameters.resolution |
Tidak | 720P / 1080P (standar 1080P) |
parameters.duration |
Tidak | Total durasi; termasuk klip masukan untuk kelanjutan |
parameters.prompt_extend |
Tidak | Tetapkan salah ketika kontrak model khusus ini memerlukannya |
parameters.watermark |
Tidak | Apakah akan menambahkan tanda air |
Batas masukan dan keluaran
Section titled “Batas masukan dan keluaran”Media I2V harus mengikuti kombinasi yang didukung seperti first_frame, first_frame + last_frame, first_frame + driving_audio, atau first_clip dengan bingkai akhir opsional yang didokumentasikan. Setiap jenis media muncul paling banyak satu kali; keluarannya adalah 720P atau 1080P.
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": "wan2.7-i2v", "input": {"prompt": "镜头从第一帧推进到最后一帧", "media": [ {"type": "first_frame", "url": "https://example.com/first.png"}, {"type": "last_frame", "url": "https://example.com/last.png"} ]}, "parameters": {"resolution": "1080P", "duration": 8, "prompt_extend": false} }'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.
Varian
Section titled “Varian”| ID Model | Perbedaan |
|---|---|
wan2.7-i2v |
Model didokumentasikan di halaman ini. |
Kontrak media · v1
Sumber resmi: Alibaba Cloud Model Studio
Parameter kontrak
| Bidang maksud | Kontrol | Pilihan |
|---|---|---|
resolution | select | 720p / 1080p |
duration | select | 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 |
Kemampuan yang didukung
allowed_values·resolution· 720p, 1080pallowed_values·duration· 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15required_assets·reference_asset_idsmax_assets·reference_asset_ids· 3prompt_optional_with_reference·prompt
Contoh permintaan terstruktur
reference
Maksud
{
"duration": 2,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}Permintaan penyedia
{
"input": {
"media": [
{
"type": "first_frame",
"url": "https://example.com/reference.png"
}
],
"prompt": "A red paper kite over a quiet harbour at dusk."
},
"model": "wan2.7-i2v",
"parameters": {
"duration": 2,
"resolution": "720P"
}
}