跳转到内容

LTX 2.3 Quality · Inpaint

集成

模型 id ltx-2.3-quality/inpaint
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ltx-2.3-quality/inpaint?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",
    "mask_video_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

与示例类似的文件: $0.27 270 API 积分 运行前会测量你的文件 在此页面运行

获取 API 密钥
Lightricks · 视频

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填

指定蒙版区域内要生成内容的文本。

•必填 video_url
拖放文件,或

用于修复的源视频。

•必填
拖放文件,或

视频蒙版:黑色区域保留源内容,白色区域标记要重新生成的内容。

默认 121

生成输出的帧数。

高级 negative_prompt · video_quality · video_write_mode · video_strength · frames_per_second · num_inference_steps · guidance_scale · seed · enable_prompt_expansion · enable_safety_checker
默认 color distortion, ove...

指定生成应避免内容的负面提示词。

video_quality 默认 high

应用于输出视频的质量预设。

video_write_mode 默认 balanced

结果视频的写入模式。

默认 1

调整 IC-LoRA 视频引导的强度,以控制保留内容中源视频结构的保留程度;提高该强度可增强保留效果。

默认 24

输出视频帧率,以每秒帧数为单位。

默认 15

设置运行的推理步骤数,最多 30;保持不变时使用 15。

默认 1

使用此比例调整 classifier-free guidance;其默认调校兼顾高质量和快速生成。

使生成结果可复现的种子。设置为 None 时会随机选择种子。

POST /run/ltx-2.3-quality/inpaint?wait=20 报价 → $0.27
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/ltx-2.3-quality/inpaint?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",
    "mask_video_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 LTX 2.3 Quality · Inpaint

编辑视频的一部分。提供 `video_url`、`mask_video_url` 和描述新内容的 `prompt`;蒙版中的白色区域会重新生成,黑色区域会保留。`video_strength`(0 到 1)控制源视频结构的保留程度。`num_frames` 范围为 9 到 481,帧率为 1 到 60 fps。

参数

发送规范名称或原生名称之一,不要同时发送两者。 规范名称

名称类型 默认值允许值 描述
prompt必填
类型string
指定蒙版区域内要生成内容的文本。
video_url必填 video
类型url · video
用于修复的源视频。
mask_video_url必填
类型url · video
视频蒙版:黑色区域保留源内容,白色区域标记要重新生成的内容。
video_strength可选
类型number
默认值1
0 – 1
调整 IC-LoRA 视频引导的强度,以控制保留内容中源视频结构的保留程度;提高该强度可增强保留效果。
num_frames可选
类型integer
默认值121
9 – 481
生成输出的帧数。
frames_per_second可选
类型number
默认值24
1 – 60
输出视频帧率,以每秒帧数为单位。
num_inference_steps可选
类型integer
默认值15
8 – 30
设置运行的推理步骤数,最多 30;保持不变时使用 15。
guidance_scale可选
类型number
默认值1
1 – 20
使用此比例调整 classifier-free guidance;其默认调校兼顾高质量和快速生成。
generate_audio可选
类型boolean
默认值true
返回 MP4 的音轨开关:关闭时生成仅包含视频的文件,开启时包含音频。
negative_prompt可选
类型string
默认值color distortion, overexposure, static, blurry details, subtitles, style, artwork, painting, frame, still, dim overall tone, worst quality, low quality, JPEG compression artifacts, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn face, deformed, disfigured, malformed limbs, fused fingers, motionless frame, cluttered background, three legs, crowded background, walking backwards
指定生成应避免内容的负面提示词。
seed可选
类型integer | null
使生成结果可复现的种子。设置为 None 时会随机选择种子。
enable_prompt_expansion可选
类型boolean
默认值true
控制是否启用提示词扩展。
enable_safety_checker可选
类型boolean
默认值true
控制是否启用安全检查。
video_quality可选
类型enum
默认值high
lowmediumhighmaximum
应用于输出视频的质量预设。
video_write_mode可选
类型enum
默认值balanced
fastbalancedsmall
结果视频的写入模式。
必填 规范名称,也可接受

文件参数接受公开的 https:// URL、最大 10 MB 的 data: URI,或上传文件的 file_url。 文件

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "ltx-2.3-quality/inpaint",
  "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": 270,
    "usd": "0.27",
    "charged": 270,
    "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",
    "mask_video_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "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
    },
    "seed": 42,
    "prompt": "string"
  },
  "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/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}模型生成的视频。
seed
integer生成期间实际使用的种子。
prompt
string生成提示词,包括使用前应用的任何扩展内容。

更多模型:视频转换

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/ltx-2.3-quality/inpaint.md. 所有模型和指南: https://doitong.com/developers/llms.txt