LTX 2.5 Pro API
lightricks/ltx-2.5-pro/image-to-videoLTX 2.5 Pro API 把一张静态图片变成 6–10 秒、带同步声音的高保真视频。LTX 2.5 Pro 图生视频让人脸、服饰与道具忠实于首帧,可选尾帧,720p 下 24 积分/秒起。
拖拽文件、粘贴剪贴板素材,或输入 URL。 1–2 张:第 1 张为首帧,第 2 张(可选)为尾帧。
1/2 个素材
REST API
快速开始
按三步发起一次 LTX 2.5 Pro Image to Video 请求,获取 task_id 并读取生成的视频。
连接 Vidgo API
在控制台创建 API Key 并仅保存在服务端,通过 Authorization: Bearer VIDGO_API_KEY 发送。
- 端点
- POST
https://api.vidgo.ai/api/generate/submit - 认证
- Authorization: Bearer VIDGO_API_KEY
提交视频任务
向统一提交接口发送模型 ID 和对应模式参数。
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "lightricks/ltx-2.5-pro/image-to-video",
"input": {
"prompt": "The elderly woman pulls both wooden oars back in a slow, practiced rhythm and the sampan glides forward along the canal. Light monsoon rain keeps falling, dimpling the brown water into spreading rings; drops bead on the dragon fruit and the pink lotus petals tremble as the boat moves. She glances toward the bank and gives a small, warm smile. The camera stays steady at eye level from the riverbank. Preserve her face, the conical hat, the boat and the cargo exactly. Audio: soft rain on water and leaves, wooden oars creaking and splashing, a distant rooster.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/lightricks/ltx-2.5-pro/image-to-video/v1/01/input-01.png"
],
"duration": 6,
"resolution": "720p",
"fps": 25,
"generate_audio": true
}
}'获取视频结果
使用返回的 task_id 轮询状态接口直至 finished 或 failed。
查询状态
GET https://api.vidgo.ai/api/generate/status/{task_id}在 not_started 或 running 状态继续轮询,finished 后读取 data.files[].file_url。
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "2I5XOOHU8AR65IHQ",
"status": "not_started",
"created_time": "2026-11-25T17:06:38"
}
}{
"code": 200,
"data": {
"task_id": "2I5XOOHU8AR65IHQ",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/lightricks/ltx-2.5-pro/image-to-video/v1/01/output.mp4"
}
],
"created_time": "2026-11-25T17:06:38",
"error_message": null,
"progress": 100
}
}完整可运行示例
包含提交、轮询、终态判断与结果读取的完整脚本。
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "lightricks/ltx-2.5-pro/image-to-video",
"input": {
"prompt": "The elderly woman pulls both wooden oars back in a slow, practiced rhythm and the sampan glides forward along the canal. Light monsoon rain keeps falling, dimpling the brown water into spreading rings; drops bead on the dragon fruit and the pink lotus petals tremble as the boat moves. She glances toward the bank and gives a small, warm smile. The camera stays steady at eye level from the riverbank. Preserve her face, the conical hat, the boat and the cargo exactly. Audio: soft rain on water and leaves, wooden oars creaking and splashing, a distant rooster.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/lightricks/ltx-2.5-pro/image-to-video/v1/01/input-01.png"
],
"duration": 6,
"resolution": "720p",
"fps": 25,
"generate_audio": true
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
done请求参数
顶层传递 model 和可选 callback_url,生成参数放在 input 对象中。
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| model | string | 是 | — | 固定为 lightricks/ltx-2.5-pro/image-to-video。 |
| callback_url | string (URL) | 否 | — | 任务进入终态后接收结果的公开 HTTP(S) 回调地址。 |
| input.prompt | string | 是 | — | 描述首帧如何动起来,最多 5,000 字符。 |
| input.image_urls | string[] | 是 | — | 1–2 个公开图片 URL:第 1 张为首帧,第 2 张(可选)为尾帧。 |
| input.duration | integer | 否 | 6 | 6、8 或 10 秒。 |
| input.resolution | string | 否 | 1080p | 720p 或 1080p。 |
| input.fps | integer | 否 | 25 | 24、25 或 50。 |
| input.aspect_ratio | string | 否 | auto | auto、16:9 或 9:16。 |
| input.generate_audio | boolean | 否 | true | 是否同步生成与画面匹配的声音。 |
| input.camera_motion | string | 否 | — | dolly_in、dolly_out、dolly_left、dolly_right、jib_up、jib_down、static 或 focus_shift。 |
响应字段
提交接口立即返回 task_id;状态接口在任务完成后返回视频文件列表或错误信息。
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 业务状态码,0 或 200 表示成功。 |
| data.task_id | string | 用于轮询状态接口的唯一任务 ID。 |
| data.status | string | not_started | running | finished | failed |
| data.progress | number | 0–100 进度值。 |
| data.files[].file_url | string | 生成视频的公开下载地址。 |
| data.files[].file_type | string | 视频结果为 video。 |
| data.error_message | string | null | 任务失败时的错误说明。 |
任务生命周期
仅在 not_started 和 running 时继续轮询;finished 和 failed 为终态。
not_started任务已接收并排队等待执行。
running视频正在生成,可继续轮询。
finished任务完成,从 data.files[].file_url 读取视频地址。
failed任务失败,读取 data.error_message 并停止轮询。
轮询与错误处理
- 认证401 表示 Bearer API Key 缺失或无效。
- 参数校验400 表示字段无效,例如 duration 不是 6、8 或 10。
- 轮询间隔建议每 5–10 秒轮询一次,或配置 callback_url 接收推送。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 模型 | lightricks/ltx-2.5-pro/image-to-video | 异步视频生成公开模型 ID。 |
| 分辨率 | 720p | 1080p | 默认 1080p。 |
| 时长 | 6 / 8 / 10 秒 | 默认 6 秒。 |
| 帧率 | 24 | 25 | 50 fps | 默认 25 fps。 |
| 计费 | 24 / 34 积分/秒 | 720p $0.12/s、1080p $0.17/s,按输出秒数计费。 |
LTX 2.5 Pro API 常见问题
LTX 2.5 Pro API 图生视频是什么?
LTX 2.5 Pro Image to Video 是 Lightricks 高保真 LTX-2.5 Pro 的图生视频模式。LTX 2.5 Pro API 让首帧动起来(可朝尾帧过渡),生成 6–10 秒、720p 或 1080p、带声音的视频。
LTX 2.5 Pro 图生视频多少钱?
720p 每秒 24 积分,1080p 每秒 34 积分。720p 6 秒为 144 积分($0.72)。
LTX 2.5 Pro API 能用首尾帧吗?
可以。在 image_urls 中先放首帧、再放尾帧。
LTX 2.5 Pro API 图生视频最长多少秒?
6、8 或 10 秒。
LTX 2.5 Pro API 支持哪些图片格式?
公开的 JPEG、PNG 或 WebP URL;体验区可直接上传最大 15 MB 的文件。
LTX 2.5 Pro 图生视频会加声音吗?
会,generate_audio 默认为 true;设为 false 输出静音视频。



