Ana içeriğe atla
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
}
Runway ters biçimli generate rotasını bir veya daha fazla referans görselle kullanmak istediğinizde bu endpoint’i kullanın.

Çağırmadan önce

  • Gerekli X-Runway-Version header’ını gönderin; örneğin 2024-11-06
  • model: gen4 kullanın
  • Kaynak image ve hareketi ya da dönüşümü açıklayan prompt’u sağlayın
  • Stil ve motion-vector ayarlarını katmanlamadan önce ilk isteği basit tutun

Görev akışı

1

Ters biçimli görevi oluşturun

Prompt, image, ratio ve seçenekleri gönderin, ardından dönen görev kimliğini kaydedin.
2

Görevi sorgulayın

Feed Get Task ile devam edin. İlk sorgu task_not_exist döndürürse birkaç saniye bekleyin ve yeniden deneyin.
3

Sonucu kalıcı hale getirin

Görev tamamlandığında, uzun süreli saklama gerekiyorsa nihai varlığı kendi medya hattınızda depolayın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Başlıklar

X-Runway-Version
string

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

Gövde

application/json
callback_url
string
varsayılan:https://example.com/webhook
gerekli

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

ratio
string
varsayılan:1280:720
gerekli

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

prompt
string
varsayılan:A paper boat gently rocks on calm water.
gerekli

Text prompt describing the desired video content or motion.

model
string
varsayılan:gen4
gerekli

Model version to use, e.g. gen4.

image
string
varsayılan:https://db.xiaohuhd.com/1.jpeg
gerekli

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.

Yanıt

200 - application/json

OK

code
integer
gerekli

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

msg
string
gerekli

Text description of the status code

data
object
gerekli

Specific response data content

exec_time
number
gerekli

Time spent processing this request