const payload = {
"model": "wan3.0-video-prime",
"input": {
"prompt": "Extend the video: the paper boat keeps floating forward and drifts out of frame.",
"media": [
{
"type": "reference_video",
"url": "https://your-cdn.example.com/source.mp4"
}
]
},
"parameters": {
"resolution": "720P",
"ratio": "adaptive",
"duration": 5
}
};
const resp = await fetch("https://api.dreamto.ai/api/v1/services/aigc/video-generation/video-synthesis", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.DREAMTO_API_KEY}`,
"Content-Type": "application/json",
"X-DashScope-Async": "enable",
},
body: JSON.stringify(payload),
});
console.log(resp.status, await resp.json()); // { request_id: '...', output: { task_id: '...', task_status: 'PENDING' } }