Zum Hauptinhalt springen
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
}
Verwenden Sie diesen Endpunkt, um ein vorhandenes Video umzustilisieren.

Bevor Sie ihn aufrufen

  • Senden Sie den erforderlichen Header X-Runway-Version, zum Beispiel 2024-11-06
  • Geben Sie eine stabile Quell-video-URL an
  • Verwenden Sie model: gen4
  • Beginnen Sie mit einem moderaten Wert für structure_transformation, bevor Sie die Stilübertragung stärker ausreizen

Aufgabenablauf

1

Restyle-Aufgabe übermitteln

Senden Sie das Quellvideo, den Prompt und die Optionen und speichern Sie dann die zurückgegebene Aufgaben-ID.
2

Aufgabenstatus abfragen

Fahren Sie mit Feed Get Task fort, bis die Aufgabe einen Endzustand erreicht.
3

Fertiges Rendering speichern

Kopieren Sie die endgültige Ausgabe in Ihren eigenen Speicher, wenn Sie sie über das Bereitstellungsfenster des Anbieters hinaus benötigen.

Autorisierungen

Authorization
string
header
erforderlich

Bearer token authentication. Use your CometAPI key.

Header

X-Runway-Version
string

Optional Runway version header, for example 2024-11-06.

Body

application/json
callback_url
string
Standard:https://example.com/webhook
erforderlich

Webhook URL that receives a POST request with the result when the task completes.

video
string
Standard:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
erforderlich

URL of the source video to restyle.

model
string
Standard:gen4
erforderlich

Model version to use, e.g. gen4.

prompt
string
Standard:Apply a pixel-art redraw style.
erforderlich

Text prompt describing the target style for the redraw.

options
object
erforderlich

Additional processing options.

Antwort

200 - application/json

OK

code
integer
erforderlich

HTTP status code, 200 indicates success

msg
string
erforderlich

Return information, describes the request result

data
object
erforderlich

Specific response data

exec_time
number
erforderlich

Time spent by the server to process this request