Langsung ke konten utama
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
}
Gunakan endpoint ini saat Anda menginginkan route generate reverse-format Runway dengan satu atau lebih gambar referensi.

Sebelum Anda memanggilnya

  • Kirim header X-Runway-Version yang wajib, misalnya 2024-11-06
  • Gunakan model: gen4
  • Sediakan image sumber dan prompt yang mendeskripsikan gerakan atau transformasi
  • Buat request pertama tetap sederhana sebelum menambahkan penyesuaian style dan motion-vector

Alur tugas

1

Buat task reverse-format

Kirim prompt, image, ratio, dan opsi, lalu simpan id task yang dikembalikan.
2

Poll task

Lanjutkan dengan Feed Get Task. Jika poll pertama mengembalikan task_not_exist, tunggu beberapa detik lalu coba lagi.
3

Simpan hasilnya

Saat task selesai, simpan aset final ke pipeline media Anda sendiri jika Anda memerlukan retensi jangka panjang.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Header

X-Runway-Version
string

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

Body

application/json
callback_url
string
default:https://example.com/webhook
wajib

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

ratio
string
default:1280:720
wajib

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

prompt
string
default:A paper boat gently rocks on calm water.
wajib

Text prompt describing the desired video content or motion.

model
string
default:gen4
wajib

Model version to use, e.g. gen4.

image
string
default:https://db.xiaohuhd.com/1.jpeg
wajib

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.

Respons

200 - application/json

OK

code
integer
wajib

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

msg
string
wajib

Text description of the status code

data
object
wajib

Specific response data content

exec_time
number
wajib

Time spent processing this request