メインコンテンツへスキップ
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
}
このエンドポイントを使用して、Runway の reverse-format GEN-4 text-to-video タスクを開始します。

CometAPI で必須のフィールド

  • callback_url は現在ラッパーで必須です
  • promptratiostyle、および model が生成リクエストを定義します
  • options.secondsoptions.motion_vector は現在のラッパースキーマで必須です

検証済みのリクエストパス

  • ヘッダー: X-Runway-Version: 2024-11-06
  • モデル: gen4_turbo
  • レスポンス: code: 200msg: 成功、および data.task_id

タスクフロー

1

タスクを作成

リクエストを送信し、返された task_id を保存します。
2

reverse-format feed ルートをポーリング

タスクの状態を追跡するには、Feed Get Task に進んでください。
3

完了したアセットを保存

動画 URL が利用可能になったら、それを独自のストレージパイプラインに移動します。
callback_url を省略すると、タスクベースの非同期 API であるにもかかわらず、現在の CometAPI ラッパーは callback_url_empty を返します。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ヘッダー

X-Runway-Version
string

Optional Runway API 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
デフォルト:16:9
必須

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

prompt
string
デフォルト:A cat sitting on a windowsill.
必須

Text prompt describing the video content to generate.

style
string
デフォルト:cinematic
必須

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

model
string
デフォルト:gen4
必須

Model version to use, e.g. gen4.

options
object
必須

Advanced generation options including duration and camera motion.

レスポンス

200 - application/json

OK

code
integer
必須

HTTP status code or business status code

msg
string
必須

Text description of the status code

data
object
必須

Business data body containing detailed task information

exec_time
number
必須

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