Image-to-Video
Workflow
-
Identify the reference image.
- Prefer the most recent image attachment in the session from
image_generate. - If no local image exists, ask the user for one or generate it first with the image-generator skill.
- Done when: the absolute path to the reference image is known.
- Prefer the most recent image attachment in the session from
-
Confirm motion + lighting intent with the user.
- Extract: camera motion (orbit / dolly-in / static / pan), scene progression (time-of-day change, weather shift, action), and any audio constraints.
- Done when: the prompt describes one continuous motion and one lighting/state transition in concrete terms.
-
Call
video_generatewith these defaults.image: the path from step 1.imageRoles:["reference_image"](use as visual reference, not strict first frame). Use["first_frame"]only when the user wants the exact frame preserved.aspectRatio:16:9for cinematic / drone shots,9:16for vertical, otherwise match the source image.resolution: start at1080P; fall back to720Pif the provider rejects the resolution/duration combo.durationSeconds:10for time-lapse / orbit,6for action-heavy clips,8as a balanced default.watermark: omit (provider ignores it onMiniMax-Hailuo-2.3).timeoutMs:300000.- Done when: the tool returns a task id and the run is backgrounded.
-
Recover from known incompatibilities.
- If the failure mentions "duration Xs and resolution YP" → drop to the next-lower resolution at the same duration (1080P → 720P, 720P → 540P).
- If the failure mentions "invalid api key" → retry; the tool auto-selects the alternate provider path.
- Done when: a successful generation task id is returned, or the user is told the combo is impossible and asked to choose another.
-
Deliver the result.
- Wait for the completion event; do not poll manually.
- Reply with a short caption and the
MEDIA:directive on its own line, using the absolute mp4 path the completion event returns. - Done when: the user can see and play the video inline.
Pitfalls
- Don't combine a custom
aspectRatioand a non-defaultsizeforMiniMax-Hailuo-2.3— pick one. 1080P + 10sis rejected onMiniMax-Hailuo-2.3. Use1080P + 6sor720P + 10s.reference_imagelets the model reinterpret lighting/composition;first_framelocks the start. Match the role to the user's intent.
