falImage to videoAvailable now
minimax/h3-max/reference-to-video
minimax/h3-max/reference-to-video is an image to video tool from fal that runs in the background and returns video. Pay as you go from $0.000026 per token, with one API key.
Try itfrom $0.000026 / token
Pricing
resolution: 480P $0.065, 768P (default) $0.104, 1080P $0.208 per second. Billed on duration, default 5. References above 4,096 tokens add $0.026 per 1,000 tokens, images, videos and audio together. The final charge comes from usage.
Limits
- Runs
- In the background
- Returns
- video
- Longest queue wait
- 3600s
- Run deadline
- 3600s
- Largest inline input
- 1024 KB
- Largest input file
- 500 MB
- Largest output
- 4768 MB
- Outputs per run
- 16
Input
| Field | Kind | Default | Description |
|---|---|---|---|
prompt required | text | — | Text prompt for video generation. Refer to reference assets by their modality and order in the reference lists: Image 1, Image 2, Video 1, Audio 1, and so on. |
reference_image_urls | URLs or files | — | URLs of subject/style reference images, referenced in the prompt as Image 1, Image 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. |
reference_video_urls | URLs or files | — | URLs of motion/reference video clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Video 1, Video 2, and so on. Reference images, videos, and audio clips must add up to at most 12 files. |
reference_audio_urls | URLs or files | — | URLs of reference audio clips (2-15 seconds each, combined duration at most 15 seconds), referenced in the prompt as Audio 1, Audio 2, and so on. Images, videos, and audio can be provided individually or together. Reference images, videos, and audio clips must add up to at most 12 files. |
image_url | URL or file | — | Optional URL of the image to use as the first frame. The video opens exactly on this image while the references keep the subjects consistent; the output canvas follows this image. |
middle_image_url | URL or file | — | Optional image to guide the video at middle_frame_time. Requires start and end images and native 480P or 768P resolution. |
middle_frame_time | number | — | Target time for the middle image, in seconds from the start. Rounded to the nearest frame at 24 fps; it must fall strictly between the first and last frames of the requested duration. Requires middle_image_url. |
end_image_url | URL or file | — | Optional URL of the image to use as the last frame. The video ends exactly on this image. |
duration | number 0.92 to 15 | 5 | Video length in seconds. The output can run up to about 0.7 s longer than requested. |
resolution | one of 480P, 768P, 1080P | 768P | The native generation resolution, or 1080P latent refinement from a native 768P source. |
seed | number (whole) | — | Random seed. A random seed is selected when omitted. |
prompt_expansion_mode required | text | balanced | How much effort to spend rewriting the prompt before generation. 'disabled' skips prompt expansion. 'balanced' returns in about a second. 'quality' spends up to ~30s on a richer prompt. |
aspect_ratio | one of adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | adaptive | The aspect ratio of the generated video. |
reference_conditions | JSON | — | Ordered reference list; cross-modality order is semantic and is preserved end-to-end. Do not combine with reference_*_urls. |
Same request in code
curl https://api.spiral.ai/v1/runs \
-H "Authorization: Bearer $SPIRAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"provider": "fal",
"model": "minimax/h3-max/reference-to-video",
"input": {
"prompt": "Image 1 is the female protagonist. Image 2 is her small dog. Keep the woman and dog consistent with their respective reference images while they walk together…",
"prompt_expansion_mode": "balanced"
}
}'