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
必填