Video
wan2.7-r2vAPI
Gunakan ID model wan2.7-r2v yang tepat melalui perutean video asinkron Modelflare.
Gunakan ID model yang tepat wan2.7-r2v. Bidang model harus sama persis dengan halaman ini.
Parameter: duration=5resolution=1080Pratio=16:9Gambar referensi
Prompt: One continuous take, no cuts. Keep the glass flowers from the reference exactly as they are and carry them into a new place: a wide city crossing at night in the rain. The whole bed of glass blooms now grows straight out of the wet asphalt across the junction, ringing as the rain strikes them, headlights firing caustics along the road. The camera starts at kerb height among the stems, moves forward through them and rises to look down the length of the crossing. One hard pink key from a shopfront on the left, cold blue signals behind. Real weight and inertia, glass and water, no text.
{ "model": "wan2.7-r2v", "input": { "prompt": "One continuous take, no cuts. Keep the glass flowers from the reference exactly as they are and carry them into a new place: a wide city crossing at night in the rain. The whole bed of glass blooms now grows straight out of the wet asphalt across the junction, ringing as the rain strikes them, headlights firing caustics along the road. The camera starts at kerb height among the stems, moves forward through them and rises to look down the length of the crossing. One hard pink key from a shopfront on the left, cold blue signals behind. Real weight and inertia, glass and water, no text.", "media": [ { "type": "reference_image", "url": "https://example.com/input-image.png" } ] }, "parameters": { "duration": 5, "resolution": "1080P", "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": "wan2.7-r2v", "input": {"prompt": "The subject in Image 1 walks through the street from Video 1.", "media": [{"type": "reference_image", "url": "https://example.com/reference.png"}, {"type": "reference_video", "url": "https://example.com/reference.mp4"}]}, "parameters": {"resolution": "1080P", "ratio": "16:9", "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 R2V menggunakan media reference_image / reference_video dan dapat memasang reference_voice. Jangan gabungkan alur kerja ini dengan peran first_frame / last_frame.
| Bidang | Wajib diisi | Catatan |
|---|---|---|
model |
Ya | wan2.7-r2v |
input.prompt |
Ya | Jelaskan adegan dan media referensi menggunakan sintaksis yang terdokumentasi |
input.media[] |
Ya | Setidaknya satu reference_image atau reference_video |
input.media[].reference_voice |
Tidak | URL WAV/MP3 publik untuk karakteristik suara |
parameters.resolution |
Tidak | 720P / 1080P (standar 1080P) |
parameters.ratio |
Tidak | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (diabaikan bila ada first_frame) |
parameters.duration |
Tidak | Gunakan batas durasi yang lebih pendek ketika ada video referensi |
parameters.prompt_extend |
Tidak | Tetapkan salah ketika kontrak model khusus ini memerlukannya |
parameters.watermark |
Tidak | Apakah akan menambahkan tanda air |
parameters.seed |
Tidak | Benih acak opsional |
Batas masukan dan keluaran
Section titled “Batas masukan dan keluaran”R2V memerlukan setidaknya satu reference_image atau reference_video, dengan maksimal lima gambar/video referensi digabungkan. Satu first_frame dan reference_voice dapat dipasang; batas durasinya lebih pendek bila ada video referensi.
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-r2v", "input": {"prompt": "让图像主体沿视频动作自然移动", "media": [ {"type": "reference_image", "url": "https://example.com/subject.png"}, {"type": "reference_video", "url": "https://example.com/motion.mp4"} ]}, "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-r2v |
Model didokumentasikan di halaman ini. |
Kontrak media · v1
Sumber resmi: Alibaba Cloud Model Studio
Parameter kontrak
| Bidang maksud | Kontrol | Pilihan |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 |
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·ratio· 16:9, 9:16, 1:1, 4:3, 3:4allowed_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· 6
Contoh permintaan terstruktur
reference
Maksud
{
"duration": 2,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"reference_asset_ids": [
"asset_example"
],
"resolution": "720p"
}Permintaan penyedia
{
"input": {
"media": [
{
"type": "reference_image",
"url": "https://example.com/reference.png"
}
],
"prompt": "A red paper kite over a quiet harbour at dusk."
},
"model": "wan2.7-r2v",
"parameters": {
"duration": 2,
"resolution": "720P"
}
}