Vai al contenuto principale
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 questo endpoint quando vuoi usare la route generate in formato inverso di Runway con una o più immagini di riferimento.

Prima di chiamarlo

  • Invia l’header obbligatorio X-Runway-Version, ad esempio 2024-11-06
  • Usa model: gen4
  • Fornisci l’image di origine e il prompt che descrive il movimento o la trasformazione
  • Mantieni la prima richiesta semplice prima di aggiungere stile e regolazione dei vettori di movimento

Flusso dell’attività

1

Crea l'attività in formato inverso

Invia il prompt, l’immagine, il ratio e le opzioni, quindi salva l’id dell’attività restituito.
2

Interroga l'attività

Prosegui con Feed Get Task. Se il primo controllo restituisce task_not_exist, attendi qualche secondo e riprova.
3

Salva il risultato

Quando l’attività è completata, archivia l’asset finale nella tua media pipeline se hai bisogno di una conservazione a lungo termine.

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer token authentication. Use your CometAPI key.

Intestazioni

X-Runway-Version
string

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

Corpo

application/json
callback_url
string
predefinito:https://example.com/webhook
obbligatorio

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

ratio
string
predefinito:1280:720
obbligatorio

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

prompt
string
predefinito:A paper boat gently rocks on calm water.
obbligatorio

Text prompt describing the desired video content or motion.

model
string
predefinito:gen4
obbligatorio

Model version to use, e.g. gen4.

image
string
predefinito:https://db.xiaohuhd.com/1.jpeg
obbligatorio

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.

Risposta

200 - application/json

OK

code
integer
obbligatorio

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

msg
string
obbligatorio

Text description of the status code

data
object
obbligatorio

Specific response data content

exec_time
number
obbligatorio

Time spent processing this request