Actions9
Generate Image with AI
AI-generatedSummary
Generate one or more AI-generated images from a text prompt using a specified AI model, optionally including reference images and customization parameters.
Inputs
- Model (required) — Select the AI model used for image generation. Each model varies in quality, speed, and cost (e.g., Nano Banana, GPT Image, Ideogram V3, FLUX versions, Recraft V3).
- Prompt (required) — Provide a detailed text description of the image to generate, specifying style, colors, mood, and composition for best results.
- Quantity (required) — Specify how many images to generate (1-4). Generating multiple images returns a batch with unique variations.
- Reference Images — Optionally provide up to 5 public URLs of images as visual references for the AI to incorporate, supported by many models (e.g., GPT Image, Nano Banana, Ideogram V3, FLUX).
- Aspect Ratio (required) — Choose the aspect ratio of the generated images, suitable for different platforms (e.g., 1:1 square, 16:9 landscape, 9:16 portrait).
- Rendering Speed — (Ideogram V3 only) Select speed versus quality tradeoff: Turbo (fastest), Balanced, or Quality (costlier).
- Style — (Model-specific) Set the visual style preset. For Ideogram V3, options include Anime, Design, Realistic, etc. For Recraft V3, choose from realistic, digital illustration, vector illustration, or icon styles.
- Negative Prompt — (Ideogram V3 only) Provide phrases describing undesired elements to avoid in the generated image, such as "blurry" or "low quality."
- Expand Prompt — (Ideogram V3 only) Enable or disable automatic expansion and enhancement of your prompt by the AI.
- Enhance Prompt — (FLUX 1.1 Pro/Ultra only) Enable this to let FLUX models enhance your prompt for better results.
- Raw Mode — (FLUX 1.1 Ultra only) Toggle raw mode for less processed, more natural image generation.
Output shape
Returns a single JSON object containing a job ID to track the image generation process.
If multiple images are requested, the job ID corresponds to the batch generation job. Use the 'Job Status' operation to poll for completion and obtain the generated images' URLs.
Examples
Example 1: Generate a single 1:1 aspect ratio AI image using the 'Nano Banana' model with a detailed prompt describing a coffee shop scene.
Set Model to 'Nano Banana', Prompt with detailed description, Quantity to 1, Aspect Ratio to '1:1', and leave optional fields empty or default.
