MAGI-2 Reference to Video API
由 Sand.ai 提供 Reference to Video 与 MAGI-2。Generate up to 30 seconds of video with synchronized sound。
试用 MAGI-2 Reference to Video
Up to 10 images for characters, products, style or scene. Refer to them in the prompt as @Image1, @Image2…
Up to 5 MP4/MOV clips for motion, camera moves or effects (2–30 s each, 30 s in total). Refer to them as @Video1, @Video2… References add no charge.
Up to 5 MP3/WAV clips for voice, music or sound (2–30 s each, 30 s in total). Refer to them as @Audio1, @Audio2…
Output frame shape.
The 1080p tier. Pixel dimensions depend on the output aspect ratio.
Length of the generated clip in seconds (4–30s). You pay per second.
使用 Google 或电子邮箱免费创建账户,只为你生成的内容付费。
你的 视频 会显示在这里
输入提示词,选择设置,然后点击“运行”。仅成功生成的结果会收费。
MAGI-2 Reference to Video API
/api/v1/run/sand-ai/magi-2/reference-to-video提交异步任务并返回 202 和生成任务 ID。请轮询 GET /api/v1/generations/{id} 或传入 webhook_url。参见 任务生命周期。
输入参数
| 名称 | 类型 | 说明 | 影响价格 |
|---|---|---|---|
prompt必填 | string | Describe the shot: subject, action, camera movement, lighting and style. | 否 |
reference_image_urls | string[] (URLs) | Up to 10 images for characters, products, style or scene. Refer to them in the prompt as @Image1, @Image2… 最多数量:10 | 否 |
reference_video_urls | string[] (video URLs) | Up to 5 MP4/MOV clips for motion, camera moves or effects (2–30 s each, 30 s in total). Refer to them as @Video1, @Video2… References add no charge. 最多数量:5 | 否 |
reference_audio_urls | string[] (audio URLs) | Up to 5 MP3/WAV clips for voice, music or sound (2–30 s each, 30 s in total). Refer to them as @Audio1, @Audio2… 最多数量:5 | 否 |
aspect_ratio | string (enum) | Output frame shape. 可选值:16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 21:9 默认值:16:9 | 否 |
resolution | string (enum) | The 1080p tier. Pixel dimensions depend on the output aspect ratio. 可选值:1080p 默认值:1080p | 否 |
duration | integer | Length of the generated clip in seconds (4–30s). You pay per second. 范围:4–30s 默认值:5 | 是 |
generate_audio | boolean | Generate synchronized sound, ambience and dialogue. No extra cost. 默认值:true | 否 |
webhook_url | string (URL) | 可选。生成完成后,我们会在此地址 POST 结果,并使用你的 Webhook 密钥进行签名。Webhooks | 否 |
请求
const API = "https://cheapergen.com/api/v1";
const headers = {
Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
"Content-Type": "application/json",
};
// 1. Submit the job
let job = await fetch(`${API}/run/sand-ai/magi-2/reference-to-video`, {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "Place the paper boat from @Image1 on the pond from @Image2.",
"reference_image_urls": [
"https://cdn.cheapergen.com/samples/reference-1.jpg",
"https://cdn.cheapergen.com/samples/reference-2.jpg"
],
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 5
}),
}).then((r) => r.json());
// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
await new Promise((r) => setTimeout(r, 3000));
job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}
console.log(job.status === "succeeded" ? job.output.video.url : job.error);响应
{
"id": "gen_8c2QmX1nq0k4",
"object": "generation",
"model": "sand-ai/magi-2",
"endpoint": "sand-ai/magi-2/reference-to-video",
"mode": "reference-to-video",
"status": "queued",
"input": {
"prompt": "Place the paper boat from @Image1 on the pond from @Image2.",
"reference_image_urls": [
"https://cdn.cheapergen.com/samples/reference-1.jpg",
"https://cdn.cheapergen.com/samples/reference-2.jpg"
],
"aspect_ratio": "16:9",
"resolution": "1080p",
"duration": 5
},
"output": null,
"error": null,
"cost": {
"amount_usd": 0.2255,
"currency": "usd",
"estimated": true,
"official_usd": null,
"list_price_source": "official",
"list_price_label": "Official",
"saved_usd": null
},
"source": "api",
"started_at": null,
"completed_at": null,
"urls": {
"get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
"cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
},
"created_at": "2026-10-15T09:21:04Z"
}MAGI-2 定价
按 视频按秒计费 按量付费,无需订阅 (月度套餐 为可选项)。生成失败会自动退款。
| 档位 | 官方价格 | CheaperGen | 可节省 |
|---|---|---|---|
1080p | $0.08/s | $0.08/s | — |
- 官方价格:Sand.ai API list price (platform.sand.ai/docs/model-pricing): $0.08 per second at 1080p.。价格核实于 2026年11月25日。
- All three modes cost $0.08 per requested second. Audio and reference inputs are included.
相似的 视频 模型
热门 text-to-video 模型 来自其他开发者。

Seedance2.5
文生视频 · 图生视频 · 参考素材生成视频 · Video Edit
ByteDance 最新视频模型——时长更长、画面更清晰、控制更精准

MiniMaxH3
文生视频 · 图生视频 · 参考素材生成视频
海螺 H3——动作表现力和物理效果出色,最高 2K

Seedance2.0 Fast
文生视频 · 图生视频 · 参考素材生成视频
更低延迟、更低成本的 Seedance 2.0 品质

MiniMaxH3 Fast
文生视频 · 图生视频 · 参考素材生成视频
几秒生成 MiniMax H3——开放权重的推理加速版本