Skip to main content
POST
Use this endpoint to generate an image from a prompt, with optional reference images for gen4_image. Send your CometAPI API key with Bearer authentication and a JSON request body.

Choose a model and references

Every request requires model, promptText, and ratio. For gen4_image_turbo, referenceImages is required and must contain one to three images. Each reference object contains an image uri and an optional tag. Use a tag of 3 to 16 lowercase letters, digits, or underscores, starting with a letter. Reference it in promptText as @tag, such as @cat_ref. Image URIs accept accessible HTTPS URLs or Base64 image data URIs of up to 5 MB. The prompt accepts 1 to 1,000 UTF-16 code units.

Choose dimensions

Set ratio to one of the exact dimension pairs in the schema. For example, 1024:1024 requests a square image, 1280:720 a landscape image, and 720:1280 a portrait image. Use ratio to select dimensions; do not send resolution or size with these models. For an explicit sampling seed, use 1 through 4294967295. Omission or 0 selects a random seed. If you include contentModeration, set its publicFigureThreshold to auto or low; otherwise omit the object.

Retrieve the result

Save the returned id and use Get a Runway task. When status is SUCCEEDED, read the generated image URLs in output.

Authorizations

Authorization
string
header
required

Use your CometAPI API key.

Body

application/json

Request parameters for gen4_image.

model
enum<string>
required

Model ID for this request variant.

Available options:
gen4_image
Allowed value: "gen4_image"
promptText
string
required

Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.

Required string length: 1 - 1000
ratio
enum<string>
required

Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.

Available options:
1024:1024,
1080:1080,
1168:880,
1360:768,
1440:1080,
1080:1440,
1808:768,
1920:1080,
1080:1920,
2112:912,
1280:720,
720:1280,
720:720,
960:720,
720:960,
1680:720
seed
integer

Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.

Required range: 0 <= x <= 4294967295
referenceImages
object[]

Optional array of up to three reference images. Omit it or use an empty array for text-only generation.

Maximum array length: 3
contentModeration
object

Optional content moderation settings. Omit the object to use standard moderation.

Response

Task submitted. Save its id to retrieve task status.

id
string
required

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

Last modified on September 18, 2026