MAGI-2 API
Generate 4 to 30 seconds of 1080p video with synchronized sound from text, a first and last frame, or image, video and audio references, through the imageat video API.
Transparent pricing
One rate for every mode
$0.16 per generated second at 1080p, with sound. References are free, and text, image, frame and reference requests all cost the same. API requests are billed in USD; studio generations use 3 credits per second.
5-second video
Social clip
$0.80
Studio: 15 credits
10-second video
Ad spot
$1.60
Studio: 30 credits
30-second video
Longest take
$4.80
Studio: 90 credits
Failed generations are not charged.
Text, image or frames
Use only a prompt, add imageUrl for a first frame, or set firstFrameUrl and lastFrameUrl to plan where the shot ends.
Video references
Copy a camera move or motion from up to 5 reference clips while up to 10 images keep faces, products and places consistent.
Sound in the same pass
Dialogue, ambience and effects are generated with the picture. Add up to 5 audio references to steer a voice or sound.
Quickstart
Your first request
Keep the API key on your server. Submit JSON, save the returned task and generation IDs, then poll the status endpoint. A 1080p clip usually takes a few minutes.
POST /api/v1/videos
GET /api/v1/videos/status?taskId=…
curl -X POST "https://imageat.com/api/v1/videos" \
-H "Authorization: Bearer $IMAGEAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi2",
"prompt": "At blue hour a red fox pauses on a fallen birch in a misty forest, then trots toward the camera. Slow dolly-in. Natural forest ambience, no music.",
"duration": "8s",
"aspectRatio": "16:9"
}'curl -X POST "https://imageat.com/api/v1/videos" \
-H "Authorization: Bearer $IMAGEAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "magi2",
"prompt": "The woman from image 1 walks through a neon night market, matching the camera move of the reference video. Street ambience, no music.",
"referenceImageUrls": ["https://example.com/woman.jpg"],
"referenceVideoUrls": ["https://example.com/camera-move.mp4"],
"duration": "10s",
"aspectRatio": "9:16"
}'Request parameters
| Parameter | Required | Values | Description |
|---|---|---|---|
| model | Yes | magi2 | Selects MAGI-2. |
| prompt | Yes | up to 15,000 characters | Subject, action, camera and sound. Name your references in the prompt (image 1, the reference video). |
| duration | No | 4s–30s | Any whole second. Defaults to 5 seconds. Billed per requested second. |
| aspectRatio | No | 16:9, 9:16, 1:1, 4:3, 3:4, 21:9 | Text and reference modes. Image-to-video follows the first frame's shape. |
| imageUrl | No | public URL | Activates image-to-video; the image is the first frame. |
| firstFrameUrl + lastFrameUrl | No | public URLs | Activates first-to-last-frame generation for a planned transition. |
| referenceImageUrls | No | up to 10 public URLs | Characters, products, style or scenes to keep. |
| referenceVideoUrls | No | up to 5 public URLs | Motion and camera references, 2–30s each, 30s combined. |
| referenceAudioUrls | No | up to 5 public URLs | Voice or sound references, 2–30s each, 30s combined. |
The mode follows the fields you send: first and last frame, then references, then imageUrl, otherwise text. Output is always 1080p MP4 with audio, so resolution and generateAudio are ignored.
Polling response
{
"status": "completed",
"url": "https://cdn.imageat.com/generated/video.mp4"
}Production checklist
- Store IMAGEAT_API_KEY only on your server.
- Persist taskId and generationId before polling.
- Poll every 10–15 seconds; long 1080p takes need several minutes.
- Pass a webhook_url to be notified instead of polling.
- Treat the returned CDN URL as the final MP4 output.
Looking for examples and prompting tips? See the MAGI-2 video generator page.
Ready to build with MAGI-2?
Your existing imageat API key and balance work here.