Skip to main content
POST
cURL
使用此端點建立 Runway 圖像生成任務。

使用說明

  • 傳送必要的 X-Runway-Version 標頭,例如 2024-11-06
  • 使用 model: gen4_image
  • 此路由至少需要一個 referenceImages 項目——僅文字請求會回傳 reference_images_empty

任務流程

1

提交生成請求

傳送 promptTextratiomodel,以及至少一個 referenceImages 物件。
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
promptText
string
預設值:A paper boat floating on calm water at sunrise.
必填

A non-empty string up to 1000 characters.

ratio
string
預設值:1280:720
必填

Aspect ratio of the output image, e.g. 1280:720.

seed
integer
預設值:1
必填

Random seed for reproducible results.

model
string
預設值:gen4_image
必填

The model variant to use.

referenceImages
object[]
必填

An array of up to three images to be used as references. At least one item is required. referenceImages is required.

contentModeration
object
必填

回應

200 - application/json

Task accepted.

id
string
必填