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": "http://baidu.com",
  "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": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>"
  },
  "exec_time": 123
}
Sử dụng endpoint này để bắt đầu một tác vụ Runway reverse-format GEN-4 text-to-video.

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

  • callback_url hiện đang được wrapper yêu cầu
  • prompt, ratio, style, và model xác định yêu cầu tạo nội dung
  • options.secondsoptions.motion_vector là bắt buộc theo schema wrapper hiện tại

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

  • Header: X-Runway-Version: 2024-11-06
  • Model: gen4_turbo
  • Response: code: 200, msg: 成功, và data.task_id

Luồng tác vụ

1

Tạo tác vụ

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

Thăm dò route feed reverse-format

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

Lưu trữ asset hoàn tất

Khi URL video đã có sẵn, hãy chuyển nó vào pipeline lưu trữ của riêng bạn.
Nếu bạn bỏ qua callback_url, wrapper CometAPI hiện tại sẽ trả về callback_url_empty dù đây là một API bất đồng bộ dựa trên tác vụ.

Ủ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 or business status code

msg
string
bắt buộc

Text description of the status code

data
object
bắt buộc

Business data body containing detailed task information

exec_time
number
bắt buộc

Execution time of the API interface itself (in seconds), does not represent the total video generation time