Naar hoofdinhoud gaan
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
}
Gebruik dit endpoint om een bestaande video te restylen via de reverse-format wrapper van Runway.

Voordat je het aanroept

  • Verstuur de vereiste X-Runway-Version-header, bijvoorbeeld 2024-11-06
  • Geef een stabiele bron-video-URL op
  • Gebruik model: gen4
  • Begin met een bescheiden waarde voor structure_transformation voordat je de style transfer sterker opvoert

Taakverloop

1

Dien de restyle-taak in

Verstuur de bronvideo, prompt en opties, en sla vervolgens de geretourneerde task id op.
2

Poll de taakstatus

Ga verder met Feed Get Task totdat de wrapper een terminale status bereikt.
3

Sla de voltooide render op

Kopieer de uiteindelijke output naar je eigen opslag als je die langer nodig hebt dan het leveringsvenster van de provider.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Headers

X-Runway-Version
string

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

Body

application/json
callback_url
string
standaard:https://example.com/webhook
vereist

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

video
string
standaard:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
vereist

URL of the source video to restyle.

model
string
standaard:gen4
vereist

Model version to use, e.g. gen4.

prompt
string
standaard:Apply a pixel-art redraw style.
vereist

Text prompt describing the target style for the redraw.

options
object
vereist

Additional processing options.

Respons

200 - application/json

OK

code
integer
vereist

HTTP status code, 200 indicates success

msg
string
vereist

Return information, describes the request result

data
object
vereist

Specific response data

exec_time
number
vereist

Time spent by the server to process this request