MAGI-2 在线试用
输入
Describe the scene, motion and sound. Required in text and reference modes.
Public HTTPS URL of the first frame. The video follows its aspect ratio. Cannot be combined with reference media.
Public HTTPS URL of the last frame. Requires firstFrameImage.
Public HTTPS URLs of up to 10 reference images.
Public HTTPS URLs of up to 5 reference videos. Each is 2–30 seconds, with at most 30 seconds in total.
Public HTTPS URLs of up to 5 audio references. Each is 2–30 seconds, with at most 30 seconds in total.
运行费用将从您的余额中扣除。
输出

输出将显示在此处。
填写参数、确认费用并运行模型,结果将在此处显示。在浏览器中试用无需单独创建 API 密钥。
MAGI-2 API 价格
| 选项 | 每秒价格 |
|---|---|
| 1080p | $0.114 |
快速开始
完整 API 参考 →1curl -X POST https://api.api-stock.com/api/v1/generation/create \2 -H "Authorization: Bearer $API_STOCK_KEY" \3 -H "Content-Type: application/json" \4 -d '{5 "model": "magi-2",6 "input": {7 "duration": 5,8 "resolution": "1080p",9 "generateAudio": true10 }11 }'
参数
| 名称 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
prompt | string | 否 | — | Describe the scene, motion and sound. Required in text and reference modes. |
duration | number | 否 | 5 | Clip length in whole seconds. |
resolution | string | 否 | 1080p | Output resolution.以下之一:1080p |
aspectRatio | string | 否 | — | Output aspect ratio for text and reference modes. Defaults to 16:9. Omit it when using firstFrameImage.以下之一:16:9, 9:16, 1:1, 4:3, 3:4, 21:9 |
generateAudio | boolean | 否 | true | Generate a synchronized soundtrack. This setting does not change the price. |
firstFrameImage | string | 否 | — | Public HTTPS URL of the first frame. The video follows its aspect ratio. Cannot be combined with reference media. |
lastFrameImage | string | 否 | — | Public HTTPS URL of the last frame. Requires firstFrameImage. |
imageUrls | string[] | 否 | — | Public HTTPS URLs of up to 10 reference images. |
videoUrls | string[] | 否 | — | Public HTTPS URLs of up to 5 reference videos. Each is 2–30 seconds, with at most 30 seconds in total. |
audioUrls | string[] | 否 | — | Public HTTPS URLs of up to 5 audio references. Each is 2–30 seconds, with at most 30 seconds in total. |
常见问题
MAGI-2 的费用是多少?
MAGI-2 通过 API Stock API 的起价为 $0.114 每秒输出。您按使用量从单个预付余额中支付——无需订阅——最终价格会根据分辨率或时长等参数浮动。
MAGI-2 是什么时候发布的?
MAGI-2 于 2026年11月24日 发布。它可以通过 API Stock API 使用,与其他所有模型共用同一个 API 密钥和预付余额。
如何获取 MAGI-2 的 API 密钥?
注册 API Stock 账号,使用可用的付款方式充值,然后在控制台创建 API 密钥即可,整个过程只需几分钟,无需签订合同。同一个密钥可调用目录中的所有模型,因此无需为 MAGI-2 单独申请密钥。
如何调用 MAGI-2 API?
向 https://api.api-stock.com/api/v1/generation/create 发送 POST 请求,并附上您的 API 密钥和模型 ID "magi-2"。请求会返回一个任务 ID,您可以轮询该 ID;或者在结果准备就绪时通过 webhook 回调通知。上方的快速开始部分提供了一个可直接运行的示例。
MAGI-2 接受哪些输入参数?
MAGI-2 接受 10 个输入参数。参数表中列出了它们的类型、默认值和允许值。
如果 MAGI-2 请求失败,会发生什么?
API Stock 会自动通过备用提供商重试请求。如果所有提供商均失败,费用将退还至您的余额。
我可以使用与其他模型相同的 API 密钥来调用 MAGI-2 吗?
可以。API Stock 上的每个模型——视频、图像、音乐和聊天——共享一个 API 密钥和一个预付余额,因此您无需新的凭据即可切换到 MAGI-2。
