LTX 2.5 API 文档(Fast / Pro)
LightricksLTX 2.5 API 是 apimodels.app 上调用 Lightricks LTX-2.5 视频模型的接口:用一个 API Key,把提示词、一张首帧图或一段音频,变成带声音的 6–20 秒视频。两个模型名:ltx-2.5-fast(720p / 1080p / 1440p,文生、图生、音频生视频)和 ltx-2.5-pro(720p / 1080p,文生、图生视频)。按成片秒数计费,Fast $0.081/秒起、Pro $0.108/秒起,比 Lightricks 官方价低 10%,失败不扣费。
最后更新:2026-11-20
模型与价格
LTX 2.5 有两个模型名,价格只看分辨率和成片秒数;模式和帧率都不改单价。
| 模型名 | 720p | 1080p | 1440p | Lightricks 官方价 |
|---|---|---|---|---|
| ltx-2.5-fast | $0.081/s | $0.117/s | $0.171/s | $0.09 / $0.13 / $0.19 |
| ltx-2.5-pro | $0.108/s | $0.153/s | 本站没有 | $0.12 / $0.17 |
- 例子:Fast 720p 6 秒 $0.486;Fast 1080p 10 秒 $1.17;Fast 1080p 20 秒 $2.34;Fast 1440p 10 秒 $1.71;Pro 720p 6 秒 $0.648;Pro 1080p 10 秒 $1.53。
- 音频生视频按成片长度计到 0.01 秒:1080p 出 12.5 秒是 12.5 × $0.117 = $1.4625。不写 duration 又读不出音频长度时,建任务先按上限(20 秒,或 10 秒)冻结,出片后按实际秒数结算。
- 失败的任务不扣费。成片文件保留 30 天。
五种模式:按输入自动选
LTX 2.5 没有单独的「图生视频」或「音频生视频」模型名:有 audio_url 就是音频生视频(只有 Fast),否则有首帧图就是图生视频,否则是文生视频。三种模式都必须写 prompt。
| 模式 | 模型名 | 怎么触发 | 时长 |
|---|---|---|---|
| 文生视频 | ltx-2.5-fast | 只有 prompt | 6–20 秒偶数秒;1440p 或 48 / 50 fps 时 6 / 8 / 10 |
| 图生视频 | ltx-2.5-fast | prompt + image_url(首帧) | 同上;画幅跟着图 |
| 音频生视频 | ltx-2.5-fast | prompt + audio_url(可再加 image_url) | 跟着音频,或 duration 2–20 秒(1440p 或 48 / 50 fps ≤10) |
| 文生视频 | ltx-2.5-pro | 只有 prompt | 6 / 8 / 10 秒 |
| 图生视频 | ltx-2.5-pro | prompt + image_url(首帧) | 6 / 8 / 10 秒;画幅跟着图 |
想把模式写死,可以用带后缀的别名:ltx-2.5-fast-text-to-video、ltx-2.5-fast-image-to-video、ltx-2.5-fast-audio-to-video、ltx-2.5-pro-text-to-video、ltx-2.5-pro-image-to-video(不带点的 ltx-2-5-… 也行)。输入和别名对不上时直接返回 400,不会按另一种模式出片。
创建任务与轮询
POST /v1/video/generations 是异步接口:创建后返回 taskId,再轮询 GET /v1/video/generations?task_id= 直到 state 为 completed,成片在 data.resultUrls[0];也可以传 callback_url,任务结束时我们回调你的地址。
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-fast",
"prompt": "Close-up of an old fisherman mending a net on a wooden pier at dawn. He pulls the cord tight, looks up and says, \"Storm is coming.\" The camera slowly pushes in while gulls cry.",
"resolution": "1080p",
"fps": 24,
"duration": 10,
"aspect_ratio": "16:9"
}'
# Poll until state is "completed" (or "failed")
curl "https://api.apimodels.app/v1/video/generations?task_id=TASK_ID" \
-H "Authorization: Bearer YOUR_API_KEY"state 只有三个值:pending(排队或生成中)、completed(成功)、failed(失败,不扣费,不会再变)。
五种模式的 curl 示例
每个示例都能直接复制,把 YOUR_API_KEY 和素材链接换成你自己的。
1. Fast 文生视频
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-fast",
"prompt": "Close-up of an old fisherman mending a net on a wooden pier at dawn. He pulls the cord tight, looks up and says, \"Storm is coming.\" The camera slowly pushes in while gulls cry.",
"resolution": "1080p",
"fps": 24,
"duration": 10,
"aspect_ratio": "16:9"
}'2. Fast 图生视频(首帧)
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-fast",
"prompt": "The woman in the photo turns toward the window and smiles as curtains move in the breeze; soft street noise outside.",
"image_url": "https://your-domain.com/first-frame.jpg",
"resolution": "1080p",
"fps": 24,
"duration": 6
}'3. Fast 音频生视频(对口型 / 口播)
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-fast",
"prompt": "A young presenter speaks to the camera in a bright studio, natural hand gestures, medium shot.",
"audio_url": "https://your-domain.com/voice.mp3",
"image_url": "https://your-domain.com/portrait.jpg",
"resolution": "1080p",
"fps": 25
}'
# duration left out: the clip follows the audio (max 20 s; 10 s at 1440p or 48/50 fps).
# Add "duration": 8.5 to cut the first 8.5 s instead.4. Pro 文生视频
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-pro",
"prompt": "Wide establishing shot of a misty mountain lake at sunrise, a lone canoe drifting, the camera slowly cranes down; birdsong and still water.",
"resolution": "1080p",
"fps": 24,
"duration": 10,
"aspect_ratio": "3:2",
"seed": 42
}'5. Pro 图生视频
curl -X POST https://api.apimodels.app/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "ltx-2.5-pro",
"prompt": "The perfume bottle on the marble counter catches the morning light as the camera slowly arcs to the right; a soft piano note rings out.",
"image_url": "https://your-domain.com/bottle.jpg",
"resolution": "1080p",
"fps": 24,
"duration": 8
}'请求参数
LTX 2.5 的请求体只有下面这些字段;尾帧、参考图、视频输入会被拒(400),不会被悄悄忽略。
| 字段 | 必填 | 类型 | 说明 |
|---|---|---|---|
| model | 是 | string | "ltx-2.5-fast" 或 "ltx-2.5-pro"(或上面的别名) |
| prompt | 是 | string | 1–5000 字。三种模式都必填 |
| image_url | 否 | string | 一张首帧图:公网链接或 base64 data URI,JPG / PNG / WEBP,≤10 MB。传了就是图生视频(Fast 带音频时是开场画面)。也收 first_frame_url / image |
| audio_url | 否 | string | 只有 Fast。MP3 / WAV / M4A / AAC / OGG / FLAC,≥2 秒,≤50 MB,原样当成片音轨。传了就是音频生视频 |
| resolution | 否 | string | Fast:720p / 1080p / 1440p;Pro:720p / 1080p。默认 1080p |
| fps | 否 | integer | 24 / 25 / 48 / 50,默认 24,不影响价格 |
| duration | 否 | number | 文生 / 图生:Fast 6–20 偶数秒(1440p 或 48 / 50 fps 只有 6 / 8 / 10),Pro 6 / 8 / 10,默认 10。音频生视频:可选 2–20 秒,可带小数(1440p 或 48 / 50 fps ≤10),不写就跟音频长度 |
| aspect_ratio | 否 | string | 只用于文生视频:16:9 / 9:16 / 1:1 / 3:2 / 2:3,默认 16:9。图生视频不要传(跟着图);不带图的音频生视频固定 16:9 |
| seed | 否 | integer | 0–2147483647,不传就随机 |
| callback_url | 否 | string | 任务结束时回调的地址 |
分辨率、帧率与时长的组合
LTX 2.5 的时长是固定几档,能选哪几档取决于档位、分辨率和帧率。
| 模型名 | 分辨率 | fps | 文生 / 图生时长 | 音频生视频上限 |
|---|---|---|---|---|
| ltx-2.5-fast | 720p / 1080p | 24 / 25 | 6, 8, 10, 12, 14, 16, 18, 20 | 20 s |
| ltx-2.5-fast | 720p / 1080p | 48 / 50 | 6, 8, 10 | 10 s |
| ltx-2.5-fast | 1440p | 24 / 25 / 48 / 50 | 6, 8, 10 | 10 s |
| ltx-2.5-pro | 720p / 1080p | 24 / 25 / 48 / 50 | 6, 8, 10 | 不支持 |
错误与失败
参数不合法的请求在建任务前就返回 400,不扣钱;下面是 LTX 2.5 最常见的几条原文。
| 状态 | 什么时候 | 返回的 msg |
|---|---|---|
| 400 | 给 Pro 传 audio_url | audio-to-video (audio_url) is only available on ltx-2.5-fast; ltx-2.5-pro supports text-to-video and image-to-video |
| 400 | Pro 选 1440p | resolution must be 720p or 1080p on ltx-2.5-pro (got "1440p"); 1440p is only on ltx-2.5-fast |
| 400 | 时长不在允许的几档里 | duration must be 6, 8 or 10 at 1440p or 48/50 fps (got "12") |
| 400 | 带首帧图又传了画幅 | aspect_ratio must be omitted when a first-frame image is given — the video keeps the image's aspect ratio (got "1:1") |
| 400 | 传了尾帧 | ltx-2.5-fast has no last-frame input; remove last_frame_url (only a first frame is supported, as image_url) |
| 400 | 音频比 duration 短 | audio_url is about 3.2s long, shorter than duration 5s — lower duration or omit it to follow the audio |
| 401 | API Key 缺失或无效 | — |
| 402 | 余额不够付这一条 | — |
| state: failed | 内容审核没过,或上游太忙 | 不扣费,改一下输入再试 |
限制
- 本站没有 4K、尾帧、参考图、视频输入、自动时长和无声输出(每条都带声音)。Lightricks 自己的接口有 4K、尾帧和 Pro 的音频生视频。
- Pro 没有音频生视频,也没有 1440p;最长 10 秒。
- 提示词最长 5000 字;首帧图 ≤10 MB;音频 ≥2 秒、≤50 MB。
- 不保证每次都成功:内容审核或上游繁忙都可能让任务失败,失败不扣费。
- Lightricks 的提示词指南提醒:画面里的文字和很乱的物理运动目前仍不稳定。
参考资料
2026-11-20 核对;价格是本站价格,Lightricks 的数字以它自己的页面为准。
相关
常见问题
LTX 2.5 API 多少钱?
apimodels.app 按成片秒数收费:ltx-2.5-fast 720p $0.081、1080p $0.117、1440p $0.171 每秒;ltx-2.5-pro 720p $0.108、1080p $0.153 每秒,比 Lightricks 官方价低 10%。1080p 10 秒,Fast $1.17,Pro $1.53;音频生视频按成片长度算到 0.01 秒。失败不扣费。
LTX 2.5 API 怎么做图生视频?
在同一个请求里加 image_url(公网链接或 base64 data URI,JPG / PNG / WEBP,不超过 10 MB),不要传 aspect_ratio;视频从这张图开场,画幅跟着图走。只支持首帧,传 last_frame_url 会返回 400。
LTX 2.5 音频生视频(对口型)怎么用?
给 ltx-2.5-fast 传 audio_url 和提示词,想让某人开口就再用 image_url 传他的照片。音频(MP3 / WAV / M4A / AAC / OGG / FLAC,至少 2 秒,不超过 50 MB)原样当音轨,画面跟着声音走。不写 duration 时长度跟着音频,最长 20 秒(1440p 或 48 / 50 fps 时 10 秒)。本站 ltx-2.5-pro 没有音频生视频。
LTX 2.5 最长多少秒、最高多少分辨率?
在本站:ltx-2.5-fast 用 720p 或 1080p、24 / 25 fps 时最长 20 秒,1440p 时最长 10 秒;ltx-2.5-pro 是 720p 或 1080p,6、8、10 秒。本站没有 4K,Lightricks 自己的接口有。
怎么指定 LTX 2.5 的模式?
用带后缀的别名,比如 ltx-2.5-fast-image-to-video、ltx-2.5-pro-text-to-video。输入和别名对不上(比如图生视频别名却带了 audio_url)会直接返回 400,不会换一种模式出片。用不带后缀的模型名时,模式跟着输入走。