メインコンテンツへスキップ
POST
/
runway
/
pro
/
generate
Create a reverse-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": "http://baidu.com",
  "image": "https://db.xiaohuhd.com/1.jpeg",
  "model": "gen4",
  "prompt": "Smile, Eat Burger"
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>"
  },
  "exec_time": 123
}
1 枚以上の参照画像を使って Runway の逆形式 generate ルートを利用したい場合は、このエンドポイントを使用します。

呼び出し前の準備

  • 必須の X-Runway-Version ヘッダーを送信します。例: 2024-11-06
  • model: gen4 を使用します
  • 元となる image と、動きや変化を説明するプロンプト(Prompt)を指定します
  • スタイルやモーションベクトルの調整を重ねる前に、最初のリクエストはシンプルに保ちます

タスクの流れ

1

逆形式タスクを作成

プロンプト(Prompt)、image、ratio、オプションを送信し、返されたタスク 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 or business status code, 200 usually indicates success

msg
string
必須

Text description of the status code

data
object
必須

Specific response data content

exec_time
number
必須

Time spent processing this request