All Products
Search
Document Center

:Wan - image-to-video - referensi API frame pertama

Last Updated:Apr 24, 2026

Model Wan image-to-video menghasilkan video yang mulus dari gambar frame pertama dan prompt teks.

Referensi: Panduan pengguna

Catatan

Wan - image-to-video 2.7 yang baru dirilis mendukung first-frame-to-video, first-and-last-frame-to-video, dan kelanjutan video. Kami merekomendasikan penggunaannya sebagai pilihan utama Anda.

Model Wan image-to-video dalam topik ini (wan2.6 dan versi sebelumnya) hanya mendukung first-frame-to-video.

Ketersediaan

Model, URL endpoint, dan Kunci API harus berada di Wilayah yang sama — pemanggilan cross-region akan gagal.

Catatan

Kode contoh dalam topik ini berlaku untuk Wilayah Singapura.

HTTP

Tugas image-to-video memerlukan waktu 1–5 menit. Gunakan pemanggilan asinkron: buat tugas, lalu polling hasilnya.

Langkah 1: Buat tugas

Singapura

POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Virginia

POST https://dashscope-us.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Beijing

POST https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Frankfurt

POST https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis

Ganti WorkspaceId dengan Workspace ID aktual Anda saat melakukan panggilan API.

Catatan
  • Setelah tugas dibuat, gunakan task_id yang dikembalikan untuk menanyakan hasilnya. task_id berlaku selama 24 jam. Jangan membuat tugas duplikat. Sebagai gantinya, gunakan polling untuk mengambil hasilnya.

  • Untuk panduan pemula, lihat Postman.

Parameter permintaan

Narasi multi-shot

Fitur ini hanya didukung oleh model wan2.6.

Aktifkan dengan mengatur "prompt_extend": true dan "shot_type":"multi".

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan2.6-i2v-flash",
    "input": {
        "prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "img_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
        "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3"
    },
    "parameters": {
        "resolution": "720P",
        "prompt_extend": true,
        "duration": 10,
        "shot_type":"multi"
    }
}'

Dubbing otomatis

Fitur ini hanya didukung oleh model wan2.6 dan wan2.5.

Jika Anda tidak memberikan input.audio_url, model secara otomatis menghasilkan musik latar atau efek suara yang sesuai berdasarkan konten video.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan2.5-i2v-preview",
    "input": {
        "prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "img_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true,
        "duration": 10
    }
}'

Menyediakan file audio

Fitur ini hanya didukung oleh model wan2.6 dan wan2.5.

Untuk menentukan musik latar atau narasi suara untuk video Anda, masukkan URL file audio kustom Anda dalam parameter input.audio_url.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan2.5-i2v-preview",
    "input": {
        "prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "img_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png",
        "audio_url": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true,
        "duration": 10
    }
}'

Menghasilkan video tanpa suara

Hanya model-model berikut yang mendukung pembuatan video tanpa suara:

  • wan2.6-i2v-flash: Untuk menghasilkan video tanpa suara, Anda harus secara eksplisit mengatur parameters.audio = false.

  • model wan2.2 dan wan2.1: Video tanpa suara dihasilkan secara default. Tidak diperlukan parameter tambahan.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan2.2-i2v-plus",
    "input": {
        "prompt": "A cat running on the grass",
        "img_url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true
    }
}'

Gunakan prompt negatif

Gunakan parameter negative_prompt untuk mencegah munculnya “flowers” dalam video yang dihasilkan.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis' \
    -H 'X-DashScope-Async: enable' \
    -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
    -H 'Content-Type: application/json' \
    -d '{
    "model": "wan2.2-i2v-plus",
    "input": {
        "prompt": "A cat running on the grass",
        "negative_prompt": "flowers",
        "img_url": "https://cdn.translate.alibaba.com/r/wanx-demo-1.png"
    },
    "parameters": {
        "resolution": "480P",
        "prompt_extend": true
    }
}'
Header

Content-Type string (Wajib)

Tipe konten permintaan. Harus application/json.

Authorization string (Wajib)

Mengautentikasi permintaan dengan Kunci API Model Studio. Contoh: Bearer sk-xxxx.

X-DashScope-Async string (Wajib)

Mengaktifkan pemrosesan asinkron. Permintaan HTTP hanya mendukung panggilan asinkron. Harus enable.

Penting

Jika header permintaan ini tidak ada, kesalahan "current user api does not support synchronous calls" akan dikembalikan.

Body permintaan

model string (Wajib)

Nama model. Periksa harga model.

Contoh: wan2.6-i2v-flash.

input object (Wajib)

Berisi informasi input dasar (misalnya, prompt).

Properti

prompt string (Opsional)

Prompt teks yang menjelaskan konten video dan karakteristik visual yang diinginkan.

Mendukung bahasa Tionghoa dan Inggris (setiap karakter = 1 unit, teks yang melebihi akan dipotong otomatis). Batas panjang berdasarkan model:

  • model wan2.6 dan wan2.5: hingga 1.500 karakter.

  • model wan2.2 dan wan2.1: hingga 800 karakter.

Contoh: Seekor kucing kecil berlari di atas rumput.

Untuk tips prompt, lihat Panduan prompt text-to-video/image-to-video.

negative_prompt string (Opsional)

Konten yang ingin dikecualikan dari video.

Mendukung bahasa Tionghoa dan Inggris. Maksimal 500 karakter. Teks yang melebihi akan dipotong otomatis.

Contoh: low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions.

img_url string (Wajib)

URL atau string Base64 dari gambar frame pertama.

Batasan gambar:

  • Format: JPEG, JPG, PNG (tanpa saluran alfa), BMP, WEBP.

  • Resolusi: Lebar dan tinggi harus antara 240 hingga 8.000 piksel.

  • Ukuran file:

    • model seri wan2.6 dan wan2.5: tidak lebih dari 20 MB.

    • model seri wan2.2 dan wan2.1: tidak lebih dari 10 MB.

Format input yang didukung:

  1. URL publik:

    • HTTP dan HTTPS didukung.

    • Contoh: https://cdn.translate.alibaba.com/r/wanx-demo-1.png.

  2. String gambar yang diencode Base64:

    • Format data: data:{MIME_type};base64,{base64_data}.

    • Contoh: data:image/png;base64,GDU7MtCZzEbTbmRZ...... (disingkat karena panjang).

    • Untuk detailnya, lihat Gambar input.

audio_url string (Opsional)

Model yang didukung: wan2.6 dan wan2.5.

URL file audio. Model menyinkronkan pembuatan video dengan audio ini.

Format input yang didukung:

  1. URL publik:

    • HTTP dan HTTPS didukung.

    • Contoh: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp3.

Batasan audio:

  • Format: wav, mp3.

  • Durasi: 3–30 detik.

  • Ukuran file: Maksimal 15 MB.

  • Penanganan overflow: Audio yang melebihi duration (5 atau 10 detik) akan dipotong menjadi 5 atau 10 detik pertama. Audio yang lebih pendek menyebabkan sisa video menjadi senyap (misalnya, audio 3 detik + video 5 detik = audio 3 detik + 2 detik senyap).

Contoh: https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3.

parameters object (Opsional)

Parameter pemrosesan video (resolusi, durasi, penulisan ulang prompt, watermark).

Properti

resolution string (Opsional)

Penting

Resolusi berdampak langsung pada biaya. Periksa harga model

Tingkat resolusi untuk video yang dihasilkan. Model menskalakan output agar sesuai dengan jumlah piksel tingkat yang dipilih. Rasio aspek mendekati rasio gambar input (img_url). Lihat FAQ.

Nilai default dan opsi tergantung pada parameter model:

  • wan2.6-i2v-flash: Opsi: 720P, 1080P. Default: 1080P.

  • wan2.6-i2v: Opsi: 720P, 1080P. Default: 1080P.

  • wan2.6-i2v-us: Opsi: 720P, 1080P. Default: 1080P.

  • wan2.5-i2v-preview: Opsi: 480P, 720P, 1080P. Default: 1080P.

  • wan2.2-i2v-flash: Opsi: 480P, 720P. Default: 720P.

  • wan2.2-i2v-plus: Opsi: 480P, 1080P. Default: 1080P.

  • wan2.1-i2v-turbo: Opsi: 480P, 720P. Default: 720P.

  • wan2.1-i2v-plus: Opsi: 720P. Default: 720P.

Contoh: 1080P.

duration integer (Opsional)

Penting

Durasi berdampak pada biaya. Periksa harga model

Durasi video dalam detik. Nilai yang valid bervariasi berdasarkan model:

  • wan2.6-i2v-flash: Bilangan bulat dari 2 hingga 15. Default: 5.

  • wan2.6-i2v: Bilangan bulat dari 2 hingga 15. Default: 5.

  • wan2.6-i2v-us: Opsi: 5, 10, 15. Default: 5.

  • wan2.5-i2v-preview: Opsi: 5, 10. Default: 5.

  • wan2.2-i2v-plus: Tetap 5 detik (tidak dapat dikonfigurasi).

  • wan2.2-i2v-flash: Tetap 5 detik (tidak dapat dikonfigurasi).

  • wan2.1-i2v-plus: Tetap 5 detik (tidak dapat dikonfigurasi).

  • wan2.1-i2v-turbo: Opsi: 3, 4, atau 5. Default: 5.

Contoh: 5.

prompt_extend boolean (Opsional)

Apakah akan mengaktifkan penulisan ulang prompt. Saat diaktifkan, LLM menulis ulang prompt input. Ini meningkatkan kualitas generasi untuk prompt yang lebih pendek tetapi memperpanjang waktu pemrosesan.

  • true (default)

  • false

Contoh: true.

shot_type string (Opsional)

Model yang didukung: model wan2.6.

Menentukan apakah video menggunakan satu shot berkelanjutan atau beberapa shot yang berganti-ganti.

Berlaku hanya ketika "prompt_extend": true.

Prioritas: shot_type > prompt. Misalnya, shot_type="single" menghasilkan video single-shot meskipun prompt meminta multi-shot.

Nilai yang valid:

  • single (default)

  • multi

Contoh: single.

Catatan

Gunakan parameter ini untuk mengontrol struktur narasi secara ketat—misalnya, single shot untuk demo produk atau multiple shots untuk film pendek.

audio boolean (Opsional)

Penting

Pengaturan audio berdampak pada biaya (bersuara vs senyap). Periksa harga di Konsol sebelum memanggil.

Model yang didukung: wan2.6-i2v-flash.

Menentukan apakah akan menghasilkan video dengan suara.

Prioritas: audio > audio_url. audio=false menghasilkan video senyap meskipun audio_url disediakan (ditagih dengan tarif senyap).

Nilai yang valid:

  • true (default)

  • false

Contoh: true.

watermark boolean (Opsional)

Menambahkan watermark “AI Generated” di pojok kanan bawah.

  • false (default)

  • true

Contoh: false.

seed integer (Opsional)

Bilangan acak seed. Rentang nilai: [0, 2147483647].

Jika tidak ditentukan, sistem menghasilkan seed acak. Tetapkan seed untuk meningkatkan reproduktibilitas.

Catatan: Seed yang identik tidak menjamin hasil yang identik (model probabilistik).

Contoh: 12345.

Parameter respons

Respons berhasil

Simpan task_id untuk menanyakan status dan hasil tugas.

{
    "output": {
        "task_status": "PENDING",
        "task_id": "0385dc79-5ff8-4d82-bcb6-xxxxxx"
    },
    "request_id": "4909100c-7b5a-9f92-bfe5-xxxxxx"
}

Respons kesalahan

Pembuatan tugas gagal. Lihat Pesan kesalahan.

{
    "code": "InvalidApiKey",
    "message": "No API-key provided.",
    "request_id": "7438d53d-6eb8-4596-8835-xxxxxx"
}

output object

Informasi output tugas.

Properti

task_id string

ID tugas. Berlaku untuk kueri selama 24 jam.

task_status string

Status tugas.

Nilai enumerasi

  • PENDING

  • RUNNING

  • SUCCEEDED

  • FAILED

  • CANCELED

  • UNKNOWN: Tugas tidak ada atau statusnya tidak diketahui.

request_id string

Identifier permintaan unik untuk pelacakan dan troubleshooting.

code string

Kode kesalahan, hanya dikembalikan untuk permintaan yang gagal. Lihat Pesan kesalahan.

message string

Pesan kesalahan terperinci. Hanya dikembalikan untuk permintaan yang gagal. Lihat Pesan kesalahan.

Langkah 2: Tanyakan hasilnya

Singapura

GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id}

Virginia

GET https://dashscope-us.aliyuncs.com/api/v1/tasks/{task_id}

Beijing

GET https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}

Frankfurt

GET https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/api/v1/tasks/{task_id}

Ganti WorkspaceId dengan Workspace ID aktual Anda saat melakukan panggilan API.

Catatan
  • Rekomendasi polling: Pembuatan video memerlukan beberapa menit. Gunakan mekanisme polling dengan interval yang wajar, misalnya 15 detik.

  • Transisi status tugas: PENDING → RUNNING → SUCCEEDED atau FAILED.

  • Tautan hasil: Setelah tugas berhasil, URL video yang berlaku selama 24 jam dikembalikan. Unduh dan simpan video ke penyimpanan permanen, seperti OSS.

  • Validitas task_id: 24 jam. Setelah periode ini, kueri mengembalikan status tugas sebagai UNKNOWN.

Parameter permintaan

Tanyakan hasil tugas

Ganti {task_id} dengan nilai task_id yang dikembalikan oleh panggilan API sebelumnya. task_id berlaku untuk kueri selama 24 jam.

curl -X GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"
Header

Authorization string (Wajib)

Mengautentikasi permintaan dengan Kunci API Model Studio. Contoh: Bearer sk-xxxx.

Parameter jalur URL

task_id string (Wajib)

ID tugas.

Parameter respons

Tugas berhasil

URL video hanya berlaku selama 24 jam, lalu secara otomatis dihapus. Segera simpan video yang dihasilkan.

{
    "request_id": "2ca1c497-f9e0-449d-9a3f-xxxxxx",
    "output": {
        "task_id": "af6efbc0-4bef-4194-8246-xxxxxx",
        "task_status": "SUCCEEDED",
        "submit_time": "2025-09-25 11:07:28.590",
        "scheduled_time": "2025-09-25 11:07:35.349",
        "end_time": "2025-09-25 11:17:11.650",
        "orig_prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "video_url": "https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/xxx.mp4?Expires=xxx"
    },
    "usage": {
        "duration": 10,
        "input_video_duration": 0,
        "output_video_duration": 10,
        "video_count": 1,
        "SR": 720
    }
}

Tugas gagal

Saat tugas gagal, task_status bernilai FAILED dengan kode dan pesan kesalahan. Lihat Pesan kesalahan.

{
    "request_id": "e5d70b02-ebd3-98ce-9fe8-759d7d7b107d",
    "output": {
        "task_id": "86ecf553-d340-4e21-af6e-a0c6a421c010",
        "task_status": "FAILED",
        "code": "InvalidParameter",
        "message": "The size is not match xxxxxx"
    }
}

Kueri tugas kedaluwarsa

task_id berlaku selama 24 jam. Setelah periode ini, kueri mengembalikan kesalahan berikut.

{
    "request_id": "a4de7c32-7057-9f82-8581-xxxxxx",
    "output": {
        "task_id": "502a00b1-19d9-4839-a82f-xxxxxx",
        "task_status": "UNKNOWN"
    }
}

output object

Informasi output tugas.

Properti

task_id string

ID tugas. Berlaku untuk kueri selama 24 jam.

task_status string

Status tugas.

Nilai enumerasi

  • PENDING

  • RUNNING

  • SUCCEEDED

  • FAILED

  • CANCELED

  • UNKNOWN: Tugas tidak ada atau statusnya tidak diketahui.

Transisi status selama polling:

  • PENDING → RUNNING → SUCCEEDED atau FAILED.

  • Status kueri awal biasanya PENDING atau RUNNING.

  • Saat status berubah menjadi SUCCEEDED, respons berisi URL video yang dihasilkan.

  • Jika statusnya FAILED, periksa pesan kesalahan dan coba ulang tugas tersebut.

submit_time string

Waktu saat tugas diajukan. Waktu dalam UTC+8 dan formatnya YYYY-MM-DD HH:mm:ss.SSS.

scheduled_time string

Waktu saat tugas dieksekusi. Waktu dalam UTC+8 dan formatnya YYYY-MM-DD HH:mm:ss.SSS.

end_time string

Waktu saat tugas selesai. Waktu dalam UTC+8 dan formatnya YYYY-MM-DD HH:mm:ss.SSS.

video_url string

URL video yang dihasilkan. Hanya dikembalikan saat task_status bernilai SUCCEEDED.

Berlaku selama 24 jam. Video dalam format MP4 dengan encoding H.264.

orig_prompt string

Prompt input asli, sesuai dengan parameter permintaan prompt.

actual_prompt string

Saat prompt_extend=true, sistem menulis ulang prompt. Bidang ini mengembalikan versi yang dioptimalkan.

  • Jika prompt_extend=false, bidang ini tidak dikembalikan.

  • Catatan: Model wan2.6 tidak pernah mengembalikan bidang ini, terlepas dari nilai prompt_extend.

code string

Kode kesalahan. Hanya dikembalikan untuk permintaan yang gagal. Lihat Pesan kesalahan.

message string

Pesan kesalahan detail. Hanya dikembalikan untuk permintaan yang gagal. Lihat Pesan kesalahan.

usage object

Statistik output. Hanya dihitung untuk hasil yang berhasil.

Properti

Parameter yang dikembalikan oleh model wan2.6

input_video_duration integer

Durasi video input dalam detik. Tetap 0 karena video input tidak didukung.

output_video_duration integer

Hanya dikembalikan untuk model wan2.6.

Durasi video output dalam detik. Sama dengan input.duration.

duration integer

Total durasi video, digunakan untuk penagihan.

Rumus penagihan: duration=input_video_duration+output_video_duration.

SR integer

Hanya dikembalikan untuk model wan2.6. Tingkat resolusi video yang dihasilkan. Contoh: 720.

video_count integer

Jumlah video yang dihasilkan. Tetap 1.

audio boolean

Hanya dikembalikan untuk model wan2.6-i2v-flash. Menunjukkan apakah video output memiliki suara.

Parameter yang dikembalikan oleh model wan2.2 dan wan2.5

duration integer

Durasi video yang dihasilkan dalam detik. Nilai yang valid: 5, 10.

Rumus penagihan: Biaya = Detik video × Harga satuan.

SR integer

Resolusi video yang dihasilkan. Nilai yang valid: 480, 720, 1080.

video_count integer

Jumlah video yang dihasilkan. Tetap 1.

Parameter yang dikembalikan oleh model wan2.1

video_duration integer

Durasi video yang dihasilkan dalam detik. Nilai yang valid: 3, 4, 5.

Rumus penagihan: Biaya = Detik video × Harga satuan.

video_ratio string

Rasio aspek video yang dihasilkan. Tetap standar.

video_count integer

Jumlah video yang dihasilkan. Tetap 1.

request_id string

Identifier permintaan unik untuk pelacakan dan troubleshooting.

SDK DashScope

Nama parameter SDK sebagian besar sesuai dengan API HTTP (struktur mengikuti konvensi bahasa).

Tugas image-to-video memerlukan waktu 1–5 menit. SDK membungkus alur panggilan HTTP asinkron dan mendukung pemanggilan sinkron maupun asinkron.

Waktu pemrosesan aktual tergantung pada panjang antrian dan eksekusi layanan. Tunggu hasilnya dengan sabar.

SDK Python

null

Membutuhkan SDK Python DashScope ≥ 1.25.8. Versi lama mungkin error (“url error, please check url!”) — lihat Instal SDK untuk memperbarui.

Atur base_http_api_url berdasarkan wilayah model:

Singapura

dashscope.base_http_api_url = 'https://dashscope-intl.aliyuncs.com/api/v1'

Virginia

dashscope.base_http_api_url = 'https://dashscope-us.aliyuncs.com/api/v1'

Beijing

dashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'

Frankfurt

dashscope.base_http_api_url = 'https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/api/v1'

Ganti WorkspaceId dengan Workspace ID aktual Anda saat melakukan panggilan API.

Kode contoh

Panggilan sinkron

Panggilan sinkron memblokir hingga selesai. Tiga metode input gambar: URL publik, Base64, jalur file lokal.

Contoh permintaan
import base64
import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import mimetypes
import dashscope

# URL wilayah Singapura. Dapatkan URL: https://www.alibabacloud.com/help/en/model-studio/image-to-video-api-reference
dashscope.base_http_api_url = 'https://dashscope-intl.aliyuncs.com/api/v1'


# Jika Anda belum mengonfigurasi variabel lingkungan, ganti baris berikut dengan Kunci API Model Studio Anda: api_key="sk-xxx"
# Dapatkan Kunci API Anda: https://www.alibabacloud.com/help/zh/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")

# --- Fungsi bantu: Untuk encoding Base64 ---
# Format: data:{MIME_type};base64,{base64_data}
def encode_file(file_path):
    mime_type, _ = mimetypes.guess_type(file_path)
    if not mime_type or not mime_type.startswith("image/"):
        raise ValueError("Format gambar tidak didukung atau tidak dikenali")
    with open(file_path, "rb") as image_file:
        encoded_string = base64.b64encode(image_file.read()).decode('utf-8')
    return f"data:{mime_type};base64,{encoded_string}"

"""
Metode input gambar:
Pilih salah satu dari tiga metode berikut,

1. Gunakan URL publik - Cocok untuk gambar yang dapat diakses publik
2. Gunakan file lokal - Cocok untuk pengembangan dan pengujian lokal
3. Gunakan encoding Base64 - Cocok untuk gambar privat atau skenario yang memerlukan transmisi terenkripsi
"""

# [Metode 1] Gunakan URL gambar yang dapat diakses publik
# Contoh: Gunakan URL gambar publik
img_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"

# [Metode 2] Gunakan file lokal (mendukung jalur absolut dan relatif)
# Persyaratan format: file:// + jalur file
# Contoh (jalur absolut):
# img_url = "file://" + "/path/to/your/img.png"    # Linux/macOS
# img_url = "file://" + "/C:/path/to/your/img.png"  # Windows
# Contoh (jalur relatif):
# img_url = "file://" + "./img.png"                # Relatif terhadap jalur file yang dapat dieksekusi saat ini

# [Metode 3] Gunakan gambar yang diencode Base64
# img_url = encode_file("./img.png")

# Atur URL audio
audio_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3"

def sample_call_i2v():
    # Panggilan sinkron, mengembalikan hasil langsung
    print('mohon tunggu...')
    rsp = VideoSynthesis.call(api_key=api_key,
                              model='wan2.6-i2v-flash',
                              prompt='A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.',
                              img_url=img_url,
                              audio_url=audio_url,
                              resolution="720P",
                              duration=10,
                              prompt_extend=True,
                              watermark=False,
                              negative_prompt="",
                              seed=12345)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print("video_url:", rsp.output.video_url)
    else:
        print('Gagal, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))


if __name__ == '__main__':
    sample_call_i2v()
Contoh respons
video_url berlaku selama 24 jam. Segera unduh.
{
    "status_code": 200,
    "request_id": "2794c7a3-fe8c-4dd4-a1b7-xxxxxx",
    "code": null,
    "message": "",
    "output": {
        "task_id": "c15d5b14-07c4-4af5-b862-xxxxxx",
        "task_status": "SUCCEEDED",
        "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxx.mp4?Expires=xxx",
        "submit_time": "2026-01-22 23:24:46.527",
        "scheduled_time": "2026-01-22 23:24:46.565",
        "end_time": "2026-01-22 23:25:59.978",
        "orig_prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise."
    },
    "usage": {
        "video_count": 1,
        "video_duration": 0,
        "video_ratio": "",
        "duration": 10,
        "input_video_duration": 0,
        "output_video_duration": 10,
        "audio": true,
        "SR": 720
    }
}

Panggilan asinkron

Panggilan asinkron mengembalikan task ID segera. Polling hasilnya atau tunggu hingga selesai.

Contoh permintaan
import os
from http import HTTPStatus
from dashscope import VideoSynthesis
import dashscope

# URL wilayah Singapura. Dapatkan URL: https://www.alibabacloud.com/help/en/model-studio/image-to-video-api-reference
dashscope.base_http_api_url = 'https://dashscope-intl.aliyuncs.com/api/v1'


# Jika Anda belum mengonfigurasi variabel lingkungan, ganti baris berikut dengan Kunci API Model Studio Anda: api_key="sk-xxx"
# Dapatkan Kunci API Anda: https://www.alibabacloud.com/help/zh/model-studio/get-api-key
api_key = os.getenv("DASHSCOPE_API_KEY")

# Gunakan URL gambar yang dapat diakses publik
img_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png"

# Atur URL audio
audio_url = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3"


def sample_async_call_i2v():
    # Panggilan asinkron, mengembalikan task_id
    rsp = VideoSynthesis.async_call(api_key=api_key,
                                    model='wan2.6-i2v-flash',
                                    prompt='A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.',
                                    img_url=img_url,
                                    audio_url=audio_url,
                                    resolution="720P",
                                    duration=10,
                                    prompt_extend=True,
                                    watermark=False,
                                    negative_prompt="",
                                    seed=12345)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print("task_id: %s" % rsp.output.task_id)
    else:
        print('Gagal, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))

    # Dapatkan informasi tugas asinkron
    status = VideoSynthesis.fetch(task=rsp, api_key=api_key)
    if status.status_code == HTTPStatus.OK:
        print(status.output.task_status)
    else:
        print('Gagal, status_code: %s, code: %s, message: %s' %
              (status.status_code, status.code, status.message))

    # Tunggu hingga tugas asinkron selesai
    rsp = VideoSynthesis.wait(task=rsp, api_key=api_key)
    print(rsp)
    if rsp.status_code == HTTPStatus.OK:
        print(rsp.output.video_url)
    else:
        print('Gagal, status_code: %s, code: %s, message: %s' %
              (rsp.status_code, rsp.code, rsp.message))


if __name__ == '__main__':
    sample_async_call_i2v()
Contoh respons

1. Contoh respons untuk pembuatan tugas

{
    "status_code": 200,
    "request_id": "6dc3bf6c-be18-9268-9c27-xxxxxx",
    "code": "",
    "message": "",
    "output": {
        "task_id": "686391d9-7ecf-4290-a8e9-xxxxxx",
        "task_status": "PENDING",
        "video_url": ""
    },
    "usage": null
}

2. Contoh respons untuk menanyakan hasil tugas

video_url berlaku selama 24 jam. Segera unduh.
{
    "status_code": 200,
    "request_id": "2794c7a3-fe8c-4dd4-a1b7-xxxxxx",
    "code": null,
    "message": "",
    "output": {
        "task_id": "c15d5b14-07c4-4af5-b862-xxxxxx",
        "task_status": "SUCCEEDED",
        "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxx.mp4?Expires=xxx",
        "submit_time": "2026-01-22 23:24:46.527",
        "scheduled_time": "2026-01-22 23:24:46.565",
        "end_time": "2026-01-22 23:25:59.978",
        "orig_prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise."
    },
    "usage": {
        "video_count": 1,
        "video_duration": 0,
        "video_ratio": "",
        "duration": 10,
        "input_video_duration": 0,
        "output_video_duration": 10,
        "audio": true,
        "SR": 720
    }
}

SDK Java

null

Membutuhkan SDK Java DashScope ≥ 2.22.6. Versi lama mungkin error (“url error, please check url!”) — lihat Instal SDK untuk memperbarui.

Atur baseHttpApiUrl berdasarkan wilayah model:

Singapura

Constants.baseHttpApiUrl = "https://dashscope-intl.aliyuncs.com/api/v1";

Virginia

Constants.baseHttpApiUrl = "https://dashscope-us.aliyuncs.com/api/v1";

Beijing

Constants.baseHttpApiUrl = "https://dashscope.aliyuncs.com/api/v1";

Frankfurt

Constants.baseHttpApiUrl = "https://{WorkspaceId}.eu-central-1.maas.aliyuncs.com/api/v1";

Ganti WorkspaceId dengan Workspace ID aktual Anda saat melakukan panggilan API.

Kode contoh

Panggilan sinkron

Panggilan sinkron memblokir hingga selesai. Tiga metode input gambar: URL publik, Base64, jalur file lokal.

Contoh permintaan
// Copyright (c) Alibaba, Inc. and its affiliates.

import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesis;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisParam;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisResult;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.utils.JsonUtils;
import com.alibaba.dashscope.utils.Constants;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Base64;
import java.util.HashMap;
import java.util.Map;

 
public class Image2Video {

    static {
        // URL wilayah Singapura. Dapatkan URL: https://www.alibabacloud.com/help/en/model-studio/image-to-video-api-reference
        Constants.baseHttpApiUrl = "https://dashscope-intl.aliyuncs.com/api/v1";
    }

    // Jika Anda belum mengonfigurasi variabel lingkungan, ganti baris berikut dengan Kunci API Model Studio Anda: apiKey="sk-xxx"
    // Dapatkan Kunci API Anda: https://www.alibabacloud.com/help/zh/model-studio/get-api-key
    static String apiKey = System.getenv("DASHSCOPE_API_KEY");
    
    /**
     * Metode input gambar: Pilih salah satu dari tiga berikut
     *
     * 1. Gunakan URL publik - Cocok untuk gambar yang dapat diakses publik
     * 2. Gunakan file lokal - Cocok untuk pengembangan dan pengujian lokal
     * 3. Gunakan encoding Base64 - Cocok untuk gambar privat atau skenario yang memerlukan transmisi terenkripsi
     */

    // [Metode 1] URL publik
    static String imgUrl = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png";

    // [Metode 2] Jalur file lokal (file://+jalur absolut)
    // static String imgUrl = "file://" + "/your/path/to/img.png";    // Linux/macOS
    // static String imgUrl = "file://" + "/C:/your/path/to/img.png";  // Windows

    // [Metode 3] Encoding Base64
    // static String imgUrl = Image2Video.encodeFile("/your/path/to/img.png");
    
    // Atur URL audio
    static String audioUrl = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3";

    public static void image2video() throws ApiException, NoApiKeyException, InputRequiredException {
        // Atur parameter
        Map<String, Object> parameters = new HashMap<>();
        parameters.put("prompt_extend", true);
        parameters.put("watermark", false);
        parameters.put("seed", 12345);

        VideoSynthesis vs = new VideoSynthesis();
        VideoSynthesisParam param =
                VideoSynthesisParam.builder()
                        .apiKey(apiKey)
                        .model("wan2.6-i2v-flash")
                        .prompt("A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.")
                        .imgUrl(imgUrl)
                        .audioUrl(audioUrl)
                        .duration(10)
                        .parameters(parameters)
                        .resolution("720P")
                        .negativePrompt("")
                        .build();
        System.out.println("mohon tunggu...");
        VideoSynthesisResult result = vs.call(param);
        System.out.println(JsonUtils.toJson(result));
    }
    
     /**
     * Encode file menjadi string Base64
     * @param filePath Jalur file
     * @return String Base64 dalam format: data:{MIME_type};base64,{base64_data}
     */
    public static String encodeFile(String filePath) {
        Path path = Paths.get(filePath);
        if (!Files.exists(path)) {
            throw new IllegalArgumentException("File tidak ada: " + filePath);
        }
        // Deteksi tipe MIME
        String mimeType = null;
        try {
            mimeType = Files.probeContentType(path);
        } catch (IOException e) {
            throw new IllegalArgumentException("Tidak dapat mendeteksi tipe file: " + filePath);
        }
        if (mimeType == null || !mimeType.startsWith("image/")) {
            throw new IllegalArgumentException("Format gambar tidak didukung atau tidak dikenali");
        }
        // Baca konten file dan encode
        byte[] fileBytes = null;
        try{
            fileBytes = Files.readAllBytes(path);
        } catch (IOException e) {
            throw new IllegalArgumentException("Tidak dapat membaca konten file: " + filePath);
        }
    
        String encodedString = Base64.getEncoder().encodeToString(fileBytes);
        return "data:" + mimeType + ";base64," + encodedString;
    }
    

    public static void main(String[] args) {
        try {
            image2video();
        } catch (ApiException | NoApiKeyException | InputRequiredException e) {
            System.out.println(e.getMessage());
        }
        System.exit(0);
    }
}
Contoh respons
video_url berlaku selama 24 jam. Segera unduh.
{
    "request_id": "87c091bb-7a3c-4904-8501-xxxxxx",
    "output": {
        "task_id": "413ed6e4-5f3a-4f57-8d58-xxxxxx",
        "task_status": "SUCCEEDED",
        "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxx.mp4?Expires=xxx",
        "orig_prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "submit_time": "2026-01-22 23:25:45.729",
        "scheduled_time": "2026-01-22 23:25:45.771",
        "end_time": "2026-01-22 23:26:44.942"
    },
    "usage": {
        "video_count": 1,
        "duration": 10.0,
        "input_video_duration": 0.0,
        "output_video_duration": 10.0,
        "SR": "720"
    },
    "status_code": 200,
    "code": "",
    "message": ""
}

Panggilan asinkron

Panggilan asinkron mengembalikan task ID segera. Polling hasilnya atau tunggu hingga selesai.

Contoh permintaan
// Copyright (c) Alibaba, Inc. and its affiliates.

import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesis;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisListResult;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisParam;
import com.alibaba.dashscope.aigc.videosynthesis.VideoSynthesisResult;
import com.alibaba.dashscope.exception.ApiException;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.task.AsyncTaskListParam;
import com.alibaba.dashscope.utils.JsonUtils;
import com.alibaba.dashscope.utils.Constants;

import java.util.HashMap;
import java.util.Map;

public class Image2Video {

    static {
        // URL wilayah Singapura. Dapatkan URL: https://www.alibabacloud.com/help/en/model-studio/image-to-video-api-reference
        Constants.baseHttpApiUrl = "https://dashscope-intl.aliyuncs.com/api/v1";
    }

    // Jika Anda belum mengonfigurasi variabel lingkungan, ganti baris berikut dengan Kunci API Model Studio Anda: api_key="sk-xxx"
    // Dapatkan Kunci API Anda: https://www.alibabacloud.com/help/zh/model-studio/get-api-key
    static String apiKey = System.getenv("DASHSCOPE_API_KEY");
    // Atur URL gambar input
    static String imgUrl = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/wpimhv/rap.png";

    // Atur URL audio
    static String audioUrl = "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/ozwpvi/rap.mp3";

    public static void image2video() throws ApiException, NoApiKeyException, InputRequiredException {
        // Atur parameter
        Map<String, Object> parameters = new HashMap<>();
        parameters.put("prompt_extend", true);
        parameters.put("watermark", false);
        parameters.put("seed", 12345);

        VideoSynthesis vs = new VideoSynthesis();
        VideoSynthesisParam param =
                VideoSynthesisParam.builder()
                        .apiKey(apiKey)
                        .model("wan2.6-i2v-flash")
                        .prompt("A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.")
                        .imgUrl(imgUrl)
                        .audioUrl(audioUrl)
                        .duration(10)
                        .parameters(parameters)
                        .resolution("720P")
                        .negativePrompt("")
                        .build();
        // Panggilan asinkron
        VideoSynthesisResult task = vs.asyncCall(param);
        System.out.println(JsonUtils.toJson(task));
        System.out.println("mohon tunggu...");

        // Dapatkan hasil
        VideoSynthesisResult result = vs.wait(task, apiKey);
        System.out.println(JsonUtils.toJson(result));
    }

    // Dapatkan daftar tugas
    public static void listTask() throws ApiException, NoApiKeyException {
        VideoSynthesis is = new VideoSynthesis();
        AsyncTaskListParam param = AsyncTaskListParam.builder().build();
        param.setApiKey(apiKey);
        VideoSynthesisListResult result = is.list(param);
        System.out.println(result);
    }

    // Dapatkan hasil tugas tunggal
    public static void fetchTask(String taskId) throws ApiException, NoApiKeyException {
        VideoSynthesis is = new VideoSynthesis();
        // Jika DASHSCOPE_API_KEY diatur sebagai variabel lingkungan, apiKey bisa null
        VideoSynthesisResult result = is.fetch(taskId, apiKey);
        System.out.println(result.getOutput());
        System.out.println(result.getUsage());
    }

    public static void main(String[] args) {
        try {
            image2video();
        } catch (ApiException | NoApiKeyException | InputRequiredException e) {
            System.out.println(e.getMessage());
        }
        System.exit(0);
    }
}
Contoh respons

1. Contoh respons untuk pembuatan tugas

{
    "request_id": "5dbf9dc5-4f4c-9605-85ea-xxxxxxxx",
    "output": {
        "task_id": "7277e20e-aa01-4709-xxxxxxxx",
        "task_status": "PENDING"
    }
}

2. Contoh respons untuk menanyakan hasil tugas

video_url berlaku selama 24 jam. Segera unduh.
{
    "request_id": "87c091bb-7a3c-4904-8501-xxxxxx",
    "output": {
        "task_id": "413ed6e4-5f3a-4f57-8d58-xxxxxx",
        "task_status": "SUCCEEDED",
        "video_url": "https://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/xxx.mp4?Expires=xxx",
        "orig_prompt": "A scene of urban fantasy art. A dynamic graffiti art character. A boy made of spray paint comes to life from a concrete wall. He raps an English song at high speed while striking a classic, energetic rapper pose. The scene is set under an urban railway bridge at night. The lighting comes from a single street lamp, creating a cinematic atmosphere full of high energy and amazing detail. The audio of the video consists entirely of his rap, with no other dialogue or noise.",
        "submit_time": "2026-01-22 23:25:45.729",
        "scheduled_time": "2026-01-22 23:25:45.771",
        "end_time": "2026-01-22 23:26:44.942"
    },
    "usage": {
        "video_count": 1,
        "duration": 10.0,
        "input_video_duration": 0.0,
        "output_video_duration": 10.0,
        "SR": "720"
    },
    "status_code": 200,
    "code": "",
    "message": ""
}

Batasan

  • Validitas data: task_id dan URL video hanya disimpan selama 24 jam. Setelah kedaluwarsa, tidak dapat ditanyakan atau diunduh.

  • Moderasi konten: Input (prompt, gambar) dan output menjalani pemeriksaan keamanan. Pelanggaran mengembalikan kesalahan (misalnya, “IPInfringementSuspect”, “DataInspectionFailed”). Lihat .

Kode kesalahan

Untuk panggilan dan kesalahan yang gagal, lihat Pesan kesalahan untuk troubleshooting.

FAQ

T: Bagaimana cara menghasilkan video dengan rasio aspek tertentu (misalnya, 3:4)?

J: Rasio aspek output sesuai dengan gambar input (img_url), tetapi rasio pasti (misalnya, 3:4 ketat) tidak dijamin — kemungkinan terjadi penyimpangan kecil.

  • Mengapa terjadi penyimpangan:

    Model menggunakan rasio gambar input sebagai garis dasar, menghitung resolusi valid terdekat berdasarkan piksel target (diatur oleh resolution). Lebar/tinggi harus kelipatan 16, sehingga memerlukan penyesuaian kecil. Rasio output mendekati target (misalnya, 3:4) tetapi tidak tepat.

    • Contoh: Gambar input 750×1000 (rasio aspek 3:4 = 0,75), dengan resolution = "720P" (target ~920.000 piksel) menghasilkan output 816×1104 (rasio aspek ≈ 0,739, ~900.000 piksel).

  • Praktik terbaik:

    • Kontrol input: Gunakan gambar dengan rasio aspek target sebagai frame pertama.

    • Pasca-pemrosesan: Untuk rasio ketat, potong atau tambahkan padding pada video yang dihasilkan dengan alat editing.

T: Bagaimana cara mendapatkan daftar putih nama domain untuk penyimpanan video?

J: Video yang dihasilkan model disimpan di OSS. API mengembalikan URL publik sementara. Untuk mengonfigurasi daftar putih firewall untuk URL unduh ini, perhatikan hal berikut: Penyimpanan dasar dapat berubah secara dinamis. Topik ini tidak menyediakan daftar putih nama domain OSS tetap untuk mencegah masalah akses akibat informasi yang kedaluwarsa. Jika Anda memiliki persyaratan kontrol keamanan, hubungi manajer akun Anda untuk mendapatkan daftar nama domain OSS terbaru.