Create Image
Generate or edit images with Google’s Nano Banana 2.1 model.
Key Features:
- Text-to-image and image editing in the same endpoint: send up to 14 reference images to edit, combine, or keep characters and products consistent
- Wide aspect ratio range, from
8:1banners to1:8vertical strips, plusautoto follow the reference images - Optional
thinking_levelfor complex prompts - Optional Google Search grounding
- Resolutions up to 4K
Best for:
- Product and brand visuals built from reference images
- Character and product consistency across generations
- Complex prompts with many constraints
Credits: the price is set by resolution (1K, 2K or 4K).
thinking_level and use_google_search_tool do not affect it.
Authorizations
Your Magnific API key. Required for authentication. Learn how to obtain an API key
Body
Text description of the image to generate, or of the edit to apply to the reference images. Refer to the references by their caption ("Image 1", "Image 2", ...).
2 - 12000"Place the product from Image 1 on a marble kitchen counter, soft morning light"
Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.
"https://www.example.com/webhook"
Optional reference images for editing, composition, style or character and product consistency.
Image requirements:
- Maximum 14 images
- Supported formats: PNG, JPEG, WebP
- Public HTTPS URL or base64-encoded string
14Aspect ratio for the generated image.
Available ratios:
auto: Let the model choose. With reference images it follows their ratio, including ratios outside this list; without them it picks the ratio that best fits the prompt.1:1: Square (default)2:3,3:2: Portrait/Landscape3:4,4:3: Standard4:5,5:4: Photo print9:16,16:9: Social stories/Widescreen21:9: Ultra-wide cinematic1:4,4:1,1:8,8:1: Banners, strips and vertical panels. At1Kthey render 512x2064, 2064x512, 352x2928 and 2928x352 pixels.
auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1 "1:1"
Output resolution. It sets the price of the generation.
Available resolutions:
1K: About 1 megapixel, 1024x1024 at1:1(default)2K: About 4 megapixels, 2048x2048 at1:14K: About 16 megapixels, 4096x4096 at1:1
1K, 2K, 4K "1K"
How much the model reasons about the prompt before drawing. Higher
levels help with complex compositions and many constraints, at the cost
of a longer generation time. It does not affect the price.
When omitted, the model uses medium.
minimal, medium, high "medium"
Ground the generation on Google Search results, useful for prompts about current events, real places or recent products. It does not affect the price.
Response
OK - The request has succeeded and the Nano Banana 2.1 process has started.