Skip to main content
POST
/
runway
/
pro
/
generate
Create a compatibility-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": "https://example.com/webhook",
  "image": "https://db.xiaohuhd.com/1.jpeg",
  "model": "gen4",
  "prompt": "Smile, Eat Burger"
}
'
{
  "code": 200,
  "message": "",
  "msg": "success",
  "data": {
    "task_id": "196642a0-05e1-441a-981e-eb0c1f5d983b"
  }
}
Use this endpoint when you want the Runway compatibility-format generate route with one or more reference images.

Before you call it

  • Send the required X-Runway-Version header, for example 2024-11-06
  • Use model: gen4
  • Provide the source image and the prompt that describes motion or transformation
  • Keep the first request simple before layering style and motion-vector tuning

Duration and ratio

SettingSupported valuesDefault starting pointBoundary behavior
options.seconds5, 10 for standard Runway video generations5Use one of the model-supported clip lengths for production requests.
ratio1280:720, 720:1280, or the ratio accepted by the selected compatibility model1280:720Keep the source image close to the requested frame shape to avoid cropping.
Use the colon-separated ratio required by the Runway compatibility route. In user-facing terms, 1280:720 targets 1280x720 and 720:1280 targets 720x1280.

Task flow

1

Create the compatibility-format task

Submit the prompt, image, ratio, and options, then save the returned task id.
2

Poll the task

Continue with Feed Get Task. If the first poll returns task_not_exist, wait a few seconds and retry.
3

Persist the result

When the task completes, store the final asset in your own media pipeline if you need long retention.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Headers

X-Runway-Version
string

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

Body

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

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

ratio
string
default:1280:720
required

Requested output frame shape. Use colon-separated values such as 1280:720 or 720:1280; read them as 1280x720 and 720x1280 targets.

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

Text prompt describing the desired video content or motion.

model
string
default:gen4
required

Model version to use, e.g. gen4.

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

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.

Response

200 - application/json

OK

code
integer
required

HTTP status code returned by the task service.

data
object
required
message
string

Empty on success.

msg
string

Result message.