Generate Image
Programmatically generate AI Images using 40+ models including DALL-E 3, Midjourney, FLUX.2, Imagen 4, Stable Diffusion, Seedream, and more.
Text-to-image vs. editing with a reference image
- Text-to-image — Provide
prompt+model. Themodelpicks the generator (e.g.DALL-E 3,Seedream 4.5). - Editing / reference image — Provide
prompt+image(orimages). The request switches to image-to-image mode and the image is processed byeditModel, notmodel. Themodelfield is ignored once an image is supplied.
image, choose the model with editModel (default Nano Banana 2). Setting model alongside an image has no effect on which model edits the image.prompt as an instruction about the image (e.g. “change the color to yellow”, “place this product on a marble counter”).
One reference image
Multiple reference images
Passimages as a JSON-encoded string array (not a JSON array):
Model naming notes
- GPT Image 2 is exposed as three quality tiers — use the exact strings
OpenAI GPT Image 2 Low,OpenAI GPT Image 2 Medium, orOpenAI GPT Image 2 High. There is no bare"GPT Image 2"value. - Reve is
REVEfor text-to-image (model), andReve/Reve Fastfor editing (editModel). There is no"Reve 2.0". - Model names are matched exactly — always send a value as listed in the schema enums below. An unrecognized
editModelreturns a400error; an unrecognizedmodelmay fall back to a default generator, so a typo can silently produce the wrong model.
Authorizations
API key for authentication. Get yours at https://easy-peasy.ai/settings/api
Headers
Your API key
Body
The prompt and model to generate the image
The textual description of the image to be generated
"neon cat"
The model to use for image generation
DALL-E 3, OpenAI GPT Image 1, OpenAI GPT Image 1.5, OpenAI GPT Image 2 Low, OpenAI GPT Image 2 Medium, OpenAI GPT Image 2 High, Midjourney V6, Midjourney V7, FLUX.1, FLUX 1.1 Pro, FLUX 1.1 Pro Ultra, FLUX.2 [dev], FLUX.2 [flex], FLUX.2 [pro], FLUX.2 [max], Flux Kontext Pro, Flux Kontext Max, Flux.1 Krea, Stable Diffusion XL, Stable Diffusion 3.0, Stable Diffusion 3.5, Imagen 3, Imagen 4, Imagen 4 Ultra, Imagen 4 Fast, Seedream 3.0, Seedream 4.0, Seedream 4.5, Seedream 5.0 Lite, Recraft v3, Recraft v4.1, Recraft v4.1 Pro, Recraft v4.1 Vector, Recraft v4.1 Pro Vector, REVE, ImagineArt 1.5, Mai Image 2.5, HiDream, HunyuanImage 3.0, Bria 3.2, Dreamina 3.1, Qwen-Image, Grok, Grok Pro, Ideogram v3, Ideogram v4, MiniMax Image 01, Kandinsky 3.0, Kandinsky 2.2, Kandinsky 2, WAN 2.2, WAN 2.5 Preview, Nano Banana, Nano Banana 2, Nano Banana Pro, Nano Banana Flash, Z-Image Turbo "DALL-E 3"
Style for the image (e.g. Cyberpunk, Watercolor). Not all models support this parameter.
"Cyberpunk"
Artist style to emulate (e.g. Van Gogh). Not all models support this parameter.
"Van Gogh"
Dimensions of the generated image. Accepted values vary by model:
- DALL-E 3:
1024x1024,1792x1024,1024x1792 - OpenAI GPT Image 1/1.5:
1024x1024,1536x1024,1024x1536 - Midjourney V6/V7, FLUX.1, FLUX 1.1 Pro/Ultra:
1:1,2:3,3:2,4:5,5:4,16:9,9:16 - FLUX.2 [dev/flex/pro/max]:
1:1,2:3,3:2,4:5,5:4,16:9,9:16 - Flux Kontext Pro/Max, Stable Diffusion 3.0/3.5:
1:1,21:9,16:9,4:3,3:2,2:3,3:4,9:16,9:21 - Imagen 3/4/4 Ultra/4 Fast, Seedream, HiDream, Dreamina, HunyuanImage, MiniMax, WAN, ImagineArt, Ideogram v3, Qwen-Image:
1:1,3:4,4:3,9:16,16:9 - Grok/Grok Pro:
1:1,3:4,4:3,9:16,16:9,2:3,3:2,1:2,2:1 - Recraft v3:
1024x1024,1365x1024,1024x1365,1536x1024,1024x1536,1820x1024,1024x1820,2048x1024,1024x2048 - Nano Banana/Pro/Flash:
1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9,21:9 - Nano Banana 2: same as above plus
1:4,4:1,1:8,8:1 - REVE:
1:1,2:3,3:2,3:4,4:3,9:16,16:9 - Bria 3.2:
1:1,2:3,3:2,3:4,4:3,4:5,5:4,9:16,16:9 - Z-Image Turbo:
1:1,4:3,3:4,16:9,9:16 - Stable Diffusion XL:
1024x1024,2048x1536,1536x2048
"1024x1024"
Use HD quality. Supported by select models.
false
Reference/input image URL for image editing. When provided with a prompt, the request switches to image-to-image mode and the image is edited/transformed by the model named in editModel (NOT model, which only applies to text-to-image). Any publicly reachable URL is accepted. Defaults to editModel: "Nano Banana 2". For multiple reference images use images instead.
JSON-encoded array of reference image URLs, for edit models that accept several inputs (e.g. combine subjects/scenes). Example: "[\"https://.../a.png\", \"https://.../b.png\"]". When set, takes precedence over image.
"[\"https://media.easy-peasy.ai/a.png\", \"https://media.easy-peasy.ai/b.png\"]"
Action to perform on the image. If not specified when image is provided, defaults to Edit Image with AI (which then uses editModel). "Character Reference" / "Style Reference" generate new scenes that keep a subject/style rather than editing the source image.
Edit Image with AI, Remove Background, Replace Background, Colorize, Relight, Stylization, Realistic Photos, Hyper Realistic Photos, Sketch to Image, Ghiblify, Caricature, Muppets, Halloween, Professional Headshot, Character Reference, Consistent Character, Style Reference, Style Reference SD3, Find and Replace, Visualize What Happens Next Model to use for image editing (only used with action: "Edit Image with AI", which is the default when image/images is provided). Defaults to Nano Banana 2.
Nano Banana 2, Nano Banana Pro, Grok, Grok Pro, OpenAI GPT Image 1.5, OpenAI GPT Image 2 Low, OpenAI GPT Image 2 Medium, OpenAI GPT Image 2 High, Seedream 4.5, Seedream 5.0 Lite, FLUX.2 [max], FLUX.2 [pro], FLUX.2 [flex], Seedream 4.0, Nano Banana, Qwen Image, Reve, Reve Fast, Mai Image 2.5, Flux Kontext Pro, Flux Kontext Max, OpenAI GPT Image 1, Ideogram v3 Character Number of images to generate.
1
Resolution quality level. Supported by FLUX.2, Nano Banana, and other select models.
1K, 2K "1K"
Style preset for Recraft v3 model.
"any"
Wait for the image to be fully generated before returning the response. If false, returns immediately with a pending status.
false
Response
Successful image generation
Unique identifier for the generated image
545135
URL of the generated image
"https://fdczvxmwwjwpwbeeqcth.supabase.co/storage/v1/object/public/images/27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e/138c3903-2355-4489-8ccf-b4bdade6289a.png"
The model used for the image generation
"DALL-E 3"
The number of credits used for the generation
2
The prompt used for image generation
"neon cat"
