Chuyển đến nội dung chính
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
}
Sử dụng endpoint này để đổi phong cách cho một video hiện có thông qua wrapper reverse-format của Runway.

Trước khi gọi

  • Gửi header X-Runway-Version bắt buộc, ví dụ 2024-11-06
  • Cung cấp URL video nguồn ổn định
  • Sử dụng model: gen4
  • Bắt đầu với giá trị structure_transformation vừa phải trước khi tăng mức độ chuyển đổi phong cách mạnh hơn

Luồng tác vụ

1

Gửi tác vụ đổi phong cách

Gửi video nguồn, prompt và các tùy chọn, sau đó lưu task id được trả về.
2

Kiểm tra trạng thái tác vụ

Tiếp tục với Feed Get Task cho đến khi wrapper đạt trạng thái kết thúc.
3

Lưu bản render đã hoàn tất

Sao chép đầu ra cuối cùng vào hệ thống lưu trữ của riêng bạn nếu cần giữ lâu hơn thời gian phân phối của nhà cung cấp.

Ủ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 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.

video
string
mặc định:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
bắt buộc

URL of the source video to restyle.

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

Model version to use, e.g. gen4.

prompt
string
mặc định:Apply a pixel-art redraw style.
bắt buộc

Text prompt describing the target style for the redraw.

options
object
bắt buộc

Additional processing options.

Phản hồi

200 - application/json

OK

code
integer
bắt buộc

HTTP status code, 200 indicates success

msg
string
bắt buộc

Return information, describes the request result

data
object
bắt buộc

Specific response data

exec_time
number
bắt buộc

Time spent by the server to process this request