Saltar para o conteúdo 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
}
Use este endpoint para reestilizar um vídeo existente por meio do wrapper de formato reverso da Runway.

Antes de chamá-lo

  • Envie o header obrigatório X-Runway-Version, por exemplo 2024-11-06
  • Forneça uma URL video de origem estável
  • Use model: gen4
  • Comece com um valor moderado de structure_transformation antes de intensificar a transferência de estilo

Fluxo da tarefa

1

Enviar a tarefa de reestilização

Envie o vídeo de origem, o prompt e as opções, depois salve o id da tarefa retornado.
2

Consultar o status da tarefa

Continue com Feed Get Task até que o wrapper alcance um estado terminal.
3

Armazenar a renderização finalizada

Copie a saída final para o seu próprio armazenamento se precisar dela além da janela de entrega do provedor.

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication. Use your CometAPI key.

Cabeçalhos

X-Runway-Version
string

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

Corpo

application/json
callback_url
string
padrão:https://example.com/webhook
obrigatório

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

video
string
padrão:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
obrigatório

URL of the source video to restyle.

model
string
padrão:gen4
obrigatório

Model version to use, e.g. gen4.

prompt
string
padrão:Apply a pixel-art redraw style.
obrigatório

Text prompt describing the target style for the redraw.

options
object
obrigatório

Additional processing options.

Resposta

200 - application/json

OK

code
integer
obrigatório

HTTP status code, 200 indicates success

msg
string
obrigatório

Return information, describes the request result

data
object
obrigatório

Specific response data

exec_time
number
obrigatório

Time spent by the server to process this request