Passer au contenu principal
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
}
Utilisez ce endpoint pour restyliser une vidéo existante via le wrapper au format inversé de Runway.

Avant de l’appeler

  • Envoyez l’en-tête X-Runway-Version requis, par exemple 2024-11-06
  • Fournissez une URL video source stable
  • Utilisez model: gen4
  • Commencez avec une valeur structure_transformation modérée avant d’intensifier davantage le transfert de style

Flux de la tâche

1

Soumettre la tâche de restylisation

Envoyez la vidéo source, le prompt et les options, puis enregistrez l’id de tâche renvoyé.
2

Interroger le statut de la tâche

Continuez avec Feed Get Task jusqu’à ce que le wrapper atteigne un état terminal.
3

Stocker le rendu finalisé

Copiez la sortie finale dans votre propre stockage si vous en avez besoin au-delà de la fenêtre de livraison du fournisseur.

Autorisations

Authorization
string
header
requis

Bearer token authentication. Use your CometAPI key.

En-têtes

X-Runway-Version
string

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

Corps

application/json
callback_url
string
défaut:https://example.com/webhook
requis

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

video
string
défaut:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
requis

URL of the source video to restyle.

model
string
défaut:gen4
requis

Model version to use, e.g. gen4.

prompt
string
défaut:Apply a pixel-art redraw style.
requis

Text prompt describing the target style for the redraw.

options
object
requis

Additional processing options.

Réponse

200 - application/json

OK

code
integer
requis

HTTP status code, 200 indicates success

msg
string
requis

Return information, describes the request result

data
object
requis

Specific response data

exec_time
number
requis

Time spent by the server to process this request