Skip to main content
POST
cURL
使用此端點可將一張來源圖片製作成 Runway 影片動畫。

呼叫前須知

  • 傳送必要的 X-Runway-Version 標頭,例如 2024-11-06
  • 使用 model: gen3a_turbo
  • 提供穩定的 HTTPS promptImage
  • duration: 5 和所選 Runway model/version 支援的 ratio 值作為起點

Duration 與 ratio

Runway 官方格式請求使用 ratio,而不是 size。請將解析度樣式的 ratio 值理解為其對應的 WxH1280:720 代表目標 1280x720720:1280 代表目標 720x1280,而 1280:768 仍可能依所選 model/version 轉譯為 1280x720

任務流程

1

提交圖像轉影片請求

使用來源圖片以及可選的簡短動作 Prompt 來建立任務。
2

儲存回傳的 id

將任務 id 儲存起來,以便稍後輪詢。
3

輪詢任務狀態

使用 取得 Runway 任務。如果第一次輪詢回傳 task_not_exist,請等待幾秒後再重試。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

標頭

X-Runway-Version
string
必填

Runway version header, for example 2024-11-06.

主體

application/json
promptImage
string
預設值:https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg
必填

Source image URL.

model
string
預設值:gen3a_turbo
必填

Runway image-to-video model ID. Choose an available model from the Models page.

seed
integer

Random seed for reproducible results. Range: 0–999999999.

promptText
string

Text prompt describing the desired motion or scene. Maximum 512 characters.

watermark
boolean
預設值:false

Whether to add a watermark to the output video.

duration
integer
預設值:5

Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway.

ratio
string
預設值:1280:768

Requested output ratio. Accepted values are Runway model/version dependent. With X-Runway-Version 2024-11-06, use a resolution-style value accepted by the selected model, such as 1280:768, 768:1280, 1280:720, or 720:1280. Read these as WxH targets, but completed media may normalize, so inspect the returned file before relying on exact pixels.

回應

200 - application/json

Task accepted.

id
string
必填