Перейти к основному содержанию
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
}
Используйте этот endpoint, когда вам нужен маршрут generate Runway в reverse-format с одним или несколькими референсными изображениями.

Перед вызовом

  • Отправьте обязательный заголовок X-Runway-Version, например 2024-11-06
  • Используйте model: gen4
  • Укажите исходное image и prompt, описывающий движение или преобразование
  • Сначала сделайте первый запрос простым, прежде чем добавлять стиль и настройку motion-vector

Поток задачи

1

Создайте задачу в reverse-format

Отправьте prompt, image, ratio и параметры, затем сохраните возвращенный id задачи.
2

Опрашивайте задачу

Продолжайте с Feed Get Task. Если первый опрос возвращает task_not_exist, подождите несколько секунд и повторите попытку.
3

Сохраните результат

Когда задача будет завершена, сохраните итоговый asset в собственном медиапайплайне, если вам нужно длительное хранение.

Авторизации

Authorization
string
header
обязательно

Bearer token authentication. Use your CometAPI key.

Заголовки

X-Runway-Version
string

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

Тело

application/json
callback_url
string
по умолчанию:https://example.com/webhook
обязательно

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

ratio
string
по умолчанию:1280:720
обязательно

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

prompt
string
по умолчанию:A paper boat gently rocks on calm water.
обязательно

Text prompt describing the desired video content or motion.

model
string
по умолчанию:gen4
обязательно

Model version to use, e.g. gen4.

image
string
по умолчанию:https://db.xiaohuhd.com/1.jpeg
обязательно

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.

Ответ

200 - application/json

OK

code
integer
обязательно

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

msg
string
обязательно

Text description of the status code

data
object
обязательно

Specific response data content

exec_time
number
обязательно

Time spent processing this request