Sand.ai: MAGI-2
视频生成 新上线Sand.ai MAGI-2 异步视频生成模型,支持 1080p 原生同步音频、4–5 秒文生视频及最多 5 张参考图输入($0.08/sec)。
定价与费用计算器
OpenDesign Go 按实际产出单位计费($0.08/sec)。
| 分辨率 | 单价 | 计费规则 |
|---|---|---|
| 1080p | $0.08 / sec | 4–5 秒 · 含原生同步音频 |
规格与接口参数
| 参数 | 类型 | 取值 / 支持范围 |
|---|---|---|
| model | string | magi-2 |
| prompt | string | 必填,视频场景与画面描述 |
| resolution / ratio | enum | 1080p · 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 |
| duration | integer | 4–5 秒(1 秒步进,默认 5) |
| images | object[] | 1–5 张已提交图片资产(role: reference / first_frame) |
| generate_audio | boolean | 始终生成原生同步音频(传 false 返回 HTTP 400) |
路由、稳定性与隐私保障
托管多路由自动故障转移、锁定公开单价与零数据留存(ZDR)。
异步视频 API
通过 Async Video Tasks API (/api/v1/media/videos/tasks) 调用 magi-2。
配置 OpenDesign Go API Key
export COROUTER_API_KEY="YOUR_API_KEY" # Base URL: https://amr-api.open-design.ai
发送首次请求
# Step 1: Create async 1080p MAGI-2 task with native audio
curl -fsS -X POST "https://amr-api.open-design.ai/api/v1/media/videos/tasks" \
-H "Authorization: Bearer $COROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{
"model": "magi-2",
"prompt": "Softly shifting geometric color blocks in warm studio light",
"resolution": "1080p",
"duration": 5,
"ratio": "16:9"
}'
# Step 2: Poll task status & download 1080p MP4
curl -fsS -H "Authorization: Bearer $COROUTER_API_KEY" "https://amr-api.open-design.ai/api/v1/media/videos/tasks/$TASK_ID"
curl -fsSL -H "Authorization: Bearer $COROUTER_API_KEY" "https://amr-api.open-design.ai/api/v1/media/videos/tasks/$TASK_ID/content" -o magi2.mp4import os, time, uuid, requests
BASE = "https://amr-api.open-design.ai/api/v1/media/videos/tasks"
HEADERS = {"Authorization": f"Bearer {os.environ['COROUTER_API_KEY']}"}
job = requests.post(
BASE,
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "magi-2",
"prompt": "Softly shifting geometric color blocks in warm studio light",
"resolution": "1080p",
"duration": 5,
"ratio": "16:9",
},
).json()
while True:
status = requests.get(f"{BASE}/{job['task_id']}", headers=HEADERS).json()
if status["status"] in ("succeeded", "failed", "cancelled"):
print(status)
break
time.sleep(5)const BASE = "https://amr-api.open-design.ai/api/v1/media/videos/tasks";
const headers = {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.COROUTER_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
};
const createRes = await fetch(BASE, {
method: "POST",
headers,
body: JSON.stringify({
model: "magi-2",
prompt: "Softly shifting geometric color blocks in warm studio light",
resolution: "1080p",
duration: 5,
ratio: "16:9",
}),
});
const { task_id } = await createRes.json();
const poll = await fetch(`${BASE}/${task_id}`, { headers: { Authorization: headers.Authorization } }).then((r) => r.json());
console.log(poll);查看返回体与标准 HTTP 错误码
{
"task_id": "vid_20261127_magi2_91a4",
"model": "magi-2",
"status": "succeeded",
"resolution": "1080p",
"duration": 5,
"ratio": "16:9",
"content_url": "https://amr-api.open-design.ai/api/v1/media/videos/tasks/vid_20261127_magi2_91a4/content"
}
HTTP 401 Unauthorized Invalid or missing Bearer COROUTER_API_KEY.
HTTP 403 Forbidden Workspace key lacks permission for this model or endpoint.
HTTP 404 Not Found Unknown model ID or unavailable endpoint path.
HTTP 429 Too Many Requests Workspace rate limit, concurrency cap, or credit limit reached.
HTTP 502 Bad Gateway Upstream provider returned an error after automatic failover.
HTTP 503 Service Unavailable Upstream provider temporarily unavailable; retry with backoff.
异步视频流水线
MAGI-2 端到端异步接入范式:首帧图生视频与鉴权下载 MP4。
curl -fsS -X POST "https://amr-api.open-design.ai/api/v1/media/videos/tasks" \
-H "Authorization: Bearer $COROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{
"model": "magi-2",
"prompt": "Slowly pan across the scene as mist drifts through",
"images": [{ "asset_id": "ASSET_ID", "role": "reference" }],
"resolution": "1080p",
"duration": 5,
"ratio": "16:9"
}'curl -fsSL \
-H "Authorization: Bearer $COROUTER_API_KEY" \
"https://amr-api.open-design.ai/api/v1/media/videos/tasks/$TASK_ID/content" \
-o magi2_video.mp4同类模型对比
常见问题
MAGI-2(magi-2)按 1080p 生成秒数计费($0.08/秒),单次任务支持 4–5 秒并默认生成原生同步音频;任务状态轮询与 MP4 下载不另收费。
向 POST https://amr-api.open-design.ai/api/v1/media/videos/tasks 提交任务(携带 Idempotency-Key),轮询 GET .../tasks/{task_id} 直至 status 为 succeeded,再从 .../tasks/{task_id}/content 下载 1080p MP4。
固定输出 1080p 原生同步音频视频,时长支持 4–5 秒(默认 5 秒),支持 16:9、4:3、1:1、3:4、9:16、21:9 共 6 种画幅。
支持通过 images 参数传入 1–5 张已提交图片资产(role 可为 reference 或 first_frame)。原生同步音频始终生成,传入 generate_audio: false 会返回 HTTP 400。
MAGI-2 面向 Pro 与 Max 工作空间开放;OpenDesign Go 严格执行零数据留存(ZDR),不留存提示词、参考图或生成的视频文件。
探索更多模型
全部模型目录MAGI-2 API
https://amr-api.open-design.ai
# Step 1: Create async 1080p MAGI-2 task with native audio
curl -fsS -X POST "https://amr-api.open-design.ai/api/v1/media/videos/tasks" \
-H "Authorization: Bearer $COROUTER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
--data '{
"model": "magi-2",
"prompt": "Softly shifting geometric color blocks in warm studio light",
"resolution": "1080p",
"duration": 5,
"ratio": "16:9"
}'
# Step 2: Poll task status & download 1080p MP4
curl -fsS -H "Authorization: Bearer $COROUTER_API_KEY" "https://amr-api.open-design.ai/api/v1/media/videos/tasks/$TASK_ID"
curl -fsSL -H "Authorization: Bearer $COROUTER_API_KEY" "https://amr-api.open-design.ai/api/v1/media/videos/tasks/$TASK_ID/content" -o magi2.mp4import os, time, uuid, requests
BASE = "https://amr-api.open-design.ai/api/v1/media/videos/tasks"
HEADERS = {"Authorization": f"Bearer {os.environ['COROUTER_API_KEY']}"}
job = requests.post(
BASE,
headers={**HEADERS, "Idempotency-Key": str(uuid.uuid4())},
json={
"model": "magi-2",
"prompt": "Softly shifting geometric color blocks in warm studio light",
"resolution": "1080p",
"duration": 5,
"ratio": "16:9",
},
).json()
while True:
status = requests.get(f"{BASE}/{job['task_id']}", headers=HEADERS).json()
if status["status"] in ("succeeded", "failed", "cancelled"):
print(status)
break
time.sleep(5)const BASE = "https://amr-api.open-design.ai/api/v1/media/videos/tasks";
const headers = {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.COROUTER_API_KEY}`,
"Idempotency-Key": crypto.randomUUID(),
};
const createRes = await fetch(BASE, {
method: "POST",
headers,
body: JSON.stringify({
model: "magi-2",
prompt: "Softly shifting geometric color blocks in warm studio light",
resolution: "1080p",
duration: 5,
ratio: "16:9",
}),
});
const { task_id } = await createRes.json();
const poll = await fetch(`${BASE}/${task_id}`, { headers: { Authorization: headers.Authorization } }).then((r) => r.json());
console.log(poll);