Generate an image
generate_imageGenerate an image from a prompt. Before you generate, ask whether a frame of the person's own footage does the job: for a still a template slot asks for, a thumbnail, a before and after, or a small edit such as text over a shot, a frame of the source (the moment you found with read_asset, placed as a short video clip at that second, or passed as a reference) keeps the real light and the real subject and costs nothing; generate when the picture must show something the footage does not hold. 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 34 credits at 1K, 50 at 2K and 75 at 4K, with or without references.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>",
"aspectRatio": "<aspectRatio>",
"imageSize": "<imageSize>",
"references": "<references>",
"projectId": "<projectId>"
},
"name": "generate_image"
}
}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 |