
AIメディアクリエイター
1つの統合ワークスペースでAI画像と動画を作成
Flaq AIでSand AIのMagi 2 APIを使い、静止画に動きを付けられます。ショットの動きを説明し、必要に応じて終了フレームを追加して変化を指定できます。長さは4〜30秒です。
// Step 1: Submit generation request
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: 'magi-2-image-to-video',
prompt: 'The camera slowly pulls back to reveal a waterfall and the forest around it',
duration: 8,
aspect_ratio: '16:9',
sound: false,
image_url: 'https://example.com/first-frame.jpg',
image_end_url: 'https://example.com/last-frame.jpg'
})
});
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, 10000));
}
# Step 1: Submit generation request
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': 'magi-2-image-to-video',
'prompt': 'The camera slowly pulls back to reveal a waterfall and the forest around it',
'duration': 8,
'aspect_ratio': '16:9',
'sound': False,
'image_url': 'https://example.com/first-frame.jpg',
'image_end_url': 'https://example.com/last-frame.jpg'
}
)
result = response.json()
task_id = result['data']['task_id']
# 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)
# Step 1: Submit generation request
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": "magi-2-image-to-video",
"prompt": "The camera slowly pulls back to reveal a waterfall and the forest around it",
"duration": 8,
"aspect_ratio": "16:9",
"sound": false,
"image_url": "https://example.com/first-frame.jpg",
"image_end_url": "https://example.com/last-frame.jpg"
}'
# 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"
| パラメータ | 料金 | 元の料金 | 割引 |
|---|
Flaq AI で利用できる Sand AI Magi 2 Image-to-Video API は、必須の開始画像を基に、一貫した動きと同期音声のある動画クリップを生成します。自然言語のプロンプトでショットの展開を指示し、必要に応じて終了画像で最後の構図を指定して、尺と画面比率を選びます。商品紹介、キャラクターの動き、キャンペーン映像の場面転換、ビジュアル制作の自動化に適しています。
注意 リクエストごとに開始画像と出力の尺を指定してください。終了フレームを渡す場合も開始フレームは必須です。どちらの画像も、一般にアクセス可能な HTTPS URL で指定する必要があります。指定した秒数に応じて課金されます。すべての画像とプロンプトは Sand AI のコンテンツ安全ガイドラインに従ってください。
Magi 2 Image-to-Video と Magi 2 Text-to-Video
Text-to-Video は文章だけで動画を生成します。Image-to-Video は必須の開始画像で冒頭の構図を決め、任意の終了フレームで最後の構図も指定できます。
Magi 2 Image-to-Video と Magi 2 Reference-to-Video
Image-to-Video は、必須の開始フレームと任意の終了フレームを使ったアニメーションが中心です。Reference-to-Video は、画像、動画クリップ、音声トラックを任意で組み合わせ、複数の種類の素材で演出を指定できます。
Magi 2 Image-to-Video と Seedance 2.5 Image-to-Video
Seedance 2.5 Image-to-Video は出力解像度を複数段階から選択でき、画面比率は開始フレームに基づきます。Magi 2 Image-to-Video は画面比率を選択でき、開始・終了フレームでの誘導や、映像に同期する音声の生成にも対応します。
Magi 2 Image-to-Video と Kling 4.0 Image-to-Video
Kling 4.0 Image-to-Video は 720p と 1080p の出力に対応し、任意の終了フレームに加えて、順序を指定した中間フレームを使用できます。Flaq AI の Magi 2 Image-to-Video は、開始フレームと任意の終了フレームを使ったアニメーションを中心に、画面比率の選択と任意の同期音声生成に対応します。
Flaq AIでのMagi 2 Image to Videoの最新パラメータ、対応入力、機能。
APIリクエストの前に、Playgroundでモデルを試してください。
下のモデルIDを、Magi 2 Image to VideoのAPIリクエストにコピーしてください。
Flaq AIでSand AIのMagi 2 APIを使い、静止画に動きを付けられます。ショットの動きを説明し、必要に応じて終了フレームを追加して変化を指定できます。長さは4〜30秒です。
対応タスクは画像から動画です。利用可能な入力と設定には長さ, アスペクト比, 開始フレーム, 終了フレームがあります。対応する値は仕様をご確認ください。
課金方式は秒あたりです。上の料金表に、単価と適用単価を決める設定が記載されています。
システムエラーでタスクが失敗した場合、残高は差し引かれません。
リクエストのモデルIDにmagi-2-image-to-videoを指定してください。認証とリクエストの詳細はAPIドキュメントをご覧ください。
ほかのモデルにはMagi 2 Text to Video, Magi 2 Reference to Videoがあります。各モデルのページで、対応入力、出力設定、料金を比較できます。
購入したクレジットに有効期限はありません。生成結果の商用利用には、Flaq AIの利用規約と該当するモデル提供元の規約が適用されます。
ブラウザで画像と動画のクイックワークフロー向けAI制作ツールを複数試し、成功したアイデアをFlaq AIの本番対応モデルAPIで拡張できます。Flaq AIはすべてのモデルに統合APIレイヤーを提供し、ワークフローを簡単に利用・拡張できます。