Lewati ke konten
Buka CastalyKonsol

Video

wan2.7-t2vAPI

Gunakan ID model wan2.7-t2v yang tepat melalui perutean video asinkron Modelflare.

Gunakan ID model yang tepat wan2.7-t2v. Bidang model harus sama persis dengan halaman ini.

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

Parameter: duration=5resolution=1080pratio=16:9

Prompt: One continuous take, no cuts. A glasshouse at night, rows of plants and misted panes. A figure in an emerald latex suit presses one palm flat against the glass; every drop of condensation on that wall begins running upward instead of down, gathering as it goes until the whole pane is a moving constellation of green and gold points that spreads to the roof panels overhead. The camera starts on the hand, pulls back through the planting and cranes up to take in the whole roof. One hard warm key from a work lamp on the floor, cold moonlight outside. Real weight and inertia, water surface tension on glass, no text.

Permintaan yang menghasilkan sampel ini
{
"model": "wan2.7-t2v",
"prompt": "One continuous take, no cuts. A glasshouse at night, rows of plants and misted panes. A figure in an emerald latex suit presses one palm flat against the glass; every drop of condensation on that wall begins running upward instead of down, gathering as it goes until the whole pane is a moving constellation of green and gold points that spreads to the roof panels overhead. The camera starts on the hand, pulls back through the planting and cranes up to take in the whole roof. One hard warm key from a work lamp on the floor, cold moonlight outside. Real weight and inertia, water surface tension on glass, 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": "wan2.7-t2v",
"input": {"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot"},
"parameters": {"resolution": "1080P", "duration": 5, "prompt_extend": 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 T2V berpusat pada input.prompt dan secara opsional menerima input.audio_url. Jelaskan perubahan pengambilan gambar pada prompt; jangan kirim shot_type.

Bidang Wajib diisi Catatan
model Ya wan2.7-t2v
input.prompt Ya Gunakan batas yang didokumentasikan di halaman resmi
input.negative_prompt Tidak Perintah negatif
input.audio_url Tidak WAV/MP3 Publik; hilangkan untuk membiarkan model menghasilkan audio
parameters.resolution Tidak 720P / 1080P (standar 1080P)
parameters.ratio Tidak 16:9 / 9:16 / 1:1 / 4:3 / 3:4
parameters.duration Tidak Durasi video dalam hitungan detik
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

T2V menghasilkan 720P atau 1080P selama 2–15 detik. Hilangkan input.audio_url untuk menghasilkan audio yang disinkronkan; WAV/MP3 yang disediakan dipangkas atau diheningkan agar sesuai dengan durasi yang diminta. Jelaskan pengaturan waktu multi-shot pada prompt dan jangan kirim shot_type.

Terminal windowbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.7-t2v",
"input": {"prompt": "从文字生成一段稳定的电影镜头"},
"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-t2v Model didokumentasikan di halaman ini.
Kontrak media · v1

ID Kontrak: media.wan2-7-t2v.v1Adaptor: video.wan.t2v.v1@v1Sidik Jari: f34573d56f54ab22dc75fd5fa803c398049322d1c9d4cb4daddfdb1b14bffaaf

Sumber resmi: Alibaba Cloud Model Studio

Parameter kontrak

Bidang maksudKontrolPilihan
ratioselect16:9 / 9:16 / 1:1 / 4:3 / 3:4
resolutionselect720p / 1080p
durationselect2 / 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:4
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

Contoh permintaan terstruktur

text

Maksud

{
  "duration": 2,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

Permintaan penyedia

{
  "duration": 2,
  "model": "wan2.7-t2v",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p",
  "seconds": "2"
}