Saltar al contenido 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
}
Usa este endpoint cuando quieras la ruta generate en formato inverso de Runway con una o más imágenes de referencia.

Antes de llamarlo

  • Envía el encabezado X-Runway-Version requerido, por ejemplo 2024-11-06
  • Usa model: gen4
  • Proporciona la image de origen y el prompt que describe el movimiento o la transformación
  • Mantén la primera solicitud simple antes de añadir estilo y ajustes de vector de movimiento

Flujo de la tarea

1

Create the reverse-format task

Envía el prompt, la imagen, la relación de aspecto y las opciones, y luego guarda el id de tarea devuelto.
2

Poll the task

Continúa con Feed Get Task. Si el primer sondeo devuelve task_not_exist, espera unos segundos y vuelve a intentarlo.
3

Persist the result

Cuando la tarea se complete, almacena el recurso final en tu propio pipeline de medios si necesitas retención prolongada.

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication. Use your CometAPI key.

Encabezados

X-Runway-Version
string

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

Cuerpo

application/json
callback_url
string
predeterminado:https://example.com/webhook
requerido

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

ratio
string
predeterminado:1280:720
requerido

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

prompt
string
predeterminado:A paper boat gently rocks on calm water.
requerido

Text prompt describing the desired video content or motion.

model
string
predeterminado:gen4
requerido

Model version to use, e.g. gen4.

image
string
predeterminado:https://db.xiaohuhd.com/1.jpeg
requerido

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.

Respuesta

200 - application/json

OK

code
integer
requerido

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

msg
string
requerido

Text description of the status code

data
object
requerido

Specific response data content

exec_time
number
requerido

Time spent processing this request