Create a Runway image
Generate images with Gen-4 Image or Gen-4 Image Turbo using text and reference images.
gen4_image. Send your CometAPI API key with Bearer authentication
and a JSON request body.
Choose a model and references
Every request requiresmodel, promptText, and ratio.
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
Setratio 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 returnedid and use Get a Runway task.
When status is SUCCEEDED, read the generated image URLs in output.Authorizations
Use your CometAPI API key.
Body
- gen4_image
- gen4_image_turbo
Request parameters for gen4_image.
Model ID for this request variant.
gen4_image "gen4_image"Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.
1 - 1000Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.
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 Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.
0 <= x <= 4294967295Optional array of up to three reference images. Omit it or use an empty array for text-only generation.
3Optional content moderation settings. Omit the object to use standard moderation.
Response
Task submitted. Save its id to retrieve task status.
Task ID for GET /runwayml/v1/tasks/{id}.
Task state, when returned.
Task submission timestamp, when returned.
Result URLs, when returned.
Failure explanation, when returned.
Machine-readable failure code, when returned.
Task estimate metadata, when returned.
Task cost metadata, when returned.