
テキストから画像
テキストプロンプトからAI画像を作成
Google Gemini Omni 1.2 Flash API で動画を修正できます。シーンや照明の変更を記述し、元のクリップの長さと画面構成を保てます。3〜10秒の元動画を使い、解像度を最大4Kまで選べます。
Best Image AI の Gemini Omni 1.2 Flash Video Edit API は、既存の動画とテキストの指示から編集版を生成します。 文章で指示を出し、元のシーンの変更案を試せます。開発者はこの機能を使って、 制作アプリやレビュー工程に、指示に基づく動画の修正を組み込めます。
プロンプトによる動画の修正: 既存の映像に編集内容を文章で指示し、 シーンの修正版を作成できます。
シーンの見た目を変更: 自然言語で指示を出し、 背景、照明、天候の変更を依頼できます。
元の形式を維持した編集: 元の動画の長さとアスペクト比を保ちながら映像の内容を修正できます。
入力: 短い元動画と、編集内容を指定するプロンプトを用意します。動画の長さは提供元が示す最短時間も考慮し、 対応範囲に収めてください。最新の制限は API ドキュメントで確認できます。
編集指示: 変更したい箇所とそのまま残したい要素を明示し、 修正の範囲が伝わるようにします。
出力設定: 出力解像度を選択します。長さとアスペクト比は元の動画によって決まり、 個別には設定できません。
出力: 処理が完了したら、編集済みの動画を取得します。
料金: 選択した出力解像度と元動画の長さに基づいて課金されます。長さは秒単位で四捨五入され、 最低課金時間は3秒です。
短い動画の修正: 社内の動画レビューツールに、プロンプトで修正を依頼する機能を追加できます。
キャンペーン映像の背景案: 既存のキャンペーン映像に別の舞台設定を指定し、 結果が制作要件に合うか確認できます。
商品映像の照明を検討: 短い商品映像の照明を変更するよう指示し、 生成結果を元の映像と比較できます。
制作案の評価: 追加の編集作業を計画する前に、 変更案で意図が伝わるか検証できます。
注意 仕上がりに必要な長さと縦横比で元動画を用意してください。元動画の長さの四捨五入は 料金計算にのみ適用され、実際の出力時間を設定したり延長したりするものではありません。 編集結果を確認し、指示どおりの変更になっているか確かめてください。
Text-to-Video との比較: Video Edit では既存の映像が必要です。Text-to-Video はシーンの説明文から 新しい動画を生成し、長さと画面の向きを指定できます。
Image-to-Video との比較: Image-to-Video は最初の画像を動かし、必要に応じて最後の画像も指定できます。 Video Edit は元動画の全体を編集素材として使用します。
Reference-to-Video との比較: Reference-to-Video は画像や短い参考動画を手がかりに、 新しい動画を生成します。Video Edit は入力した動画自体を編集し、 出力の長さと縦横比はその動画によって決まります。
ブラウザで画像や動画をすばやく制作できる複数のAIクリエイティブツールを試し、成功したアイデアをBest Image AIの本番運用対応モデルAPIでスケールできます。Best Image AIはすべてのモデルに対応する統合APIレイヤーを提供し、ワークフローを簡単に利用・拡張できるようにします。
const response = await fetch('https://api.flaq.ai/api/v1/video/task', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
body: JSON.stringify({
model_name: 'gemini-omni-1.2-flash-video-edit',
prompt: 'A small ball rolls into the scene and captures the attention of the cat',
video_url: 'https://example.com/source-video.mp4',
resolution: '1080p'
})
});
const { data } = await response.json();
const taskId = data.task_id;
// Step 2: Poll for results
const taskId = data.task_id;
const pollResult = async (taskId) => {
const res = await fetch(`https://api.flaq.ai/api/v1/video/${taskId}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
return res.json();
};
while (true) {
const pollResultData = await pollResult(taskId);
const status = pollResultData.data.task_status;
if (status === 'succeed') {
console.log(pollResultData.data.task_result.videos[0].url);
break;
}
if (status === 'failed') {
console.error(pollResultData.data.task_status_msg);
break;
}
await new Promise(resolve => setTimeout(resolve, ));
}
import requests
response = requests.post(
'https://api.flaq.ai/api/v1/video/task',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY'
},
json={
'model_name': 'gemini-omni-1.2-flash-video-edit',
'prompt': 'A small ball rolls into the scene and captures the attention of the cat',
'video_url': 'https://example.com/source-video.mp4',
'resolution': '1080p'
}
)
result = response.json()
task_id = result['data']['task_id']
curl -X POST https://api.flaq.ai/api/v1/video/task \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "gemini-omni-1.2-flash-video-edit",
"prompt": "A small ball rolls into the scene and captures the attention of the cat",
"video_url": "https://example.com/source-video.mp4",
"resolution": "1080p"
}'
# Step 2: Poll for results
# Replace {task_id} with the task_id returned from the submit response
curl -X GET "https://api.flaq.ai/api/v1/video/{task_id}" \
-H "Authorization: Bearer YOUR_API_KEY"
# Step 2: Poll for results
task_id = response.json()['data']['task_id']
poll_url = f"https://api.flaq.ai/api/v1/video/{task_id}"
while True:
poll_result = requests.get(poll_url, headers={'Authorization': 'Bearer YOUR_API_KEY'}).json()
status = poll_result['data']['task_status']
if status == 'succeed':
print(poll_result['data']['task_result']['videos'][0]['url'])
break
if status == 'failed':
print(poll_result['data']['task_status_msg'])
break
time.sleep(10)