Skip to main content
POST
Generate Image

Text-to-image vs. editing with a reference image

  • Text-to-image — Provide prompt + model. The model picks the generator (e.g. DALL-E 3, Seedream 4.5).
  • Editing / reference image — Provide prompt + image (or images). The request switches to image-to-image mode and the image is processed by editModel, not model. The model field is ignored once an image is supplied.
The two model lists are different. When you send an image, choose the model with editModel (default Nano Banana 2). Setting model alongside an image has no effect on which model edits the image.
The reference image does not need to be hosted on Easy-Peasy, but it must be downloadable server-side — some hosts (e.g. Wikimedia, or sites that block hotlinking / non-browser requests) return HTTP 403 to automated fetches and will fail. If in doubt, host it on your own public CDN/bucket. Write the 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

Pass images 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, or OpenAI GPT Image 2 High. There is no bare "GPT Image 2" value.
  • Reve is REVE for text-to-image (model), and Reve / Reve Fast for 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 editModel returns a 400 error; an unrecognized model may fall back to a default generator, so a typo can silently produce the wrong model.
When authenticated with an API key, image generation is synchronous — the finished image comes back in the response, so you don’t need to poll.

Authorizations

x-api-key
string
header
required

API key for authentication. Get yours at https://easy-peasy.ai/settings/api

Headers

x-api-key
string
required

Your API key

Body

application/json

The prompt and model to generate the image

prompt
string
required

The textual description of the image to be generated

Example:

"neon cat"

model
enum<string>
required

The model to use for image generation

Available options:
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
Example:

"DALL-E 3"

style
string

Style for the image (e.g. Cyberpunk, Watercolor). Not all models support this parameter.

Example:

"Cyberpunk"

artist
string

Artist style to emulate (e.g. Van Gogh). Not all models support this parameter.

Example:

"Van Gogh"

dimensions
string

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
Example:

"1024x1024"

useHD
boolean
default:false

Use HD quality. Supported by select models.

Example:

false

image
string<uri>

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.

images
string

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.

Example:

"[\"https://media.easy-peasy.ai/a.png\", \"https://media.easy-peasy.ai/b.png\"]"

action
enum<string>

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.

Available options:
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
editModel
enum<string>
default:Nano Banana 2

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.

Available options:
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
outputs
integer
default:1

Number of images to generate.

Example:

1

resolution
enum<string>

Resolution quality level. Supported by FLUX.2, Nano Banana, and other select models.

Available options:
1K,
2K
Example:

"1K"

recraftStyle
string
default:any

Style preset for Recraft v3 model.

Example:

"any"

waitForResult
boolean
default:false

Wait for the image to be fully generated before returning the response. If false, returns immediately with a pending status.

Example:

false

Response

Successful image generation

id
integer

Unique identifier for the generated image

Example:

545135

image_url
string

URL of the generated image

Example:

"https://fdczvxmwwjwpwbeeqcth.supabase.co/storage/v1/object/public/images/27feb2bb-aeb4-4a83-9fb6-8f3f2a15885e/138c3903-2355-4489-8ccf-b4bdade6289a.png"

model
string

The model used for the image generation

Example:

"DALL-E 3"

used_credits
integer

The number of credits used for the generation

Example:

2

prompt
string

The prompt used for image generation

Example:

"neon cat"