Saltar al contenido principal
POST
/
runway
/
pro
/
generate
generate(text)
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",
  "ratio": "16:9",
  "prompt": "a cat",
  "style": "cinematic",
  "model": "gen4",
  "options": {
    "seconds": 10,
    "motion_vector": {
      "x": 0,
      "y": 0.3999999999999999,
      "z": 0,
      "r": -6,
      "bg_x_pan": 0,
      "bg_y_pan": 0
    }
  }
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>"
  },
  "exec_time": 123
}
Usa este endpoint para iniciar una tarea de text-to-video GEN-4 en formato inverso de Runway.

Campos obligatorios en CometAPI

  • callback_url es actualmente obligatorio para el wrapper
  • prompt, ratio, style y model definen la solicitud de generación
  • options.seconds y options.motion_vector son obligatorios según el esquema actual del wrapper

Ruta de solicitud validada

  • Encabezado: X-Runway-Version: 2024-11-06
  • Modelo: gen4_turbo
  • Respuesta: code: 200, msg: 成功 y data.task_id

Flujo de la tarea

1

Create the task

Envía la solicitud y almacena el task_id devuelto.
2

Poll the reverse-format feed route

Continúa con Feed Get Task para seguir el estado de la tarea.
3

Persist the finished asset

Una vez que haya una URL de video disponible, muévela a tu propio pipeline de almacenamiento.
Si omites callback_url, el wrapper actual de CometAPI devuelve callback_url_empty aunque esta sea una API asíncrona basada en tareas.

Autorizaciones

Authorization
string
header
requerido

Bearer token authentication. Use your CometAPI key.

Encabezados

X-Runway-Version
string

Optional Runway API 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:16:9
requerido

Aspect ratio of the generated video, e.g. 16:9, 9:16, 1:1.

prompt
string
predeterminado:A cat sitting on a windowsill.
requerido

Text prompt describing the video content to generate.

style
string
predeterminado:cinematic
requerido

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

model
string
predeterminado:gen4
requerido

Model version to use, e.g. gen4.

options
object
requerido

Advanced generation options including duration and camera motion.

Respuesta

200 - application/json

OK

code
integer
requerido

HTTP status code or business status code

msg
string
requerido

Text description of the status code

data
object
requerido

Business data body containing detailed task information

exec_time
number
requerido

Execution time of the API interface itself (in seconds), does not represent the total video generation time