generate image
Generate an image from a prompt (text-to-image), from a source image (image-to-image, edit_points and mask_ref for local changes), or from several inputs (ingredients-to-image), on the account’s default model or a named one. Settings are validated against list_models and set the price. Returns a job; get_jobs returns the item when it lands. Refunded when the model fails. Credits.
Authorizations
An API key (es_live_…) from Settings, under API keys, or an OAuth access token.
Headers
Retry a paid dispatch safely: the same key returns the job already dispatched instead of charging again.
The workspace this one call acts in, when it is not the key's own.
Body
One of text-to-image, image-to-image, ingredients-to-image. Which a given model accepts is in list_models types.
The prompt, in full.
A key you mint per dispatch (a UUID). The same key on a retry returns the job already dispatched instead of charging again; a new attempt takes a new key.
1 - 200A model id from list_models type image. Omitted: the account default.
Per-model settings (validated against list_models).
The media the model works from. Only the first ref is used on image-to-image, image-to-video and video-to-video; every ref on ingredients-to-* types. Further images go in reference_refs.
Reference items: images for style or character consistency, videos for motion or style on models that take them (list_models). Audio references go in settings.audioInputs.
Change specific spots and keep the rest, on models with supports_edit_points; the first source_ref is the media. Points are fractions from inspect_media with grid: true (frame mode for video). The prompt may be empty or describe the whole edit. On a picture the marked copy is image 2, so reference_refs start at image 3. Shape and length are kept.
1 - 8 elementsWith clip_id: the first source_ref is that clip's media, only the part the clip plays is sent (and priced), and the result takes the clip's slot when it lands, its place and look kept.
With timeline_id: the clip to edit and replace.
Folder path or id for the output; it must exist (organize_items create_folders). Omitted: the workspace generations folder.
A masked edit (image-to-image on models with supports_mask): a PNG item the size of the source, transparent where the model repaints, opaque where it keeps. The prompt says what goes in the painted region.
Optional: one sentence shown to the user beside this action.
600
