Lewati ke konten
Buka CastalyKonsol

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.

Contoh keluaranwan2.7-i2vPOST /v1/videos5.0s

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.

Permintaan yang menghasilkan sampel ini, dengan URL media masukan diganti
{
"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"
}

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

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"

Wan biasanya menggunakan input dan parameters; mode panduan bingkai dan media referensi tidak boleh dicampur.

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

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.

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

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.

ID Model Perbedaan
wan2.7-i2v Model didokumentasikan di halaman ini.
Kontrak media · v1

ID Kontrak: media.wan2-7-i2v.v1Adaptor: video.wan.i2v.v1@v1Sidik Jari: f88d7c8cb3fd7273312b35a66e10fc485ceaa6e2848487aa73b4819fff587413

Sumber resmi: Alibaba Cloud Model Studio

Parameter kontrak

Bidang maksudKontrolPilihan
resolutionselect720p / 1080p
durationselect2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15

Kemampuan yang didukung

  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
  • required_assets · reference_asset_ids
  • max_assets · reference_asset_ids · 3
  • prompt_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"
  }
}