メインコンテンツへスキップ
POST
/
runway
/
pro
/
video2video
Video to Video Style Redraw
curl --request POST \
  --url https://api.cometapi.com/runway/pro/video2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "callback_url": "http://baidu.com",
  "video": "http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4",
  "model": "gen4",
  "prompt": "pixelated style",
  "options": {
    "structure_transformation": 0.5,
    "flip": true
  }
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>",
    "state": "<string>",
    "status": "<string>",
    "prompt": "<string>",
    "prompt_en": "<string>",
    "video_url": "<string>",
    "last_frame": "<string>",
    "msg": "<string>",
    "create_time": "<string>",
    "update_time": "<string>",
    "poster": "<string>"
  },
  "exec_time": 123
}
このエンドポイントを使用すると、Runway のリバースフォーマットラッパーを通じて既存の動画のスタイルを変更できます。

呼び出す前に

  • 必須の X-Runway-Version ヘッダーを送信してください。例: 2024-11-06
  • 安定してアクセスできるソース video URL を指定してください
  • model: gen4 を使用してください
  • スタイル変換を強める前に、まずは控えめな structure_transformation 値から始めてください

タスクの流れ

1

スタイル変更タスクを送信

ソース動画、prompt、オプションを送信し、返されたタスク id を保存します。
2

タスクのステータスをポーリング

ラッパーが終端状態に到達するまで、Feed Get Task を継続して使用してください。
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.

video
string
デフォルト:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
必須

URL of the source video to restyle.

model
string
デフォルト:gen4
必須

Model version to use, e.g. gen4.

prompt
string
デフォルト:Apply a pixel-art redraw style.
必須

Text prompt describing the target style for the redraw.

options
object
必須

Additional processing options.

レスポンス

200 - application/json

OK

code
integer
必須

HTTP status code, 200 indicates success

msg
string
必須

Return information, describes the request result

data
object
必須

Specific response data

exec_time
number
必須

Time spent by the server to process this request