Przejdź do głównej treści
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
}
Użyj tego endpointu, gdy chcesz skorzystać z trasy reverse-format generate Runway z jednym lub większą liczbą obrazów referencyjnych.

Zanim go wywołasz

  • Wyślij wymagany nagłówek X-Runway-Version, na przykład 2024-11-06
  • Użyj model: gen4
  • Podaj źródłowy image oraz prompt opisujący ruch lub transformację
  • Zachowaj prostotę pierwszego żądania, zanim dodasz styl i dostrajanie wektorów ruchu

Przebieg zadania

1

Utwórz zadanie w formacie reverse-format

Prześlij prompt, image, ratio oraz opcje, a następnie zapisz zwrócone id zadania.
2

Odpytuj zadanie

Kontynuuj z Feed Get Task. Jeśli pierwsze odpytywanie zwróci task_not_exist, odczekaj kilka sekund i spróbuj ponownie.
3

Zapisz wynik

Gdy zadanie zostanie ukończone, zapisz końcowy zasób w swoim własnym pipeline multimedialnym, jeśli potrzebujesz długiego okresu przechowywania.

Autoryzacje

Authorization
string
header
wymagane

Bearer token authentication. Use your CometAPI key.

Nagłówki

X-Runway-Version
string

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

Treść

application/json
callback_url
string
domyślnie:https://example.com/webhook
wymagane

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

ratio
string
domyślnie:1280:720
wymagane

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

prompt
string
domyślnie:A paper boat gently rocks on calm water.
wymagane

Text prompt describing the desired video content or motion.

model
string
domyślnie:gen4
wymagane

Model version to use, e.g. gen4.

image
string
domyślnie:https://db.xiaohuhd.com/1.jpeg
wymagane

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.

Odpowiedź

200 - application/json

OK

code
integer
wymagane

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

msg
string
wymagane

Text description of the status code

data
object
wymagane

Specific response data content

exec_time
number
wymagane

Time spent processing this request