Listed rates are the highest rates across available channels. Your request is billed at the selected channel’s rate, locked when the request starts, and may cost less.
happyhorse-1.1-i2v
Availablehappyhorse-1.1-i2vAlibabavideo根据首帧图片与文字提示生成视频,支持异步生成与下载。
per second
$0.13
Delivery
Async generation
Provider routes
1
Capabilities
Vision
Providers
Choose a route to view its rates and API example.
API example
Connect with your existing OpenAI-compatible SDK.
video.ts
// Start a generation
const start = await fetch('https://router.202ai.xyz/v1/videos/generations', {
method: 'POST',
headers: {
authorization: `Bearer ${process.env.MACAW_API_KEY}`,
'content-type': 'application/json',
},
body: JSON.stringify({
model: 'happyhorse-1.1-i2v',
prompt: 'A close-up of raindrops on a window, soft focus, slow motion.',
aspect_ratio: '16:9',
resolution: '1080p',
duration_seconds: 8,
}),
}).then(r => r.json());
// Poll until done — usually 1–3 minutes
let task = start;
while (task.status === 'pending' || task.status === 'running') {
await new Promise(r => setTimeout(r, 5000));
task = await fetch(`https://router.202ai.xyz/v1/videos/generations/${start.id}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
}).then(r => r.json());
}
if (task.status === 'succeeded') {
// Download the file
const video = await fetch(`https://router.202ai.xyz${task.video_url}`, {
headers: { authorization: `Bearer ${process.env.MACAW_API_KEY}` },
});
// → pipe video.body to disk or play in a <video> tag
}