LTX-2.3 22B · Image to Video
整合
模型 id
ltx-2.3-22b/image-to-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/image-to-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",
"image": "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.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/image-to-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",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
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",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# 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/image-to-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-TW/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/image-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
}
透過 Doitong API 呼叫 LTX-2.3 22B · Image to Video 模型(ltx-2.3-22b/image-to-video)。代理程式文件:https://doitong.com/zh-TW/developers/models/ltx-2.3-22b/image-to-video.md
POST https://api.doitong.ru/v1/run/ltx-2.3-22b/image-to-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",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}
如果回應狀態為 "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/image-to-video,可在執行前取得確切價格。
像範例一樣的檔案: $0.204 204 API 點數 · ≈ ₽21.89 您的檔案會在執行前計量 在此頁面執行
您的新 API 金鑰。 僅會在此時顯示,且已填入下方的程式碼與 API 金鑰欄位。請妥善保密:切勿將其放入在瀏覽器中執行的程式碼。
建立請求
控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。
POST
/run/ltx-2.3-22b/image-to-video?wait=20
報價 → $0.204
# 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/image-to-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",
"image": "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.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/image-to-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",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
}),
});
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",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
}
# 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/image-to-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/image-to-video",
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
},
"wait_seconds": 20
}
}
}
關於 LTX-2.3 22B · Image to Video
需要提供 `prompt` 和 `image_url`,後者會作為起始影格。選填的 `end_image_url` 可固定最終影格。`num_frames` 可設定為 9 到 481,`fps` 可設定為 1 到 60,而 `video_size` 預設為 auto。支援 `generate_audio`、`camera_lora` 鏡頭運動,以及輸出為 mp4、webm、mov 或 GIF。
參數
請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱
名稱類型
預設值允許值
說明
prompt必填
類型string
用於引導生成的提示詞。
image_url必填
image
類型url · image
用於生成影片的來源圖像 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 時,較小的初步影片會引導第二次生成,其尺寸會達到或超過要求的尺寸。
fps選填
類型number
預設值24
1 – 60
輸出影片影格率,以每秒影格數表示。
num_inference_steps選填
類型integer
預設值40
8 – 50
執行的推論步驟數。
video_cfg_scale選填
類型number
預設值3
1 – 20
影片引導設定:提高此值可讓生成內容更一致、更聚焦。使用無分類器引導(CFG)。
video_stg_scale選填
類型number
預設值0
0 – 20
透過時空引導(STG)尺度控制影片的一致性與焦點;提高設定值可增強兩者。
video_rescaling_scale選填
類型number
預設值0.7
0 – 1
影片重新縮放調整,以比例平衡無分類器引導與時空引導。
video_modality_scale選填
類型number
預設值3
0 – 10
影片模態調整,以比例平衡影片與音訊的貢獻。
audio_cfg_scale選填
類型number
預設值7
1 – 20
音訊引導設定:提高此值可讓生成內容更一致、更聚焦。使用無分類器引導(CFG)。
audio_stg_scale選填
類型number
預設值0
0 – 20
透過時空引導(STG)尺度控制音訊的一致性與焦點;提高設定值可增強兩者。
audio_rescaling_scale選填
類型number
預設值0.7
0 – 1
音訊重新縮放調整,以比例平衡無分類器引導與時空引導。
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
控制第一輪蒸餾 LoRA 縮放,設為 0 可關閉。
distill_lora_second_pass_scale選填
類型number
預設值0.5
0 – 1
控制第一輪之後每一輪的蒸餾 LoRA 縮放。
interpolation_direction選填
類型enum
預設值forward
forwardbackward
圖像序列的插值方向。'Forward' 從起始圖像移向結束圖像;'Backward' 反轉順序。
image_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/image-to-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": 204,
"usd": "0.204",
"charged": 204,
"refunded": 0
},
"input": {
"prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field",
"image_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,
"width": 1024,
"height": 768,
"fps": 1.0,
"duration": 5,
"num_frames": 1
},
"seed": 42,
"prompt": "Continue the scene naturally, maintaining the same style and motion."
},
"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-TW/developers/models/ltx-2.3-22b/image-to-video.md. 所有模型與指南: https://doitong.com/developers/llms.txt