一览
LTX Video API 通过 Mage 运行 LTX Video 及另外 1 个版本,端点为 POST https://api.mage.space/v1/ltx_video/generate。使用默认设置的一次请求需要 20 Gems(约 $0.02),无需订阅。LTX Video 不支持 @handle 提及。
视频
输出
2
变体
20
每段视频消耗的 Gems(默认)
$0.02
约合美元
概览
LTX Video API 能做什么
一款快速的开放权重视频模型,适合低成本、快速迭代。支持文字或起始帧输入,最高 720p,提供 Distilled 和 Dev 两个版本。
一款快速的开放权重视频模型,适合低成本迭代,提供 Distilled 和 Dev 两个版本,支持文字或起始帧输入。
支持的输入:first_image。
快速开始
调用 LTX Video API
设置 MAGE_API_KEY,向 /ltx_video/generate 提交请求,然后轮询 status_url,直到请求完成。
cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/ltx_video/generate' \
--header "Authorization: Bearer $MAGE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "3:2",
"model_id": "ltx-video-096-distilled"
}' | jq -r '.status_url')
# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';
const mage = new Mage(); // reads MAGE_API_KEY
const request = await mage.run('ltx_video', {
prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
aspect_ratio: '3:2',
model_id: 'ltx-video-096-distilled',
});
console.log(request.result.url);Python
# pip install mage-space
from mage_space import Mage
mage = Mage() # reads MAGE_API_KEY
request = mage.run("ltx_video", {
"prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
"aspect_ratio": "3:2",
"model_id": "ltx-video-096-distilled",
})
print(request["result"]["url"])模型
LTX Video 的 model_id 取值
传入 model_id 即可选择变体。未指定时将使用默认变体。
| model_id | 名称 | 默认 |
|---|---|---|
| ltx-video-096-distilled | LTX Video | 是 |
| ltx-video-096-dev | LTX Video |
选项
LTX Video 参数
以下为所有变体允许的取值,个别变体可选项可能更少。文档中列出了各变体的选项。
| 字段 | 取值 |
|---|---|
| aspect_ratio | 21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21 |
| resolution | 240p, 360p, 480p, 720p |
输入
LTX Video 支持的媒体输入
可通过 https 链接、data URL 或不超过 100 MB 的上传文件发送。
| 字段 | 用途 |
|---|---|
| first_image | 首帧图片。 |
更多视频模型
Mage 上的其他视频生成 API
常见问题
常见问题解答
LTX Video API 的费用是多少?
使用默认设置(LTX Video)的一次 LTX Video 请求需要 20 Gems,约 $0.02。其他分辨率、时长和版本会改变价格,具体费用以返回结果为准。生成失败会退款;因违反 Mage 内容政策而被拦截的请求不予退款。
LTX Video API 的端点是什么?
向 https://api.mage.space/v1/ltx_video/generate 发送 POST 请求,并在 Authorization: Bearer 请求头中携带你的 Mage API 密钥。返回结果包含 status_url,可用于轮询获取结果。
我可以调用哪些 LTX Video 模型?
ltx-video-096-distilled、ltx-video-096-dev。默认为 LTX Video。
LTX Video 支持参考图片或角色吗?
LTX Video 支持 first_image。LTX Video 不支持 @handle 提及。
我可以在 Claude 或 ChatGPT 中使用 LTX Video 吗?
可以。将 Mage MCP 服务器连接到 Claude、ChatGPT、Claude Code、Grok 或 Cursor,然后直接说出 LTX Video 的名称即可。你的助手会通过 get_model 读取可用选项,并在生成前告知价格。
LTX Video 的生成结果会保存多久?
结果和输入内容会保存 30 天。想长期保留的内容,请下载到你自己的存储空间。
用 Mage 开始开发
一个账号,一份 Gems 余额,畅用所有模型。按生成量付费,用多少付多少。