Skip to navigation

Generate Video

Video endpoints turn a prompt, a first frame or a set of references into a video clip. Every video request runs asynchronously: it returns a generation_id straight away, and you collect the video by polling or through a webhook.

Choose how to start

Start fromEndpointsUse it when
A promptseedance-2-5-text-to-video, seedance-2-text-to-video, kling-3-standard-text-to-video, minimax-h3-text-to-videoYou describe the whole clip in words
A first frameseedance-2-5-image-to-video, seedance-2-image-to-video, kling-3-standard-image-to-video, minimax-h3-image-to-videoYou have the opening image, for example a product shot made with Ideogram 4.5. Add end_image to set the last frame too
Referencesseedance-2-5-reference-to-video, seedance-2-reference-to-video, minimax-h3-reference-to-videoThe clip should feature people, products or places from images, or follow reference audio
Frames and referenceskling-4You want up to 10 frames in timeline order, up to 10 reference_images, or both

All of them are POST /v2/video/generate/{endpoint}. Choose a model compares their lengths and inputs.

Write the prompt

Describe the motion, the camera and how the shot changes over time, not only what is in the frame. In reference to video and Kling 4.0, refer to each reference by its position, as in [Image1] walks toward the camera for Seedance and Kling, or Image 1 walks toward the camera for MiniMax H3.

The longest prompt each model takes:

ModelMaximum prompt length
Seedance 2.5 and 2.030,000 characters
Kling 4.011,000 characters
Kling v3 Standard2,000 characters
MiniMax H32,000 characters

Set length, size and audio

SettingWhat it does
durationLength in seconds. Seedance picks a length for the prompt when you leave it out; Kling v3 Standard defaults to 5, Kling 4.0 to 10 and MiniMax H3 to 5
resolutionSeedance 2.5: 480p, 720p (default) or 1080p. Seedance 2.0: 480p or 720p. Kling 4.0: 720p or 1080p (default). MiniMax H3: 480P and 768P natively, 2K (default) and 4K upscaled from 768P
aspect_ratioThe frame shape, such as 16x9, 9x16 or 1x1. Seedance 2.0, and Seedance 2.5 text and reference to video, also accept auto, which lets the model choose. Seedance 2.5, Kling v3 Standard and MiniMax H3 image to video have no aspect_ratio field
generate_audioAdds a soundtrack on Seedance and Kling v3 Standard. Off by default. Audio roughly doubles the provider cost, and its output moderation is stricter

Each endpoint’s reference lists its exact values.

Submit and collect the video

import os
import time
import requests
API = "https://api.ideogram.ai"
HEADERS = {"Api-Key": os.environ["IDEOGRAM_API_KEY"]}
response = requests.post(
f"{API}/v2/video/generate/seedance-2-5-text-to-video",
headers=HEADERS,
json={
"prompt": "A slow dolly shot across a ceramic studio at golden hour, dust drifting in the light",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16x9",
},
timeout=30,
)
response.raise_for_status()
generation_id = response.json()["generation_id"] # store it before you wait
deadline = time.monotonic() + 15 * 60
while time.monotonic() < deadline:
generation = requests.get(f"{API}/v2/generations/{generation_id}", headers=HEADERS, timeout=30).json()
if generation["status"] != "pending":
break
time.sleep(10)
if generation["status"] == "completed":
video = generation["data"][0] # object_type "video.generation"
with open("studio.mp4", "wb") as file:
file.write(requests.get(video["url"], timeout=120).content)
else:
print(generation["status"], generation.get("failure_reason"))

A completed video’s result has an object_type of video.generation, with url, asset_id, prompt, resolution, aspect_ratio and duration. The link expires after 24 hours, so download the file. If your deadline passes while the status is still pending, keep the generation_id and check again later instead of sending the request again: a second request is a second, billed video. See Idempotency and safe retries.

Videos take longer than images, so in production prefer a webhook and keep polling as a fallback. Build a reliable production integration walks through the whole lifecycle.

What a video costs

Video is billed per second of output at the provider’s list rate, so the price depends on the model, duration, resolution and audio. Add dry_run=true to the request to get its price without running it:

curl -X POST "https://api.ideogram.ai/v2/video/generate/seedance-2-5-text-to-video?dry_run=true" \
-H "Api-Key: $IDEOGRAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A slow dolly shot across a ceramic studio", "duration": 5, "resolution": "720p"}'

See Price quotes for the response and API pricing for every rate.

When a video fails

A failed generation has status: failed and a failure_reason, such as content_policy_violation, and it isn’t billed. A prompt that fails the safety check before the video starts returns 422 and isn’t billed either. See Errors and billing.

In the app

The Ideogram app makes video from the same models without code. See Create Videos in the user guide.