跳轉到主要內容
POST
/
runway
/
pro
/
generate
Create a compatibility-format Runway generate task
curl --request POST \
  --url https://api.cometapi.com/runway/pro/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "callback_url": "https://example.com/webhook",
  "image": "https://db.xiaohuhd.com/1.jpeg",
  "model": "gen4",
  "prompt": "Smile, Eat Burger"
}
'
{
  "code": 200,
  "message": "",
  "msg": "success",
  "data": {
    "task_id": "196642a0-05e1-441a-981e-eb0c1f5d983b"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

當你想使用 Runway 相容格式的 generate 路由,並搭配一張或多張參考圖片時,請使用此端點。

呼叫前須知

  • 傳送必要的 X-Runway-Version 標頭,例如 2024-11-06
  • 使用 model: gen4
  • 提供來源 image 與描述動作或轉換的 prompt
  • 在加入風格與 motion-vector 調整之前,先讓第一個請求保持簡單

任務流程

1

建立相容格式任務

提交 prompt、image、ratio 和選項,然後儲存回傳的 task id。
2

輪詢任務

繼續參考Feed Get Task。如果第一次輪詢回傳 task_not_exist,請等待幾秒後重試。
3

保存結果

當任務完成時,如果你需要長期保存,請將最終資產儲存到你自己的媒體流程中。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

標頭

X-Runway-Version
string

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

主體

application/json
callback_url
string
預設值:https://example.com/webhook
必填

Webhook URL that receives a POST request with the result when the task completes.

ratio
string
預設值:1280:720
必填

Aspect ratio of the generated video, e.g. 1280:720.

prompt
string
預設值:A paper boat gently rocks on calm water.
必填

Text prompt describing the desired video content or motion.

model
string
預設值:gen4
必填

Model version to use, e.g. gen4.

image
string
預設值:https://db.xiaohuhd.com/1.jpeg
必填

URL of the source image to animate.

style
string

Artistic style for the generated video, e.g. cinematic.

options
object

Advanced generation options.

last_image
string

URL of the end-frame image. When provided, the video transitions toward this frame.

回應

200 - application/json

OK

code
integer
必填

HTTP status code returned by the task service.

data
object
必填
message
string

Empty on success.

msg
string

Result message.