Ana içeriğe atla
POST
/
runway
/
pro
/
generate
generate(text)
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",
  "ratio": "16:9",
  "prompt": "a cat",
  "style": "cinematic",
  "model": "gen4",
  "options": {
    "seconds": 10,
    "motion_vector": {
      "x": 0,
      "y": 0.3999999999999999,
      "z": 0,
      "r": -6,
      "bg_x_pan": 0,
      "bg_y_pan": 0
    }
  }
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>"
  },
  "exec_time": 123
}
Bu endpoint’i, Runway uyumluluk formatında bir GEN-4 metinden videoya görevi başlatmak için kullanın.

Gerekli alanlar

  • callback_url gereklidir
  • prompt, ratio, style ve model, üretim isteğini tanımlar
  • options.seconds ve options.motion_vector gereklidir

Doğrulanmış istek yolu

  • Header: X-Runway-Version: 2024-11-06
  • Model: gen4_turbo
  • Yanıt: code: 200, msg: 成功 ve data.task_id

Görev akışı

1

Görevi oluştur

İsteği gönderin ve döndürülen task_id değerini saklayın.
2

Uyumluluk formatı feed rotasını sorgula

Görev durumunu takip etmek için Feed Get Task ile devam edin.
3

Tamamlanan asset'i kalıcı olarak sakla

Bir video URL’si kullanılabilir olduğunda, bunu kendi depolama hattınıza taşıyın.

Yetkilendirmeler

Authorization
string
header
gerekli

Bearer token authentication. Use your CometAPI key.

Başlıklar

X-Runway-Version
string

Optional Runway API 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:16:9
gerekli

Aspect ratio of the generated video, e.g. 16:9, 9:16, 1:1.

prompt
string
varsayılan:A cat sitting on a windowsill.
gerekli

Text prompt describing the video content to generate.

style
string
varsayılan:cinematic
gerekli

Artistic style for the generated video, e.g. cinematic.

model
string
varsayılan:gen4
gerekli

Model version to use, e.g. gen4.

options
object
gerekli

Advanced generation options including duration and camera motion.

Yanıt

200 - application/json

OK

code
integer
gerekli

HTTP status code or business status code

msg
string
gerekli

Text description of the status code

data
object
gerekli

Business data body containing detailed task information

exec_time
number
gerekli

Execution time of the API interface itself (in seconds), does not represent the total video generation time