Chuyển đến nội dung chính
POST
/
runway
/
pro
/
generate
generate(text)
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",
  "ratio": "16:9",
  "prompt": "a cat",
  "style": "cinematic",
  "model": "gen4",
  "options": {
    "seconds": 10,
    "motion_vector": {
      "x": 0,
      "y": 0.3999999999999999,
      "z": 0,
      "r": -6,
      "bg_x_pan": 0,
      "bg_y_pan": 0
    }
  }
}
'
{
  "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.

Sử dụng endpoint này để khởi chạy một tác vụ text-to-video GEN-4 theo compatibility-format của Runway.

Các trường bắt buộc

  • callback_url là bắt buộc
  • prompt, ratio, stylemodel xác định yêu cầu tạo
  • options.secondsoptions.motion_vector là bắt buộc

Đường dẫn request đã được xác thực

  • Header: X-Runway-Version: 2024-11-06
  • Model: gen4_turbo
  • Response: code: 200, msg: successdata.task_id

Luồng tác vụ

1

Create the task

Gửi request và lưu task_id được trả về.
2

Poll the compatibility-format feed route

Tiếp tục với Feed Get Task để theo dõi trạng thái tác vụ.
3

Persist the finished asset

Khi URL video khả dụng, hãy chuyển nó vào pipeline lưu trữ của riêng bạn.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer token authentication. Use your CometAPI key.

Tiêu đề

X-Runway-Version
string

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

Nội dung

application/json
callback_url
string
mặc định:https://example.com/webhook
bắt buộc

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

ratio
string
mặc định:16:9
bắt buộc

Aspect ratio of the generated video, e.g. 16:9, 9:16, 1:1.

prompt
string
mặc định:A cat sitting on a windowsill.
bắt buộc

Text prompt describing the video content to generate.

style
string
mặc định:cinematic
bắt buộc

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

model
string
mặc định:gen4
bắt buộc

Model version to use, e.g. gen4.

options
object
bắt buộc

Advanced generation options including duration and camera motion.

Phản hồi

200 - application/json

OK

code
integer
bắt buộc

HTTP status code returned by the task service.

data
object
bắt buộc
message
string

Empty on success.

msg
string

Result message.