generate_image
Generate images from text prompts, optionally with reference images for editing. Returns finished image URLs and previews.
Instructions
Generate image(s) from a text prompt, optionally with reference images (editing / image-to-image). Waits briefly for completion and usually returns the finished image inline (URL + small preview). Cost in credits is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Fixes randomness. For distinct variants via separate calls, use a different seed for each — identical calls within ~20s are de-duplicated to one generation. | |
| input | No | Advanced model-specific parameters (see get_model input_schema). Merged with the fields above. | |
| model | No | Model slug from list_models. Omit to use the default image model. | |
| prompt | Yes | What to generate. Russian or English. | |
| image_urls | No | Public https URLs of reference images for editing / image-to-image. | |
| num_images | No | How many images to generate in ONE call (model-dependent). Prefer this for multiple variants of a prompt — they come back together as a single tiled result. If the model has no batch support, request variants with separate calls, each with a different seed. | |
| resolution | No | Output resolution where supported, e.g. '1K', '2K', '4K'. | |
| aspect_ratio | No | Aspect ratio, e.g. '1:1', '16:9', '9:16', '4:3', '3:4'. Model-dependent. | |
| wait_seconds | No | How long to wait inline for completion before returning a request_id. | |
| idempotency_key | No | Optional stable key to safely retry without creating (and paying for) a duplicate generation. Reuse the same key when retrying the same request. | |
| include_preview | No | Attach a small inline preview of the finished image to the result. | |
| negative_prompt | No |