Skip to main content
POST
Generate Image

Generate or edit an image

  • Text-to-image — Provide prompt + model. The model picks the generator (e.g. Nano Banana 2, OpenAI GPT Image 2.5 Flare Medium).
  • Editing / reference image — Provide prompt + image (or images). With no explicit action, this selects Edit Image with AI and uses editModel to select the editor. Other actions, such as background removal, have their own behavior.
Send editModel explicitly when editing. With an image and no action, omitting editModel selects OpenAI GPT Image 2 Medium. If you explicitly set action: "Edit Image with AI" and omit editModel, the default is Qwen Image. To select Qwen Image explicitly, include that action too. Text-to-image defaults to model: "Nano Banana 2".
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.
  • GPT Image 2.5 uses exact quality names such as OpenAI GPT Image 2.5 Flare Medium and OpenAI GPT Image 2.5 Sunburst High. The schemas list all available tiers.
  • New image models include Nano Banana 2 Lite, Seedream 5.0 Pro, Muse Image, Grok Imagine 2.0, WAN 2.7, and others listed below. The generation and editing lists differ.
  • 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.

Read the result

The response is an array of image records. Modern model integrations wait for results when you authenticate with an API key; the web-only waitForResult flag does not turn that off. Some legacy integrations, including Midjourney, return pending records with empty image_url values. Check each record’s image_url. If it is empty, save its id and poll Get Image every 15–30 seconds with the same account’s key. Stop after a bounded timeout and retain the ID. A polling timeout does not cancel generation or justify automatically creating another paid job. outputs defaults to one, but actual output count depends on the model. Midjourney returns four records per job. Credit amounts can be fractional. DALL-E 3 and Imagen titles are no longer in this endpoint’s documented catalog. Update older integrations to a listed model instead of relying on fallback behavior.

Authorizations

x-api-key
string
header
required

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

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>
default:Nano Banana 2

Exact text-to-image model title. Defaults to Nano Banana 2. For Edit Image with AI, choose editModel instead. Unknown titles may fall back to another generator; use a listed value.

Available options:
Nano Banana 2 Lite,
Nano Banana 2,
OpenAI GPT Image 2 Low,
OpenAI GPT Image 2 Medium,
OpenAI GPT Image 2 High,
OpenAI GPT Image 2.5 Flare Low,
OpenAI GPT Image 2.5 Flare Medium,
OpenAI GPT Image 2.5 Flare High,
OpenAI GPT Image 2.5 Sunburst Medium,
OpenAI GPT Image 2.5 Sunburst High,
Nano Banana Pro,
Nano Banana Flash,
Z-Image Turbo,
ImagineArt 1.5,
Mai Image 2.5,
Muse Image,
FLUX.2 [max],
FLUX.2 [flex],
FLUX.2 [pro],
FLUX.2 [dev],
Seedream 4.0,
Seedream 4.5,
Seedream 5.0 Lite,
Seedream 5.0 Pro,
Qwen Image Max,
Qwen Image 2.0,
WAN 2.7 Pro,
WAN 2.7,
Krea v2 Large,
Krea v2 Medium,
Krea v2 Medium Turbo,
Luma Uni v1,
Boogu Image,
Cosmos 3 Super,
P-Image,
HunyuanImage 3.0,
REVE,
Recraft v4.1,
Recraft v4.1 Pro,
Recraft v4.1 Vector,
Recraft v4.1 Pro Vector,
Recraft v3,
Stable Diffusion XL,
FLUX.1,
Stable Diffusion 3.5,
Bria 3.2,
HiDream,
WAN 2.2,
WAN 2.5 Preview,
Dreamina 3.1,
Qwen-Image,
Grok Imagine 2.0,
Grok,
Grok Pro,
Kandinsky 3.0,
Kandinsky 2.2,
Kandinsky 2,
MiniMax Image 01,
FLUX 1.1 Pro Ultra,
Ideogram v4,
Ideogram v3,
Flux Kontext Pro,
Flux Kontext Max,
Seedream 3.0,
Nano Banana,
OpenAI GPT Image 1,
OpenAI GPT Image 1.5,
Midjourney V6,
Midjourney V7,
FLUX 1.1 Pro,
Flux.1 Krea,
Stable Diffusion 3.0
Example:

"Nano Banana 2"

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
default:1024x1024

Size or aspect ratio, depending on the selected generator or editor. Nano Banana 2 accepts ratios such as 1:1, 16:9, and 9:16; OpenAI GPT Image accepts sizes such as 1024x1024, 1536x1024, and 1024x1536. Support differs by model. The request default is 1024x1024; send a value appropriate to your chosen model.

Example:

"1024x1024"

useHD
boolean
default:false

Use HD quality. Supported by select models.

Example:

false

image
string<uri>

Public input image URL. With no action, selects Edit Image with AI. Choose editModel to select the editor. For several reference images use images.

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>

Editor used with action: Edit Image with AI. Without an explicit action, image/images selects OpenAI GPT Image 2 Medium when editModel is omitted or Qwen Image. With an explicit Edit Image with AI action, the omitted editModel defaults to Qwen Image. Send editModel explicitly for predictable behavior.

Available options:
Nano Banana 2 Lite,
Nano Banana 2,
Nano Banana Pro,
Grok,
Grok Pro,
Grok Imagine 2.0,
Muse Image,
OpenAI GPT Image 1.5,
OpenAI GPT Image 2 Low,
OpenAI GPT Image 2 Medium,
OpenAI GPT Image 2 High,
OpenAI GPT Image 2.5 Flare Low,
OpenAI GPT Image 2.5 Flare Medium,
OpenAI GPT Image 2.5 Flare High,
OpenAI GPT Image 2.5 Sunburst Medium,
OpenAI GPT Image 2.5 Sunburst High,
Seedream 4.5,
Seedream 5.0 Lite,
Seedream 5.0 Pro,
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>

Model-specific image resolution tier (uppercase K). Nano Banana 2 defaults to 1K; Nano Banana Pro/Flash default to 2K. Not every model supports every tier. This does not use the lowercase video resolution values.

Available options:
0.5K,
1K,
2K,
4K
Example:

"1K"

recraftStyle
string
default:any

Style preset for Recraft v3 model.

Example:

"any"

Response

Successful image generation

id
integer

Unique identifier for the generated image

Example:

545135

image_url
string

URL of the generated image

Example:

"https://yourcdn.com/generated-image.png"

model
string

The model used for the image generation

Example:

"Nano Banana 2"

used_credits
number

Credits used, which may be fractional.

Example:

2

prompt
string

The prompt used for image generation

Example:

"neon cat"