---
title: "Nano Banana Pro Prompt Guide — Image JSON Newcomer"
description: "Beginner-friendly Nano Banana Pro JSON prompt guide: every field explained, 3 copy-paste examples, and alternatives. 10 credits on AI Content Drop."
canonical: "https://aicontentdrop.com/blog/nano-banana-pro-json-prompt-guide"
source: "https://aicontentdrop.com/blog/nano-banana-pro-json-prompt-guide"
---
## What this guide does

This is a beginner-friendly breakdown of the Nano Banana Pro image model — every field in its JSON request body explained, three ready-to-paste examples, and a plain-English answer to when you should pick it over other models. By the end you will be able to send your first request to Nano Banana Pro and understand exactly what each field in the JSON controls.

If you have never called an AI model API before, that is completely fine. This guide defines every term the first time it comes up. You do not need to know how to code — but if you want to experiment with raw API calls, there are working curl and JavaScript snippets in section 7. If you just want to generate an image right now without any setup, you can skip straight to [AI Content Drop's image generator](https://aicontentdrop.com/best-ai-video-generator) and paste your prompt there. No API key required.

## What is Nano Banana Pro?

Nano Banana Pro is a text-to-image (T2I) model developed by Google and available via [Google's official Gemini API](https://ai.google.dev/gemini-api/docs/image-generation). You give it a text description — called a *prompt* — and it generates a high-resolution image matching that description. It sits above the standard Nano Banana 2 model in quality and fine detail, particularly on subjects with complex textures like product packaging, clothing fabric, and human skin. Its sweet spot is photorealistic commercial imagery: product shots, lifestyle scenes, and ad creative assets. What it cannot do is generate video or audio — it is a still-image-only model.

On [AI Content Drop](https://aicontentdrop.com/best-ai-video-generator) Nano Banana Pro costs **10 credits per generation** — confirmed directly from the platform's credit table. The platform uses post-deduct billing, which means you are only charged credits if the image successfully completes. If the generation fails or the provider returns an error, no credits leave your account. AI Content Drop handles the API call for you — but if you want to call Google directly, the sections below show the official request shape. For context on how this model compares to others in the image lineup, see our [best AI image models for video ad angles](https://aicontentdrop.com/blog/best-ai-image-models-for-video-ad-angles-2026) guide.

## The complete JSON prompt

Below is the full request body you send to the Google Gemini API to generate an image with Nano Banana Pro. This is valid JSON — JavaScript Object Notation, the text format APIs use to send structured requests. You can copy it, fill in your own prompt, and run it immediately.

```
{
  "contents": [
    {
      "parts": [
        {
          "text": "A glass bottle of serum on a white marble surface, soft studio lighting, photorealistic product shot, 8k"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {
      "aspectRatio": "1:1"
    }
  }
}
```

The `contents` array holds your conversation turn — at minimum one object with a `parts` array containing your text prompt. The `generationConfig` object tells the API what kind of output to produce and how to shape the canvas. The `responseModalities` field set to `["IMAGE"]` is what instructs Google to generate an image rather than text. All fields are covered in detail in the next section.

## Field-by-field breakdown

Let's go through every field in that JSON request one at a time. For each field you will find: what type of value it expects, whether you must include it, what the default is if you leave it out, and a side-by-side comparison of a well-set value versus a poorly-set one.

### contents

**Type:** array of objects | **Required:** Yes | **Default:** none

This is the top-level container for everything you want to say to the model. Each item in the array is a conversation turn. For a single image generation you only need one turn. Inside that turn is a `parts` array, and inside `parts` is at least one object with a `text` field containing your prompt string.

- Good:
  
  [{"parts":[{"text":"A matte perfume bottle on marble, studio lighting"}]}]
- Bad:
  
  []
  
  — an empty array gives the model nothing to work with and the API will return a validation error

### contents[].parts[].text

**Type:** string | **Required:** Yes | **Max length:** ~2,000 characters recommended

The prompt is your natural-language description of the image you want. The model reads every word, so specifics matter. Name the subject, describe the lighting, mention the style, and include any camera or quality keywords that matter to you. Vague prompts produce generic results; specific prompts produce usable images.

- Good:
  
  "A matte-finish amber glass bottle on a grey concrete surface, side-lit by a single softbox, shallow depth of field, commercial product photography"
- Bad:
  
  "A bottle"
  
  — the model will invent everything else and the result rarely matches your intent

For a deeper look at what makes prompts work, read our [AI prompt engineering secrets](https://aicontentdrop.com/blog/ai-prompt-engineering-secrets) post, which covers the Subject → Action → Camera → Lighting → Style framework proven across thousands of generations.

### generationConfig.responseModalities

**Type:** array of strings (enum) |  **Required:** Yes for image generation |  **Default:** `["TEXT"]`

This field tells the Gemini API what kind of output to produce. Without it, the model defaults to generating text. To generate an image you must set this to `["IMAGE"]`. This is the single most important field to get right — missing it means you receive a text description of an image instead of the image itself.

- Good:
  
  ["IMAGE"]
- Bad:
  
  omitting this field entirely — the API will return a text response describing what the image would look like, not the image

### generationConfig.imageConfig.aspectRatio

**Type:** string (enum) | **Required:** No | **Default:** `"1:1"`

The aspect ratio is the width-to-height proportion of the canvas — think of it as the shape of the image before any content is placed on it. Nano Banana Pro supports ten values: `1:1`, `9:16`, `16:9`, `3:4`, `4:3`, `3:2`, `2:3`, `5:4`, `4:5`, and `21:9`. Pick the one that matches your output destination.

- Good:
  
  "9:16"
  
  when generating an asset you plan to use in a TikTok or Instagram Story ad
- Bad:
  
  "1:1"
  
  for the same use case — you lose most of the vertical canvas and the image will crop poorly

## Allowed values reference table

Here is a single table you can bookmark and come back to when choosing values for your request.

| Field | Allowed values | Best for |
| --- | --- | --- |
| responseModalities | `["IMAGE"]` | Required for image output — always set this |
| aspectRatio: 1:1 | Square | Instagram feed, Google Display ads |
| aspectRatio: 9:16 | Portrait (tall) | TikTok, Instagram Story, Reels |
| aspectRatio: 16:9 | Landscape (wide) | YouTube thumbnails, banners, hero images |
| aspectRatio: 3:4 | Portrait (slight) | Pinterest, Facebook portrait posts |
| aspectRatio: 4:3 | Landscape (slight) | Presentation slides, web blog headers |
| aspectRatio: 3:2 | Classic photo (wide) | DSLR-style shots, editorial imagery |
| aspectRatio: 2:3 | Classic photo (tall) | Portrait photography, magazine covers |
| aspectRatio: 5:4 | Near-square (wide) | Medium format photography look |
| aspectRatio: 4:5 | Near-square (tall) | Instagram portrait feed posts |
| aspectRatio: 21:9 | Ultrawide cinematic | Cinematic banners, hero backgrounds |

## 3 working copy-paste examples

### Example 1: E-commerce product shot

```
{
  "contents": [
    {
      "parts": [
        {
          "text": "A sleek matte-black glass perfume bottle standing on a dark grey marble surface, single overhead studio softbox, ultra-sharp product photography, 8k resolution, commercial advertising quality, isolated background with soft shadow"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {
      "aspectRatio": "1:1"
    }
  }
}
```

Square format works across most e-commerce placements. The marble surface and single overhead light are specific enough to guide the model toward a clean, high-contrast product image. Expect a polished hero shot with accurate material texture on the bottle — the kind of image that used to require a full product photography studio. For more on how AI is replacing traditional product shoots, see our [AI product photography revolution](https://aicontentdrop.com/blog/ai-product-photography-revolution) guide.

### Example 2: Portrait / character

```
{
  "contents": [
    {
      "parts": [
        {
          "text": "A confident female founder in her mid-30s, wearing a tailored navy blazer and white shirt, sitting in a bright modern office, looking directly at the camera with a composed professional expression, natural window light from the left, shallow depth of field, Canon R5, 85mm lens, editorial portrait photography"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {
      "aspectRatio": "4:5"
    }
  }
}
```

The 4:5 ratio is the native Instagram portrait format — this image will fill the feed without any cropping. Specifying the camera, lens, and light direction (window from the left) tells the model how to place shadows and catchlights. The result is a founder headshot that looks like it came from a real editorial session. The Gemini API returns image bytes directly in the response, so there is no extra download step.

### Example 3: Cinematic scene

```
{
  "contents": [
    {
      "parts": [
        {
          "text": "A rain-slicked Tokyo alley at night, neon reflections in puddles, steam rising from a food stall, lone figure with an umbrella walking away from camera, anamorphic lens flare, cinematic film grain, ARRI Alexa colour grading, ultra-wide 21:9 composition"
        }
      ]
    }
  ],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {
      "aspectRatio": "21:9"
    }
  }
}
```

Ultrawide cinematic works perfectly for social-media banner images, YouTube channel art, and behind-the-scenes mood boards. Film-specific references — "ARRI Alexa colour grading", "anamorphic lens flare" — push the model toward the warm-shadow, slightly desaturated look associated with premium productions. The "lone figure walking away" adds depth and narrative without requiring the model to generate a recognisable face, which reduces the chance of a distorted portrait.

## How to send the request

An *API endpoint* is a specific URL address on a server that listens for requests and sends back a response. For Nano Banana Pro, the endpoint is on Google's official Gemini API, and you send your JSON to it using an *HTTP POST* request — the same type of request a web form uses when you click Submit. You will need a Google Gemini API key (a long string of characters that identifies your account) passed as an `x-goog-api-key` header. Get your free API key at [Google AI Studio](https://aistudio.google.com/apikey).

The Google Gemini endpoint for Nano Banana Pro image generation is:

```
POST https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent
```

Here is how to call it from a terminal using **curl** (a command-line tool available on macOS, Linux, and Windows):

```
curl -X POST \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent" \
  -H "Content-Type: application/json" \
  -H "x-goog-api-key: YOUR_GEMINI_API_KEY" \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "A sleek matte-black perfume bottle on grey marble, studio lighting, 8k product shot"
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["IMAGE"],
      "imageConfig": {
        "aspectRatio": "1:1"
      }
    }
  }'
```

And here is the same request in **JavaScript** using the browser-native `fetch` API:

```
const response = await fetch(
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent",
  {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-goog-api-key": "YOUR_GEMINI_API_KEY"
    },
    body: JSON.stringify({
      contents: [
        {
          parts: [
            {
              text: "A sleek matte-black perfume bottle on grey marble, studio lighting, 8k product shot"
            }
          ]
        }
      ],
      generationConfig: {
        responseModalities: ["IMAGE"],
        imageConfig: {
          aspectRatio: "1:1"
        }
      }
    })
  }
);

const data = await response.json();
// The image is returned synchronously — no polling needed
const imagePart = data.candidates?.[0]?.content?.parts?.find(p => p.inlineData);
const base64Image = imagePart?.inlineData?.data;
const mimeType = imagePart?.inlineData?.mimeType; // e.g. "image/png"
console.log("Image ready:", mimeType, base64Image?.slice(0, 40) + "...");
```

Or skip the API key entirely — paste your prompt into [AI Content Drop's Chat-to-Ads Studio](https://aicontentdrop.com/) or the [image generator](https://aicontentdrop.com/best-ai-video-generator) and we'll handle the request for you.

## What the response looks like

Unlike some AI image APIs that make you poll a separate status endpoint, the Google Gemini API returns the finished image **synchronously** — the same HTTP response that arrives after you POST your request already contains the image. There is no task ID to save, no polling loop to write.

A successful response looks like this:

```
{
  "candidates": [
    {
      "content": {
        "parts": [
          {
            "inlineData": {
              "mimeType": "image/png",
              "data": "iVBORw0KGgoAAAANSUhEUgAA..."
            }
          }
        ],
        "role": "model"
      },
      "finishReason": "STOP"
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 18,
    "totalTokenCount": 18
  }
}
```

The image lives at `candidates[0].content.parts[0].inlineData.data`. That value is a *base64-encoded* string — a way of representing binary image bytes as plain text. To display it in a browser, prefix it with a data URL:

```
// In a browser or Node.js environment:
const base64 = data.candidates[0].content.parts[0].inlineData.data;
const mimeType = data.candidates[0].content.parts[0].inlineData.mimeType;
const imgSrc = `data:${mimeType};base64,${base64}`;
// Now set imgSrc as the src attribute of an <img> tag
```

The `mimeType` field tells you whether the image is `image/png` or `image/jpeg`. The `finishReason` field will be `"STOP"` on success. If it is `"SAFETY"`, the prompt was blocked by Google's content policy — see section 9 for how to fix that.

## Common errors and fixes

- 400 INVALID_ARGUMENT — "responseModalities must include IMAGE"
  
  — You omitted
  
  generationConfig.responseModalities
  
  or set it to
  
  ["TEXT"]
  
  . Fix: Add
  
  "responseModalities": ["IMAGE"]
  
  inside
  
  generationConfig
  
  .
- 400 INVALID_ARGUMENT — invalid aspectRatio
  
  — You passed an aspect ratio that is not in the allowed list (for example
  
  "1200x800"
  
  or
  
  "auto"
  
  ). Fix: Use one of the ten string values in the reference table above. You cannot request a custom pixel resolution — pick the closest ratio and resize the output in post.
- 401 PERMISSION_DENIED — "API key not valid"
  
  — Your Gemini API key is missing, expired, or misspelled. Fix: Check that the
  
  x-goog-api-key
  
  header is present and that the key is copied exactly from
  
  Google AI Studio
  
  with no extra spaces. If you recently regenerated your key, the old one is invalidated immediately.
- finishReason: "SAFETY" / promptFeedback.blockReason set
  
  — Your prompt triggered Google's content safety filter. The
  
  promptFeedback.blockReason
  
  field will show which category was flagged (e.g.
  
  HARM_CATEGORY_SEXUALLY_EXPLICIT
  
  ,
  
  HARM_CATEGORY_VIOLENCE
  
  ). Fix: Remove terms that could be read as violent, explicit, or involving real named individuals. Rephrase descriptively without referencing protected content.
- 429 RESOURCE_EXHAUSTED — quota exceeded
  
  — You have hit the rate limit or daily quota for your Google Cloud project. Fix: Wait for the quota window to reset, or increase your quota limit in the Google Cloud Console. On AI Content Drop, the credit system naturally paces usage since each generation draws from your monthly balance.
- Prompt too long — 400 INVALID_ARGUMENT
  
  — Your text prompt exceeds the token limit. Fix: Trim the prompt. Remove filler phrases like "please make it look like" and "I would like to have" — the model does not need polite framing, just specific visual instructions. Aim for under 2,000 characters.
- candidates array is empty or has no inlineData part
  
  — The image was blocked or generation silently failed. Fix: Check
  
  promptFeedback
  
  at the top level of the response for a
  
  blockReason
  
  . If no block reason is present, retry the request once — transient infrastructure errors occasionally return an empty candidates array.

## Nano Banana Pro vs alternatives — when to use this

Not every image job needs Nano Banana Pro. Here is a quick decision table to help you pick the right model. You can browse all available models in the [AI Content Drop marketplace](https://aicontentdrop.com/marketplace).

| Use case | Best model | Why |
| --- | --- | --- |
| Photorealistic product shots, lifestyle images, commercial ad creative | Nano Banana Pro — 10 credits | Best detail fidelity on textures and packaging at this price point |
| High-volume batch testing (50+ variants), quick concept thumbnails | Nano Banana 2 — 6 credits | Same model family at lower cost; slightly less fine detail but 40% cheaper per image |
| Maximum quality for hero images, key visuals, or images that will be printed large | Midjourney v7 — 14 credits | Higher quality ceiling for artistic direction; worth the premium for flagship assets |

## Cost math for newcomers

Here is a concrete example to make the credit system tangible. Say you are an e-commerce brand and you want to test 10 different product shot angles for a new skincare launch — different backgrounds, lighting setups, and compositions.

10 images × 10 credits each = **100 credits**.

On the Starter plan ($19/month) you get 150 credits. That means your entire 10-image test batch uses about two-thirds of a single month of Starter, leaving 50 credits for video or other experiments. And because AI Content Drop uses post-deduct billing — you only pay credits on a successful generation — none of those 100 credits leaves your account if a generation fails.

If you need 50 variants (common for A/B testing ad creative), that is 500 credits, which fits in the Professional plan ($49/month, 300 credits) with a small top-up credit pack. Compare that to a single day of studio photography rental.

## Glossary

**Prompt**

The text description you give the AI model. It is your instruction for what the generated image should contain, how it should be lit, and what style it should follow.

**JSON**

JavaScript Object Notation — a plain-text format APIs use to send and receive structured data. It looks like a set of key–value pairs wrapped in curly braces.

**API request**

A message you send to a server asking it to do something — in this case, generate an image. The request contains your instructions in JSON format.

**Endpoint**

A specific URL on a server that is set up to receive a particular type of request. For Nano Banana Pro, the generation endpoint is `https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image-preview:generateContent`.

**base64**

A way of encoding binary data (like image bytes) as a plain ASCII text string so it can be safely transmitted in JSON. You decode it back to an image by prefixing with a data URL or saving it as a file.

**responseModalities**

A Gemini API field that tells the model what kind of output to produce. Setting it to `["IMAGE"]` switches the model from generating text to generating an image.

**Aspect ratio**

The width-to-height proportion of the image canvas. `16:9` is wide like a cinema screen; `9:16` is tall like a phone screen; `1:1` is a perfect square.

**Post-deduct billing**

A billing model where credits are only deducted from your account after the generation succeeds. Failed or errored generations do not cost you anything.

## FAQ

### Can I just use the chat instead of writing JSON?

Yes. If writing JSON feels like too much right now, the simplest path is to open the [Chat-to-Ads Studio](https://aicontentdrop.com/) and describe the image you want in plain English. The studio handles the JSON formatting for you behind the scenes.

### What if I get a 401 error?

A 401 PERMISSION_DENIED means Google rejected your API key. Check that the `x-goog-api-key` header is spelled correctly and that the key is pasted exactly from [Google AI Studio](https://aistudio.google.com/apikey) — no extra spaces at the start or end. If you recently regenerated your key, the old one is invalidated immediately.

### How do I get an aspect ratio not in the list?

You cannot request a custom resolution like `1200x630` directly — the model only accepts the ten enum values listed in the reference table. Pick the closest available ratio (for a 1200×630 Open Graph image, that would be `16:9`), generate the image, then crop or resize it to the exact pixel dimensions you need in any image editor or CSS.

### Does Nano Banana Pro support generating text inside images?

Nano Banana Pro has limited text-rendering accuracy. Short words or brand names in a large size can work, but multi-word sentences or fine-print text reliably produces garbled characters. If you need legible text in the final image, generate the image without text and add the text as a real HTML/CSS overlay in your ad creative tool instead.