Mage API · 影片模型

LTX Video API

適合快速反覆調整的開放權重影片模型

取得 API 金鑰在試玩區試用 LTX Video
POST https://api.mage.space/v1/ltx_video/generate

重點速覽

LTX Video API 可透過 Mage 以 POST https://api.mage.space/v1/ltx_video/generate 執行 LTX Video 及另外 1 個版本。以預設設定發出請求需要 20 Gems(約 $0.02),無需訂閱。LTX Video 不支援 @handle 提及。

總覽

LTX Video API 能做什麼

快速的開放權重影片模型,適合低成本、快速地反覆調整。可使用文字或起始幀,最高 720p,提供 Distilled 和 Dev 版本。

快速的開放權重影片模型,適合低成本反覆調整,提供 Distilled 和 Dev 版本,可從文字或起始幀生成。

接受 first_image 作為輸入。

快速開始

呼叫 LTX Video API

設定 MAGE_API_KEY,向 /ltx_video/generate 提交請求,然後輪詢 status_url,直到請求完成。

cURL
STATUS_URL=$(curl --request POST 'https://api.mage.space/v1/ltx_video/generate' \
  --header "Authorization: Bearer $MAGE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
  "aspect_ratio": "3:2",
  "model_id": "ltx-video-096-distilled"
}' | jq -r '.status_url')

# Repeat until status is "completed"; result.url is the file
curl "$STATUS_URL" --header "Authorization: Bearer $MAGE_API_KEY"
TypeScript
// npm install @mage-space/sdk
import Mage from '@mage-space/sdk';

const mage = new Mage(); // reads MAGE_API_KEY

const request = await mage.run('ltx_video', {
  prompt: 'A slow push-in on a lighthouse at dusk, waves breaking below',
  aspect_ratio: '3:2',
  model_id: 'ltx-video-096-distilled',
});

console.log(request.result.url);
Python
# pip install mage-space
from mage_space import Mage

mage = Mage()  # reads MAGE_API_KEY

request = mage.run("ltx_video", {
    "prompt": "A slow push-in on a lighthouse at dusk, waves breaking below",
    "aspect_ratio": "3:2",
    "model_id": "ltx-video-096-distilled",
})

print(request["result"]["url"])

模型

LTX Video 的 model_id 值

傳入 model_id 即可選擇版本。未指定時,請求會使用預設版本。

model_id名稱預設
ltx-video-096-distilledLTX Video是
ltx-video-096-devLTX Video

選項

LTX Video 參數

以下為所有版本可接受的值;個別版本可能提供較少選項。各版本的選項請參閱文件。

欄位可用值
aspect_ratio21:9, 16:9, 3:2, 5:4, 1:1, 4:5, 2:3, 9:16, 9:21
resolution240p, 360p, 480p, 720p

輸入

LTX Video 接受的媒體輸入

每個輸入可使用 https URL、data URL,或上傳最大 100 MB 的檔案。

欄位用途
first_image第一格畫面的圖片。

更多影片模型

Mage 上的其他影片生成 API

影片 · 147 Gems 起

Melon API

讓動漫動起來,可選配音訊

影片 · 30 Gems 起

MiniMax-H3 API

快速的開放影片模型,支援立體聲

影片 · 每次 338 Gems 起

Plum API

每個片段都有聲音,最高支援 2K

影片 · 360 Gems 起

Raspberry API

從第一個影格讓角色動起來

影片 · 40 Gems 起

Wan Video v2.2 API

開放權重影片模型,提供 Lightning 版本

影片 · 189 Gems 起

Berry API

忠實呈現你的參考素材的影片

常見問題

常見問題

LTX Video API 的費用是多少?

以預設設定(LTX Video)發出一次 LTX Video 請求需要 20 Gems,約 $0.02。其他解析度、時長和版本會改變價格,實際扣款金額會顯示在回應中。生成失敗會退還 Gems;若因違反 Mage 的內容政策而被攔截,則不會退還。

LTX Video API 的端點是什麼?

使用 POST 請求 https://api.mage.space/v1/ltx_video/generate,並在 Authorization: Bearer 標頭中帶入你的 Mage API 金鑰。回應會包含 status_url,可用來輪詢取得結果。

我可以呼叫哪些 LTX Video 模型?

ltx-video-096-distilled、ltx-video-096-dev。預設為 LTX Video。

LTX Video 支援參考圖片或角色嗎?

LTX Video 接受 first_image。LTX Video 不支援 @handle 提及。

我可以在 Claude 或 ChatGPT 中使用 LTX Video 嗎?

可以。將 Mage MCP 伺服器連接到 Claude、ChatGPT、Claude Code、Grok 或 Cursor,然後直接指名要使用 LTX Video。你的助理會透過 get_model 讀取可用選項,並在生成前告知價格。

LTX Video 的生成結果會保留多久?

結果與輸入內容會保存 30 天。想留存的內容,請自行下載到你的儲存空間。

開始使用 Mage 打造你的作品

一個帳號、一份 Gems 餘額,通用所有模型。只需為你生成的內容付費。

取得 API 金鑰在試玩區試用 LTX Video

相關內容