Saltar para o conteúdo principal
POST
/
runway
/
pro
/
generate
Create a reverse-format Runway generate task
curl --request POST \
  --url https://api.cometapi.com/runway/pro/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "callback_url": "http://baidu.com",
  "image": "https://db.xiaohuhd.com/1.jpeg",
  "model": "gen4",
  "prompt": "Smile, Eat Burger"
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>"
  },
  "exec_time": 123
}
Use este endpoint quando quiser usar a rota generate em formato reverso do Runway com uma ou mais imagens de referência.

Antes de chamá-lo

  • Envie o header obrigatório X-Runway-Version, por exemplo 2024-11-06
  • Use model: gen4
  • Forneça a image de origem e o prompt que descreve o movimento ou a transformação
  • Mantenha a primeira solicitação simples antes de adicionar estilo e ajuste de vetor de movimento

Fluxo da tarefa

1

Criar a tarefa em formato reverso

Envie o prompt, a image, a proporção e as opções, depois salve o id da tarefa retornado.
2

Consultar a tarefa

Continue com Feed Get Task. Se a primeira consulta retornar task_not_exist, aguarde alguns segundos e tente novamente.
3

Persistir o resultado

Quando a tarefa for concluída, armazene o asset final no seu próprio pipeline de mídia se precisar de retenção prolongada.

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.

ratio
string
padrão:1280:720
obrigatório

Aspect ratio of the generated video, e.g. 1280:720.

prompt
string
padrão:A paper boat gently rocks on calm water.
obrigatório

Text prompt describing the desired video content or motion.

model
string
padrão:gen4
obrigatório

Model version to use, e.g. gen4.

image
string
padrão:https://db.xiaohuhd.com/1.jpeg
obrigatório

URL of the source image to animate.

style
string

Artistic style for the generated video, e.g. cinematic.

options
object

Advanced generation options.

last_image
string

URL of the end-frame image. When provided, the video transitions toward this frame.

Resposta

200 - application/json

OK

code
integer
obrigatório

HTTP status code or business status code, 200 usually indicates success

msg
string
obrigatório

Text description of the status code

data
object
obrigatório

Specific response data content

exec_time
number
obrigatório

Time spent processing this request