
01 · 电影感文生短片
拍一段旅人走进霓虹车站的镜头
写明人物、场景和镜头运动,生成一段单场景的电影感短片,检查构图、动作和光线是否连贯,结尾停在清晰的画面上。
MAGI-2 是 Sand.ai 的视频生成模型。在 APIMart 使用同一型号 magi-2 完成文生视频、首尾帧图生视频和多模态参考生视频,输出固定 1080p、4~30 秒,默认带声音。费用只按输出秒数计算,参考素材与声音开关不改变价格。
透明定价,无隐藏费用。按量付费,用多少付多少。
精选示例
选择示例,带入模型、提示词与完整配置,再按你的想法调整。

01 · 电影感文生短片
写明人物、场景和镜头运动,生成一段单场景的电影感短片,检查构图、动作和光线是否连贯,结尾停在清晰的画面上。

02 · 产品广告短片
带入一张香水瓶产品图作为首帧,聚光灯亮起、镜头缓慢移动,配合自然的高光变化,结尾留出可放品牌标识的干净画面,瓶身形状、标签和比例保持不变。生成的视频可在生成区查看。

03 · 对白与原生配音短片
写明台词和环境声,生成带原生配音的短片:咖啡师口型自然地说出一句清楚的台词,背景只有雨声和店内环境音,不加字幕。
从文字、首尾帧或参考素材开始。在表单中配置任务,或切换 JSON 检查实际请求;RUN 按所选输出时长展示预估费用。提交后在结果区与历史记录中查看任务,同一 API Key 也可用于服务端集成。
用清晰的描述与各有用途的参考素材组织画面和声音。
仅发送提示词和通用参数,描述画面、动作、镜头与声音。
首帧必选,尾帧可选;auto 跟随首帧比例,图生不支持 21:9。
最多 10 张图、5 段视频和 5 段音频。参考生固定发送 omni_reference_task_type: reference。
所有生成方式都输出 1080p,无需选择分辨率。
按整数秒选择时长,默认 5 秒;费用随所选输出时长变化。
generate_audio 默认 true,可关闭;关闭声音不降价。
文生和参考生支持 6 种比例;图生支持 5 种比例及跟随首帧。
三种方式同价,参考素材不加价;提交错误不扣费,任务失败全额退款。
从明确的创作描述出发,探索六类视频方向。
围绕一次商品展示设计运镜、灯光和视觉重点,让商品本身及其使用方式始终处于场景中心。
聚焦一次对话或情绪变化,描述能让观众理解这一时刻的动作、表情和台词。
为同一段情节尝试不同调度,比较远景、特写和转场,再确定镜头顺序。
把广告想法转成简短的视觉情境,在保持核心信息不变的前提下比较不同环境和氛围。
围绕同一主体测试光线、配色和材质,用对比结果为更完整的项目选择视觉方向。
以一个小动作和独特的声音环境构建地点,分别描述前景运动、背景活动和空间情绪。
从 API Key 到生成结果,完成一次视频请求。
登录 APIMart 并创建 API Key,服务端调用使用 Bearer 鉴权。
选择文生、图生或参考生,填写提示词、4~30 秒时长、比例和声音开关,按需添加参考素材。
查看 RUN 预估费用后提交,保存 task_id 并查询至 completed 或 failed。成功后从 data.result.videos[0].url 获取视频。
使用同一视频接口提交,再按任务 ID 查询结果。
请求头发送 Authorization: Bearer <key>,使用 APIMART_API_KEY 环境变量保管密钥。
POST /v1/videos/generations,保存 data[0].task_id。
GET /v1/tasks/{task_id},查询至 completed 或 failed。视频位于 data.result.videos[0].url,失败原因位于 data.error.message。
鉴权及通用接口说明见 APIMart API 文档。
curl -X POST https://api.apimart.ai/v1/videos/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "雨夜街道上一只红色纸船顺着水沟漂流,微距镜头,雨声淅沥",
"duration": 5,
"aspect_ratio": "9:16"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "magi-2",
"prompt": "雨夜街道上一只红色纸船顺着水沟漂流,微距镜头,雨声淅沥",
"duration": 5,
"aspect_ratio": "9:16"
}
resp = requests.post(f"{API_BASE}/v1/videos/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
while True:
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
url = task["result"]["videos"][0]["url"]
print(url[0] if isinstance(url, list) else url)
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(10)curl -X POST https://api.apimart.ai/v1/videos/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi-2",
"prompt": "女孩慢慢转身,过渡成第二张图里的人物,柔光",
"duration": 5,
"image_urls": [
"https://example.com/start.jpg",
"https://example.com/end.jpg"
]
}'curl -X POST https://api.apimart.ai/v1/videos/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "雨夜街道上一只红色纸船顺着水沟漂流,微距镜头,雨声淅沥",
"model": "magi-2",
"duration": 8,
"aspect_ratio": "16:9",
"omni_reference_task_type": "reference",
"image_urls": [
"https://example.com/girl.jpg"
],
"video_urls": [
"https://example.com/camera.mp4"
],
"audio_urls": [
"https://example.com/bgm.mp3"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
model | string | 是 | 默认值: magi-2 | 固定 magi-2。 |
prompt | string | 是 | 默认值: — | 三种模式必填,最多 15000 字。 |
duration | integer | 否 | 默认值: 5 | 4~30 整数秒;seconds 是别名,同时传入须相同。 |
aspect_ratio | string | 否 | 默认值: 16:9 / auto | 文生/参考生默认 16:9;图生省略或 auto 跟随首帧,不支持 21:9。 |
generate_audio | boolean | 否 | 默认值: true | 声音开关;audio 是别名,同时传入须一致。关闭不降价。 |
seed | integer | 否 | 默认值: -1 | -1 或省略为随机,其他取值为 0~2147483647。 |
resolution | string | 否 | 默认值: 1080p | 仅支持 1080p。 |
image_urls | string[] | 否 | 默认值: — | 图生最多 2 张首尾帧;自动或显式参考模式下,与 reference_image 角色图片合计最多 10 张。 |
first_frame_image / last_frame_image | string | 否 | 默认值: — | 首帧和可选尾帧,与 image_urls 二选一。 |
image_with_roles | object[] | 否 | 默认值: — | 每项含 url 与 role:first_frame、last_frame、reference_image。角色参考图可与 image_urls 合并使用,合计最多 10 张。 |
video_urls | string[] | 否 | 默认值: — | 最多 5 段参考视频,单段 2~30 秒,合计 ≤30 秒。 |
audio_urls | string[] | 否 | 默认值: — | 最多 5 段参考音频,单段 2~30 秒,合计 ≤30 秒。 |
omni_reference_task_type | string | 否 | 默认值: auto | auto 或 reference;视频、音频或 reference_image 角色可自动触发参考模式。仅使用 image_urls 作为参考图时须显式传 reference。 |
接口参数、计费和任务结果说明。
MAGI-2 是 Sand.ai 的视频生成模型。在 APIMart 上使用型号 magi-2,通过同一接口完成文生视频、首尾帧图生视频和参考生视频。
Sand.ai 于 2026 年 11 月 24 日发布 MAGI-2,完整型号与较早的 MAGI-2 Preview 研究版本不同。
型号固定为 magi-2,提交到 POST /v1/videos/generations,使用 GET /v1/tasks/{task_id} 查询结果。
费用为当前每秒单价 × duration,未传时按 5 秒。三种生成方式同价,参考素材、比例和声音开关不加价,会员及专属价由价格接口返回。
登录 APIMart,进入 API Keys 创建密钥。服务端请求通过 Authorization: Bearer <key> 鉴权,不要把密钥放进公开客户端代码。
可以。本页和 Dashboard Playground 复用同一工作台,支持表单与 JSON 配置,RUN 显示按所选时长计算的预估费用。
image_urls 第 1 张为首帧,第 2 张为可选尾帧。不传 aspect_ratio 或传 auto 时跟随首帧比例。也支持 first_frame_image / last_frame_image 或 image_with_roles。
固定 1080p,4~30 整数秒,默认 5 秒。文生和参考生支持 16:9、9:16、1:1、4:3、3:4、21:9;图生不支持 21:9,可选择 auto 跟随首帧。
参考模式下,image_urls 与 reference_image 角色图片合计最多 10 张,另可添加最多 5 段视频和 5 段音频。每段视频或音频为 2~30 秒,每类合计不超过 30 秒,超出部分可能被上游截掉。视频、音频或 reference_image 角色会自动触发参考模式;仅使用 image_urls 作为参考图时须传 omni_reference_task_type: reference。素材需使用公网可直接访问的 HTTP(S) 地址。
三种方式都必填提示词,最多 15000 字。描述画面、动作、镜头和声音,台词放在引号里。seed 可留空或填 -1 表示随机,也支持 0~2147483647 的整数。
提交失败不扣费。任务创建后按输出秒数预扣,任务失败(包括素材获取失败、平台判定超时)全额退款。停止查询不会取消任务,之后成功仍正常收费。
保存提交返回的 task_id,持续查询到 completed 或 failed,不按固定生成时长放弃。连接异常后的暂停只影响前端查询,可继续查询同一任务,避免重新提交。
可以通过 generate_audio: false 关闭声音,价格不变。当前接口不支持视频编辑、续写或中间关键帧。参考视频用于引导生成,不会直接拼接进成片;参考音频也不会原样保留。
MAGI 2、Magi2 和 MAGI-2.0 是其他搜索写法。本页使用官方名称 MAGI-2,API 型号为 magi-2。
探索同类型的其他模型。

Seedance 2.5 Flash
Seedance 2.5 Flash turns creative ideas into visual stories. From cinematic scenes to playful animations, explore movement, mood, and composition to create videos that draw viewers in and bring your imagination to the screen.

APIMart Zoe
apimart-zoe creates 4–30 second videos, or lets the model choose the length, at 480p, 720p, 1080p, 2K or 4K in seven aspect ratios from 21:9 to 9:16. It can work from a text prompt, from first and last frames, or from up to 30 reference images, 10 reference videos and 10 reference audio clips. It can also edit an existing video, changing its style or elements while keeping the original length and framing. Audio can be generated together with the video. A two-step workflow lets you preview a shot as a low-cost 480p draft and then render the approved draft as a 1080p final within 24 hours. Billing is per second of output, with a separate rate for requests that include reference videos.

Kling V4 Flash
Kling 4.0 Flash brings your creative vision to life in motion. From cinematic moments to imaginative visual stories, turn your ideas into videos that capture attention, set the mood, and give every scene a story to tell.

Gemini Omni 1.2 Flash
Gemini Omni 1.2 Flash puts your ideas in motion. From everyday questions to creative exploration, bring fresh perspectives to your work, find inspiration, and keep your next project moving forward.