- サードパーティ
Lightricks LTX-2.5 Fast は、テキストから動画、画像から動画のワークフロー向けの高速な動画生成モデルです。同期した音声に加え、長さ、解像度、フレームレートを設定できます。
| モデル情報 | |
|---|---|
| 詳細情報 | リンク ↗ |
| 料金 | Cloudflare ダッシュボードで料金を見る ↗ |
const response = await env.AI.run(
'lightricks/ltx-2-5-fast',
{
prompt: 'A cinematic aerial shot of ocean waves at sunset',
duration: 8,
resolution: '1920x1080',
fps: 24,
generate_audio: true,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "lightricks/ltx-2-5-fast",
"input": {
"prompt": "A cinematic aerial shot of ocean waves at sunset",
"duration": 8,
"resolution": "1920x1080",
"fps": 24,
"generate_audio": true
}
}'{
"state": "Completed",
"result": {
"video": "https://examples.aig.cloudflare.com/lightricks/ltx-2-5-fast/text-to-video.mp4"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}画像から動画 — 最終フレーム付きで参照画像をアニメーション化します
const response = await env.AI.run(
'lightricks/ltx-2-5-fast',
{
prompt: 'The camera moves forward while the trees sway in the wind',
image_uri:
'https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_%28cropped%29.jpg',
last_frame_uri:
'https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_%28cropped%29.jpg',
duration: 8,
resolution: '1920x1080',
fps: 24,
generate_audio: true,
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "lightricks/ltx-2-5-fast",
"input": {
"prompt": "The camera moves forward while the trees sway in the wind",
"image_uri": "https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_%28cropped%29.jpg",
"last_frame_uri": "https://upload.wikimedia.org/wikipedia/commons/8/85/Tour_Eiffel_Wikimedia_Commons_%28cropped%29.jpg",
"duration": 8,
"resolution": "1920x1080",
"fps": 24,
"generate_audio": true
}
}'{
"state": "Completed",
"result": {
"video": "https://examples.aig.cloudflare.com/lightricks/ltx-2-5-fast/image-to-video.mp4"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}prompt
string必須minLength: 1maxLength: 10000動画を説明するテキストプロンプトですimage_uri
stringformat: uri最初のフレームの HTTPS URI ですlast_frame_uri
stringformat: uri最後のフレームの HTTPS URI です▶duration
いずれか必須resolution
string必須デフォルト: 1920x1080enum: 1280x720, 720x1280, 1920x1080, 1080x1920, 2560x1440, 1440x2560, 3840x2160, 2160x3840▶fps
いずれか必須generate_audio
boolean必須デフォルト: truevideo
stringformat: uri生成された動画の URL です