Naar hoofdinhoud gaan
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
}
Gebruik deze endpoint om een Runway reverse-format GEN-4 text-to-video-taak te starten.

Vereiste velden op CometAPI

  • callback_url is momenteel vereist door de wrapper
  • prompt, ratio, style en model definiëren het generatieverzoek
  • options.seconds en options.motion_vector zijn vereist door het huidige wrapper-schema

Gevalideerd requestpad

  • Header: X-Runway-Version: 2024-11-06
  • Model: gen4_turbo
  • Response: code: 200, msg: 成功 en data.task_id

Taakverloop

1

Create the task

Dien het verzoek in en sla de geretourneerde task_id op.
2

Poll the reverse-format feed route

Ga verder met Feed Get Task om de taakstatus te volgen.
3

Persist the finished asset

Zodra een video-URL beschikbaar is, verplaats je deze naar je eigen storage-pipeline.
Als je callback_url weglaat, retourneert de huidige CometAPI-wrapper callback_url_empty, ook al is dit een taakgebaseerde async API.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Headers

X-Runway-Version
string

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

Body

application/json
callback_url
string
standaard:https://example.com/webhook
vereist

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

ratio
string
standaard:16:9
vereist

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

prompt
string
standaard:A cat sitting on a windowsill.
vereist

Text prompt describing the video content to generate.

style
string
standaard:cinematic
vereist

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

model
string
standaard:gen4
vereist

Model version to use, e.g. gen4.

options
object
vereist

Advanced generation options including duration and camera motion.

Respons

200 - application/json

OK

code
integer
vereist

HTTP status code or business status code

msg
string
vereist

Text description of the status code

data
object
vereist

Business data body containing detailed task information

exec_time
number
vereist

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