LTX-2.3 22B · Extend Video
集成
模型 id
ltx-2.3-22b/extend-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/ltx-2.3-22b/extend-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/ltx-2.3-22b/extend-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/ltx-2.3-22b/extend-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
# 1. Connect once (Claude Code; Cursor, VS Code, Claude Desktop: https://doitong.com/zh/developers/docs/mcp)
claude mcp add --transport http doitong-models https://api.doitong.ru/v1/mcp \
--header "Authorization: Bearer $DOITONG_API_KEY"
# 2. Your agent calls the "run" tool with:
{
"model_id": "ltx-2.3-22b/extend-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}
}
通过 Doitong API 调用 LTX-2.3 22B · Extend Video 模型(ltx-2.3-22b/extend-video)。智能体文档:https://doitong.com/zh/developers/models/ltx-2.3-22b/extend-video.md
POST https://api.doitong.ru/v1/run/ltx-2.3-22b/extend-video?wait=20
Authorization: Bearer $DOITONG_API_KEY
Content-Type: application/json
{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}
如果响应状态为 "queued" 或 "running",请轮询 GET https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20,直到状态变为 "succeeded";文件位于 outputs[].url。使用相同请求体 POST https://api.doitong.ru/v1/quote/ltx-2.3-22b/extend-video,可在运行前返回确切价格。
与示例类似的文件: $0.18 180 API 积分 · ≈ ₽19.36 运行前会测量你的文件 在此页面运行
你的新 API 密钥。 它仅在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保密:切勿将其放入在浏览器中运行的代码。
构建请求
控件根据模型架构生成。更改控件时,代码和价格会同步更新。
POST
/run/ltx-2.3-22b/extend-video?wait=20
报价 → $0.18
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/ltx-2.3-22b/extend-video?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}'
# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
-H "Authorization: Bearer $DOITONG_API_KEY"
const API = "https://api.doitong.ru/v1";
const headers = {
"Authorization": "Bearer " + process.env.DOITONG_API_KEY,
"Content-Type": "application/json",
};
// Run the model; wait up to 20 s for the finished result in the same call
let res = await fetch(API + "/run/ltx-2.3-22b/extend-video?wait=20", {
method: "POST",
headers,
body: JSON.stringify({
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
}),
});
let request = await res.json();
if (!res.ok) throw new Error(request.error.code + ": " + request.error.message);
// Not finished yet: long-poll until it is
while (request.status === "queued" || request.status === "running") {
res = await fetch(API + "/requests/" + request.id + "?wait=20", { headers });
request = await res.json();
}
if (request.status !== "succeeded") throw new Error(JSON.stringify(request.error));
console.log(request.outputs.map((o) => o.url), request.cost.credits + " API credits ($" + request.cost.usd + ")");
import os
import requests
API = "https://api.doitong.ru/v1"
headers = {"Authorization": "Bearer " + os.environ["DOITONG_API_KEY"]}
payload = {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4",
}
# Run the model; wait up to 20 s for the finished result in the same call
r = requests.post(API + "/run/ltx-2.3-22b/extend-video", params={"wait": 20}, json=payload, headers=headers)
request = r.json()
if not r.ok:
raise RuntimeError(request["error"]["code"] + ": " + request["error"]["message"])
# Not finished yet: long-poll until it is
while request["status"] in ("queued", "running"):
request = requests.get(API + "/requests/" + request["id"], params={"wait": 20}, headers=headers).json()
if request["status"] != "succeeded":
raise RuntimeError(request["error"])
print([o["url"] for o in request["outputs"]], request["cost"]["credits"], "API credits", "$" + request["cost"]["usd"])
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run",
"arguments": {
"model_id": "ltx-2.3-22b/extend-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
},
"wait_seconds": 20
}
}
}
关于 LTX-2.3 22B · Extend Video
接收 `video_url` 和 `prompt`,生成延续视频,帧数为 `num_frames`(9 到 481)。可选的 `end_image_url` 设置延续部分的结束画面。`match_input_fps` 保持源视频帧率,`generate_audio` 添加声音,`video_size` 默认为 auto。输出格式可以是 mp4、webm、mov 或 GIF。
参数
发送规范名称或原生名称之一,不要同时发送两者。 规范名称
名称类型
默认值允许值
描述
prompt必填
类型string
作为视频生成基础的提示词。
video_url必填
video
类型url · video
指向待延长视频的 URL。
end_image_url可选
end_image
类型url · image
通过 URL 提供最后一帧图像,以定义延长视频的结尾。
num_frames可选
类型integer
默认值121
9 – 481
生成输出的帧数。
video_size可选
类型object
默认值auto
autosquare_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成视频的尺寸。
generate_audio可选
类型boolean
默认值true
控制视频是否包含生成的音频。
use_multiscale可选
类型boolean
默认值true
用于提升一致性和细节的多尺度生成开关。为 True 时,较小的初始视频会引导第二次生成,第二次生成的尺寸达到或超过请求尺寸。
match_input_fps可选
类型boolean
默认值true
输出帧率覆盖值;启用时使用源视频的 FPS 替代默认目标 FPS。
fps可选
类型number
默认值24
1 – 60
输出视频帧率,以每秒帧数表示。
num_inference_steps可选
类型integer
默认值40
8 – 50
执行的推理步数。
video_cfg_scale可选
类型number
默认值3
1 – 20
视频引导设置:提高该值可增强生成内容的一致性和聚焦程度。使用 classifier-free guidance (CFG)。
video_stg_scale可选
类型number
默认值0
0 – 20
通过 Spatiotemporal Guidance (STG) 比例控制视频的一致性和聚焦程度;提高该设置可增强两者。
video_rescaling_scale可选
类型number
默认值0.7
0 – 1
视频重缩放调整值,以比例形式平衡 classifier-free guidance 与时空引导。
video_modality_scale可选
类型number
默认值3
0 – 10
视频模态调整值,以比例形式平衡视频和音频的贡献。
audio_cfg_scale可选
类型number
默认值7
1 – 20
音频引导设置:提高该值可增强生成内容的一致性和聚焦程度。使用 classifier-free guidance (CFG)。
audio_stg_scale可选
类型number
默认值0
0 – 20
通过 Spatiotemporal Guidance (STG) 比例控制音频的一致性和聚焦程度;提高该设置可增强两者。
audio_rescaling_scale可选
类型number
默认值0.7
0 – 1
音频重缩放调整值,以比例形式平衡 classifier-free guidance 与时空引导。
audio_modality_scale可选
类型number
默认值3
0 – 10
音频模态调整值,以比例形式平衡视频和音频的贡献。
gradient_estimation_gamma可选
类型number
默认值2
0 – 10
去噪梯度估计设置:0 会关闭估计;否则,该值指定 gamma。
use_restart_sampling可选
类型boolean
默认值false
用于提升视频质量的重启采样开关:启用后会在每个去噪步骤加入少量噪声。
scheduler可选
类型enum
默认值ltx2
ltx2linear_quadraticbeta
调度器选择。
acceleration可选
类型enum
默认值regular
noneregularhighfull
应用于处理的加速级别。
camera_lora可选
类型enum
默认值none
dolly_indolly_outdolly_leftdolly_rightjib_upjib_downstaticnone
摄像机 LoRA 选择,用于比单独使用摄像机运动提示词更精确地控制生成视频中的运动。
camera_lora_scale可选
类型number
默认值1
0 – 1
摄像机 LoRA 强度,用于比单独使用摄像机运动提示词更精确地控制生成视频中的运动。
negative_prompt可选
类型string
默认值news broadcast, 3d animation, computer graphics, pc game, console game, video game, cartoon, childish, watermark, logo, text, on screen text, subtitles, titles, signature, slowmo, static
视频生成期间使用的负面提示词。
seed可选
类型integer | null
用于初始化随机数生成的种子值。
enable_prompt_expansion可选
类型boolean
默认值true
控制是否启用提示词扩展。
enable_safety_checker可选
类型boolean
默认值true
控制是否启用安全检查。
video_output_type可选
类型enum
默认值X264 (.mp4)
X264 (.mp4)VP9 (.webm)PRORES4444 (.mov)GIF (.gif)
结果视频的输出类型。
video_quality可选
类型enum
默认值high
lowmediumhighmaximum
结果视频的质量级别。
video_write_mode可选
类型enum
默认值balanced
fastbalancedsmall
结果视频的写入模式。
distill_lora_first_pass_scale可选
类型number
默认值0.2
0 – 1
控制第一轮 distill LoRA 缩放值,设为 0 可关闭。
distill_lora_second_pass_scale可选
类型number
默认值0.5
0 – 1
控制第一轮之后每一轮的 distill LoRA 缩放值。
extend_direction可选
类型enum
默认值forward
forwardbackward
要延长的视频一侧:选择 'backward' 在开头之前添加内容,或选择 'forward' 在结尾之后添加内容。
num_context_frames可选
类型integer
默认值25
0 – 121
延长视频时用于提供上下文的帧数。
video_strength可选
类型number
默认值1
0 – 1
此条件强度控制修改视频内容的自由度:设置越小,模型的发挥空间越大。
audio_strength可选
类型number
默认值1
0 – 1
此条件强度控制修改音频内容的自由度:设置越小,模型的发挥空间越大。
end_image_strength可选
类型number
默认值1
0 – 1
控制结束图像对生成视频的影响程度。
必填
规范名称,也可接受
文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件
输出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "ltx-2.3-22b/extend-video",
"status": "succeeded",
"created_at": "2026-10-20T12:00:00Z",
"started_at": "2026-10-20T12:00:02Z",
"completed_at": "2026-10-20T12:00:09Z",
"queue_position": null,
"cost": {
"credits": 180,
"usd": "0.18",
"charged": 180,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
},
"output": {
"video": {
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_name": "0-output.mp4",
"file_size": 1843200,
"width": 1024,
"height": 768,
"fps": 1.0,
"duration": 5,
"num_frames": 1
},
"seed": 42,
"prompt": "A woman stands still amid a busy neon-lit street at night. The camera slowly dollies in toward her face as people blur past, their motion emphasizing her calm presence. City lights flicker and reflections shift across her denim jacket."
},
"outputs": [
{
"type": "video",
"url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
"content_type": "video/mp4",
"file_size": 1843200,
"width": 1280,
"height": 720,
"duration": 5,
"stored": true
}
],
"error": null,
"metrics": {
"inference_seconds": 6.8
},
"urls": {
"self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
"cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
}
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
- video
- object {url, content_type, file_name, file_size, width, height, fps, duration, num_frames}模型生成的视频。
- seed
- integer用于初始化随机数生成的种子值。
- prompt
- string用于引导生成的提示词。
其他 LTX 2.3 22b 变体
更多模型:视频转换
对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/ltx-2.3-22b/extend-video.md. 所有模型和指南: https://doitong.com/developers/llms.txt