
AI Media Creator
Create AI images and videos in one unified workspace
Animate a still image with the Magi 2 API by Sand AI on Flaq AI. Describe camera or subject movement and add an optional final frame to guide a 4–30s clip. Sound is optional.
// 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"
| Parameters | Price | Original Price | Discount |
|---|
Sand AI Magi 2 Image-to-Video API animates a required starting image into a coherent video clip with synchronized audio on Flaq AI. Guide how the shot unfolds using a natural-language prompt, add an optional ending image to steer the final composition, and choose the output duration and framing. It is designed for product showcases, character motion, campaign transitions, and automated visual pipelines.
Note A starting image and an explicit output duration are required for every request, and providing an ending frame also requires the starting frame. Both images must be publicly accessible HTTPS URLs. Usage is billed per second based on the requested clip duration, and all images and prompts must follow Sand AI's content safety guidelines.
Magi 2 Image-to-Video vs. Magi 2 Text-to-Video
Text-to-Video generates entirely from written descriptions, whereas Image-to-Video anchors the opening composition to a required starting image and optionally guides the ending with a final frame.
Magi 2 Image-to-Video vs. Magi 2 Reference-to-Video
Image-to-Video focuses on animating a required first frame and optional last frame. Reference-to-Video supports optional sets of images, video clips, and audio tracks for broader multimodal direction.
Magi 2 Image-to-Video vs. Seedance 2.5 Image-to-Video
Seedance 2.5 Image-to-Video supports selectable output resolution tiers while deriving framing from the starting frame. Magi 2 Image-to-Video exposes selectable aspect ratios alongside first-and-last-frame guidance and optional synchronized sound.
Magi 2 Image-to-Video vs. Kling 4.0 Image-to-Video
Kling 4.0 Image-to-Video supports selectable 720p or 1080p output resolution and ordered intermediate frames alongside an optional ending frame. Magi 2 Image-to-Video focuses on first-frame and optional end-frame animation with selectable aspect ratios and optional native synchronized audio on Flaq AI.
Live parameters, supported inputs, and capabilities for Magi 2 Image to Video on Flaq AI.
Try the model in the Playground before making an API request.
Use one credit balance across video, image, LLM, voice, and 3D models. Purchased credits never expire. If a task fails due to a system error, your balance is not deducted.
Copy the model ID below into your API request for Magi 2 Image to Video.
Explore other models from Sand AI and check their supported inputs and pricing.
Everything you need to know about capabilities, pricing, failed tasks, and API usage.
Animate a still image with the Magi 2 API by Sand AI on Flaq AI. Describe camera or subject movement and add an optional final frame to guide a 4–30s clip. Sound is optional.
Supported tasks: Image To Video. Available inputs and settings include Duration, Aspect Ratio, Start Frame, End Frame. See the specifications for their supported values.
Billing model: Per second. The pricing table above lists rates and the settings that determine which rate applies.
If a task fails due to a system error, your balance will not be deducted.
Use magi-2-image-to-video as the model ID in your request. Refer to the API documentation for authentication and request details.
Other models include Magi 2 Text to Video, Magi 2 Reference to Video. Compare their supported inputs, output settings, and pricing on their model pages.
Purchased credits do not expire. Commercial use of outputs is subject to Flaq AI’s terms of service and the applicable model provider’s terms.
Explore several AI creation tools for quick image and video workflows in your browser, then scale successful ideas with Flaq AI's production-ready model APIs. Flaq AI provides a unified API layer for all models, making it easy to use and scale your workflows.

Create AI images and videos in one unified workspace
Open your agent workspace and pick up a conversation

Build visual AI image and video workflows on an infinite canvas

Create consistent videos from reference media

Create AI images from text prompts

Create AI images from images and text prompts

Create AI videos from text prompts

Animate images into AI videos