LTX 2.5 Fast API
lightricks/ltx-2.5-fast/text-to-videoLTX 2.5 Fast API 将一段提示词生成 6–20 秒、自带同步声音的视频,支持 720p、1080p、1440p 和 4K 以及 24–50 fps。LTX 2.5 Fast 文生视频 18 积分/秒起,并提供运镜预设,方便控制镜头走向。
REST API
快速开始
按三步发起一次 LTX 2.5 Fast Text 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-fast/text-to-video",
"input": {
"prompt": "Golden hour on the open Mongolian steppe. An elderly herder in a deep blue deel and fur-trimmed hat sits on a low wooden stool beside a white ger, drawing a bow across a horse-head fiddle (morin khuur). His weathered fingers press the strings while the wind ripples the long grass and lifts the silk tassel on the fiddle's scroll. Behind him, two chestnut horses graze and one lifts its head toward the music. Slow cinematic push-in from a medium shot to a close-up of his hands and face, warm low sun, long soft shadows. Audio: a slow, resonant morin khuur melody, steady steppe wind, a horse's soft snort. No text, no logos.",
"duration": 6,
"resolution": "720p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": true,
"camera_motion": "dolly_in"
}
}'获取视频结果
使用返回的 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": "08Y8E2JUSWBEBIG6",
"status": "not_started",
"created_time": "2026-11-25T17:05:24"
}
}{
"code": 200,
"data": {
"task_id": "08Y8E2JUSWBEBIG6",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/lightricks/ltx-2.5-fast/text-to-video/v1/01/output.mp4"
}
],
"created_time": "2026-11-25T17:05:24",
"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-fast/text-to-video",
"input": {
"prompt": "Golden hour on the open Mongolian steppe. An elderly herder in a deep blue deel and fur-trimmed hat sits on a low wooden stool beside a white ger, drawing a bow across a horse-head fiddle (morin khuur). His weathered fingers press the strings while the wind ripples the long grass and lifts the silk tassel on the fiddle's scroll. Behind him, two chestnut horses graze and one lifts its head toward the music. Slow cinematic push-in from a medium shot to a close-up of his hands and face, warm low sun, long soft shadows. Audio: a slow, resonant morin khuur melody, steady steppe wind, a horse's soft snort. No text, no logos.",
"duration": 6,
"resolution": "720p",
"aspect_ratio": "16:9",
"fps": 25,
"generate_audio": true,
"camera_motion": "dolly_in"
}
}
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-fast/text-to-video。 |
| callback_url | string (URL) | 否 | — | 任务进入终态后接收结果的公开 HTTP(S) 回调地址。 |
| input.prompt | string | 是 | — | 描述动作、运镜、光线与声音的文本,最多 5,000 字符。 |
| input.duration | integer | 否 | 6 | 6、8、10、12、14、16、18 或 20 秒;1440p、4k、48/50 fps 时最长 10 秒。 |
| input.resolution | string | 否 | 1080p | 720p、1080p、1440p 或 4k。 |
| input.fps | integer | 否 | 25 | 24、25、48 或 50。 |
| input.aspect_ratio | string | 否 | 16:9 | 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 表示字段无效,或 1440p/4k、48/50 fps 下时长超过 10 秒。
- 轮询间隔建议每 5–10 秒轮询一次,或配置 callback_url 接收推送。
模型规格
| 规格 | 取值 | 说明 |
|---|---|---|
| 模型 | lightricks/ltx-2.5-fast/text-to-video | 异步视频生成公开模型 ID。 |
| 分辨率 | 720p | 1080p | 1440p | 4k | 默认 1080p。 |
| 时长 | 6–20 秒(偶数秒) | 默认 6 秒;1440p、4k 或 48/50 fps 时最长 10 秒。 |
| 帧率 | 24 | 25 | 48 | 50 fps | 默认 25 fps。 |
| 计费 | 18 / 26 / 38 / 60 积分/秒 | 720p $0.09/s、1080p $0.13/s、1440p $0.19/s、4k $0.30/s,按输出秒数计费。 |
LTX 2.5 Fast API 常见问题
LTX 2.5 Fast API 是什么?
LTX 2.5 Fast 是 Lightricks LTX-2.5 模型的速度与低成本版本。LTX 2.5 Fast API 根据文本提示词生成 6–20 秒、最高 4K、带同步音频的视频,可用模型 ID lightricks/ltx-2.5-fast/text-to-video 调用,也可在上方体验区直接试用。
LTX 2.5 Fast API 多少钱?
按输出秒计费:720p 18 积分($0.09),1080p 26 积分($0.13),1440p 38 积分($0.19),4K 60 积分($0.30)。1080p 6 秒视频为 156 积分($0.78)。
LTX 2.5 Fast API 视频最长多少秒?
720p 或 1080p 且 24/25 fps 时为 6–20 秒偶数秒;1440p、4K、48 fps 或 50 fps 时最长 10 秒。
LTX 2.5 Fast API 会生成声音吗?
会。generate_audio 默认为 true,自动生成与画面匹配的声音;设为 false 即输出静音视频。
LTX 2.5 Fast API 支持哪些运镜?
dolly_in、dolly_out、dolly_left、dolly_right、jib_up、jib_down、static 和 focus_shift;留空则由模型自行决定。
LTX 2.5 Fast 文生视频支持哪些画幅?
16:9(默认)、9:16 或 auto。
LTX 2.5 Fast 和 LTX 2.5 Pro 有什么区别?
Lightricks 将 Fast 定位为速度与低成本,Pro 定位为更高保真度。在 Vidgo 上,Fast 支持 6–20 秒、最高 4K,18 积分/秒起;Pro 支持 6–10 秒、720p 或 1080p,24 积分/秒起。



