Generate an image
generate_imageGenerate an image from a prompt. With references, the image model also sees up to 3 pictures: image assets, frames or contact sheets of video assets, and frames or contact sheets of the edit. Use them to keep a person's face from a frame, to copy the style of an image, or to sum up a range of a video or of the edit in one picture. Choose aspectRatio and imageSize (1K is standard). It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. One image uses 26 credits at 1K, 38 at 2K and 57 at 4K, with or without references.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Up to 4000 characters. | |
| imageSize | Yes | ||
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| references | Yes | Up to 3 pictures the image model sees with the prompt, in this order, or [] to generate from the prompt alone. Each one is: asset:ID, an image asset as it is (a video asset with no time gives its first frame); asset:ID#t=14.6, the frame of a video asset at 14.6 seconds; asset:ID#t=200,215, a contact sheet of that video from 200 to 215 seconds; film:#t=3.2, the frame of the edit at 3.2 seconds; film:#t=0,12, a contact sheet of the edit from 0 to 12 seconds. Contact sheets have no times written on them. Use the IDs search_assets gives. In the prompt, say what to take from each picture by its place: "keep the face of the man in the first picture", "paint it in the style of the second picture", "one poster that sums up the scene in the third picture". | |
| aspectRatio | Yes |