跳到正文
DEV Community· Magic Hour·· 13 天前AI 評分52

Magic Hour、fal Kling 3.0 Pro 與 Runway 的起止影格 API:建置前檢查事項

Image-to-video APIs for start and end frames: what to check before you build

AI 導讀

Magic Hour 比較 Magic Hour、fal Kling 3.0 Pro 和 Runway 的起止影格 API 請求結構及結果查詢方式。比較由 AI 根據引用文件撰寫,沒有實際生成影片或測試耗時;示例是使用 ltx-2.5、720p 的 5 秒 Magic Hour 請求。文章提醒各模型的解析度支援不同,並建議在交付尺寸下檢查影片最後可用影格與結束影像是否相符。

正文

Magic Hour

Magic Hour publishes this comparison and provides one of the APIs below. AI generated the writing from the cited documentation. This is a request-schema comparison, with no renders or timing tests.

A start frame gives a video model a picture to animate. An end frame tells it where to land. If you need a product reveal to finish on a particular composition, confirm that the selected model accepts an end frame at the resolution you sell before building the rest of the workflow.

Route Start image End image Where to check the result
Magic Hour Image-to-Video assets.image_file_path assets.end_image_file_path, with model-specific resolution support Save the project ID and retrieve the completed project's downloads.
fal Kling 3.0 Pro start_image_url end_image_url Save the request ID, then get the queue result and read its video output.
Runway Image-to-Video The API accepts a promptImage URL or positioned image inputs according to the model. Confirm the selected model's documented input schema before treating last as available. Save the task ID and retrieve task status and output.

Magic Hour Image-to-Video schema · fal Kling 3.0 Pro schema · Runway API reference

Example request for a five-second reveal

This is the JSON body for Magic Hour's POST /v1/image-to-video. Replace both sample paths with your own uploaded file paths. The request uses the documented ltx-2.5 route with a 720p output. A real request consumes credits.

{
  "end_seconds": 5,
  "model": "ltx-2.5",
  "resolution": "720p",
  "audio": false,
  "style": {
    "prompt": "Reveal the product slowly, then settle on the final composition."
  },
  "assets": {
    "image_file_path": "api-assets/id/start.png",
    "end_image_file_path": "api-assets/id/end.png"
  }
}

Before sending the job, reject unsupported model and resolution combinations in your form. For example, the Magic Hour docs list 1080p for the Kling 2.6 end-frame input and 480p, 720p, and 1080p for LTX 2.5. The same field can have different rules across models. Keep a link to the current schema beside your adapter so it is easy to update those rules. End-frame limits · Upload file paths

Check the delivered clip against the input

  1. Use start and end images with the same intended crop. Compare the last usable frame with the end image at delivery size.
  2. For a product shot, check the shape, logo, label and color through the transition. An endpoint accepting an end frame gives you a control to test. The downloaded clip still needs to pass your own checks.
  3. Save the job ID, model, resolution, both input references and the final charge. If the render finishes but fails review, record that separately from a failed API job. This lets you compare cost per accepted reveal once you have enough attempts.

Magic Hour completed video details · fal queue API · Runway task workflow

來源:DEV Community · dev.to