LTX 2.3 22B
集成
模型 id
ltx-2.3-22b/reference-video-to-video/lora
# 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/reference-video-to-video/lora?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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}'
# 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/reference-video-to-video/lora?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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}),
});
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",
"loras": [
{
"path": "https://example.com/your-file.safetensors",
},
],
}
# 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/reference-video-to-video/lora", 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/reference-video-to-video/lora",
"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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}
}
通过 Doitong API 调用 LTX 2.3 22B 模型(ltx-2.3-22b/reference-video-to-video/lora)。智能体文档:https://doitong.com/zh/developers/models/ltx-2.3-22b/reference-video-to-video/lora.md
POST https://api.doitong.ru/v1/run/ltx-2.3-22b/reference-video-to-video/lora?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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}
如果响应状态为 "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/reference-video-to-video/lora,可在运行前返回确切价格。
与示例类似的文件: $0.51 510 API 积分 · ≈ ₽54.73 运行前会测量你的文件 在此页面运行
你的新 API 密钥。 它仅在此时显示,并且已填入下方的代码和 API 密钥字段中。请妥善保密:切勿将其放入在浏览器中运行的代码。
构建请求
控件根据模型架构生成。更改控件时,代码和价格会同步更新。
POST
/run/ltx-2.3-22b/reference-video-to-video/lora?wait=20
报价 → $0.51
# 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/reference-video-to-video/lora?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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}'
# 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/reference-video-to-video/lora?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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
}),
});
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",
"loras": [
{
"path": "https://example.com/your-file.safetensors",
},
],
}
# 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/reference-video-to-video/lora", 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/reference-video-to-video/lora",
"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",
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
]
},
"wait_seconds": 20
}
}
}
关于 LTX 2.3 22B
使用参考 `video_url` 和 `prompt`,以及必需的自定义 LoRA 列表 `loras`。可选的 `audio_url` 会覆盖音轨,`image_url` 和 `end_image_url` 设置首帧和末帧。启用 `match_video_length` 时,时长沿用参考视频;否则使用 `num_frames`(9 到 481)。
参数
发送规范名称或原生名称之一,不要同时发送两者。 规范名称
名称类型
默认值允许值
描述
prompt必填
类型string
作为视频生成基础的提示词。
video_url必填
video
类型url · video
用于标识参考视频的 URL。
audio_url可选
audio
类型url · audio
可选的音频 URL,用于提供视频的音轨。省略时,如果源视频包含音频,则使用源视频的音频。
image_url可选
image
类型url · image
可选的图像 URL,用于定义视频的起始帧。
end_image_url可选
end_image
类型url · image
定义视频结束帧的图像 URL。
match_video_length可选
类型boolean
默认值true
帧数选择模式:禁用时使用 `num_frames`,启用时根据 FPS 和视频时长计算帧数。
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
结果视频的写入模式。
loras必填
类型object[]
用于生成的 LoRA 选择。
loras[].path必填
类型string
LoRA 权重位置,以 URL 或 owner/repo 格式的 HuggingFace 仓库 ID 提供。
loras[].weight_name可选
类型string | null
用于在 HuggingFace 仓库的多个权重中进行选择的 LoRA 权重名称;仅包含多个权重的仓库需要此项。除非 `path` 标识 HuggingFace 仓库,否则此设置无效。
loras[].scale可选
类型number
默认值1
0 – 4
应用于 LoRA 的缩放因子,范围为 0.0 到 4.0。
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 缩放值。
video_strength可选
类型number
默认值1
0 – 1
此条件强度控制修改视频内容的自由度:设置越小,模型的发挥空间越大。
audio_strength可选
类型number
默认值1
0 – 1
此条件强度控制修改音频内容的自由度:设置越小,模型的发挥空间越大。
preprocessor可选
类型enum
默认值none
depthcannyposenone
生成期间应用的预处理器。
ic_lora_type可选
类型enum
默认值union
match_preprocessoruniondetailernone
生成期间应用的 IC LoRA 变体。
必填
规范名称,也可接受
文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件
输出
GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
"id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
"object": "request",
"model": "ltx-2.3-22b/reference-video-to-video/lora",
"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": 510,
"usd": "0.51",
"charged": 510,
"refunded": 0
},
"input": {
"loras": [
{
"path": "https://example.com/your-file.safetensors"
}
],
"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": "black-and-white video, a cowboy walks through a dusty town, film grain"
},
"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/reference-video-to-video/lora.md. 所有模型和指南: https://doitong.com/developers/llms.txt